From 9fa22a845bb40f602eaf073ac84b4af8384eaf3b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 21 Dec 2013 12:11:40 -0500 Subject: freedreno: allow IB to different ringbuffer Allow IB to different ringbuffer in addition to just different part of same ringbuffer. In particular, we need to add bo's to the parent (ie. one passed to flush) bo table, since the bo table applies to all the cmd buffers in submit ioctl. Signed-off-by: Rob Clark --- freedreno/freedreno_ringbuffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'freedreno/freedreno_ringbuffer.c') diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c index de666865..44437906 100644 --- a/freedreno/freedreno_ringbuffer.c +++ b/freedreno/freedreno_ringbuffer.c @@ -56,6 +56,16 @@ void fd_ringbuffer_del(struct fd_ringbuffer *ring) ring->funcs->destroy(ring); } +/* ringbuffers which are IB targets should set the toplevel rb (ie. + * the IB source) as it's parent before emitting reloc's, to ensure + * the bookkeeping works out properly. + */ +void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, + struct fd_ringbuffer *parent) +{ + ring->parent = parent; +} + void fd_ringbuffer_reset(struct fd_ringbuffer *ring) { uint32_t *start = ring->start; -- cgit v1.2.3