From 96b625240cb621531b49b8cb05249dafba4e0817 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 11 Oct 2018 13:51:14 -0400 Subject: [PATCH] freedreno/msm: remove reset of linked rings The msm_cmd isn't refcount'd, so with stateobj rb's that have independent lifecycle, this is no longer a safe thing to do. Really, now that there is a bo-cache for rb's, fd_ringbuffer_reset() should be deprecated because it adds a bunch of pointless complexity. Signed-off-by: Rob Clark --- freedreno/freedreno_ringbuffer.h | 1 + freedreno/msm/msm_ringbuffer.c | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/freedreno/freedreno_ringbuffer.h b/freedreno/freedreno_ringbuffer.h index 3e951dca..bc41a31c 100644 --- a/freedreno/freedreno_ringbuffer.h +++ b/freedreno/freedreno_ringbuffer.h @@ -102,6 +102,7 @@ struct fd_ringbuffer *fd_ringbuffer_ref(struct fd_ringbuffer *ring); void fd_ringbuffer_del(struct fd_ringbuffer *ring); void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, struct fd_ringbuffer *parent); +will_be_deprecated void fd_ringbuffer_reset(struct fd_ringbuffer *ring); int fd_ringbuffer_flush(struct fd_ringbuffer *ring); /* in_fence_fd: -1 for no in-fence, else fence fd diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index a9190886..304be119 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -324,14 +324,6 @@ static void flush_reset(struct fd_ringbuffer *ring) fd_bo_del(&msm_bo->base); } - /* for each of the cmd buffers, clear their reloc's: */ - for (i = 0; i < msm_ring->submit.nr_cmds; i++) { - struct msm_cmd *target_cmd = msm_ring->cmds[i]; - if (!target_cmd) - continue; - target_cmd->nr_relocs = 0; - } - msm_ring->submit.nr_cmds = 0; msm_ring->submit.nr_bos = 0; msm_ring->nr_cmds = 0; -- 2.11.0