summaryrefslogtreecommitdiff
path: root/freedreno/freedreno_ringbuffer.c
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-12-21 12:11:40 -0500
committerRob Clark <robclark@freedesktop.org>2014-01-07 11:33:54 -0500
commit9fa22a845bb40f602eaf073ac84b4af8384eaf3b (patch)
tree3fc948539c15e569f6d022a78b40ee12727c807b /freedreno/freedreno_ringbuffer.c
parentb6caecfa904de0b4e35b93ed1212ae0089078b6d (diff)
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 <robclark@freedesktop.org>
Diffstat (limited to 'freedreno/freedreno_ringbuffer.c')
-rw-r--r--freedreno/freedreno_ringbuffer.c10
1 files changed, 10 insertions, 0 deletions
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;