freedreno: remove deprecated ringmarker API
It's usage in mesa was removed more than two years ago. And it stands in the way of some optimizations needed to reduce the overhead of hw stateobjs (ie. CP_SET_DRAW_STATE, where the # of cmds in the submit ioctl goes up significantly). Signed-off-by: Rob Clark <robclark@freedesktop.org>main
parent
33faf339c3
commit
09cbccff55
|
@ -57,12 +57,7 @@ fd_ringbuffer_reset
|
|||
fd_ringbuffer_set_parent
|
||||
fd_ringbuffer_size
|
||||
fd_ringbuffer_timestamp
|
||||
fd_ringmarker_del
|
||||
fd_ringmarker_dwords
|
||||
fd_ringmarker_flush
|
||||
fd_ringbuffer_flush2
|
||||
fd_ringmarker_mark
|
||||
fd_ringmarker_new
|
||||
EOF
|
||||
done)
|
||||
|
||||
|
|
|
@ -131,11 +131,6 @@ struct fd_pipe {
|
|||
const struct fd_pipe_funcs *funcs;
|
||||
};
|
||||
|
||||
struct fd_ringmarker {
|
||||
struct fd_ringbuffer *ring;
|
||||
uint32_t *cur;
|
||||
};
|
||||
|
||||
struct fd_ringbuffer_funcs {
|
||||
void * (*hostptr)(struct fd_ringbuffer *ring);
|
||||
int (*flush)(struct fd_ringbuffer *ring, uint32_t *last_start,
|
||||
|
|
|
@ -155,21 +155,6 @@ drm_public void fd_ringbuffer_reloc2(struct fd_ringbuffer *ring,
|
|||
ring->funcs->emit_reloc(ring, reloc);
|
||||
}
|
||||
|
||||
drm_public void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
|
||||
struct fd_ringmarker *target, struct fd_ringmarker *end)
|
||||
{
|
||||
uint32_t submit_offset, size;
|
||||
|
||||
/* This function is deprecated and not supported on 64b devices: */
|
||||
assert(ring->pipe->gpu_id < 500);
|
||||
assert(target->ring == end->ring);
|
||||
|
||||
submit_offset = offset_bytes(target->cur, target->ring->start);
|
||||
size = offset_bytes(end->cur, target->cur);
|
||||
|
||||
ring->funcs->emit_reloc_ring(ring, target->ring, 0, submit_offset, size);
|
||||
}
|
||||
|
||||
drm_public uint32_t fd_ringbuffer_cmd_count(struct fd_ringbuffer *ring)
|
||||
{
|
||||
if (!ring->funcs->cmd_count)
|
||||
|
@ -196,45 +181,3 @@ fd_ringbuffer_size(struct fd_ringbuffer *ring)
|
|||
return offset_bytes(ring->cur, ring->start);
|
||||
}
|
||||
|
||||
/*
|
||||
* Deprecated ringmarker API:
|
||||
*/
|
||||
|
||||
drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
|
||||
{
|
||||
struct fd_ringmarker *marker = NULL;
|
||||
|
||||
marker = calloc(1, sizeof(*marker));
|
||||
if (!marker) {
|
||||
ERROR_MSG("allocation failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
marker->ring = ring;
|
||||
|
||||
marker->cur = marker->ring->cur;
|
||||
|
||||
return marker;
|
||||
}
|
||||
|
||||
drm_public void fd_ringmarker_del(struct fd_ringmarker *marker)
|
||||
{
|
||||
free(marker);
|
||||
}
|
||||
|
||||
drm_public void fd_ringmarker_mark(struct fd_ringmarker *marker)
|
||||
{
|
||||
marker->cur = marker->ring->cur;
|
||||
}
|
||||
|
||||
drm_public uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
|
||||
struct fd_ringmarker *end)
|
||||
{
|
||||
return end->cur - start->cur;
|
||||
}
|
||||
|
||||
drm_public int fd_ringmarker_flush(struct fd_ringmarker *marker)
|
||||
{
|
||||
struct fd_ringbuffer *ring = marker->ring;
|
||||
return ring->funcs->flush(ring, marker->cur, -1, NULL);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
*/
|
||||
|
||||
struct fd_ringbuffer_funcs;
|
||||
struct fd_ringmarker;
|
||||
|
||||
enum fd_ringbuffer_flags {
|
||||
|
||||
|
@ -134,18 +133,9 @@ struct fd_reloc {
|
|||
|
||||
void fd_ringbuffer_reloc2(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
|
||||
will_be_deprecated void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, const struct fd_reloc *reloc);
|
||||
will_be_deprecated void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
|
||||
struct fd_ringmarker *target, struct fd_ringmarker *end);
|
||||
uint32_t fd_ringbuffer_cmd_count(struct fd_ringbuffer *ring);
|
||||
uint32_t fd_ringbuffer_emit_reloc_ring_full(struct fd_ringbuffer *ring,
|
||||
struct fd_ringbuffer *target, uint32_t cmd_idx);
|
||||
uint32_t fd_ringbuffer_size(struct fd_ringbuffer *ring);
|
||||
|
||||
will_be_deprecated struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring);
|
||||
will_be_deprecated void fd_ringmarker_del(struct fd_ringmarker *marker);
|
||||
will_be_deprecated void fd_ringmarker_mark(struct fd_ringmarker *marker);
|
||||
will_be_deprecated uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
|
||||
struct fd_ringmarker *end);
|
||||
will_be_deprecated int fd_ringmarker_flush(struct fd_ringmarker *marker);
|
||||
|
||||
#endif /* FREEDRENO_RINGBUFFER_H_ */
|
||||
|
|
Loading…
Reference in New Issue