diff options
author | Rob Clark <robclark@freedesktop.org> | 2018-07-23 10:23:50 -0400 |
---|---|---|
committer | Rob Clark <robclark@freedesktop.org> | 2018-07-30 12:18:58 -0400 |
commit | 04190a912eebdbf4ff7ca45115ee21b1e4a0edd2 (patch) | |
tree | 78a3536db03dd897abbaac9ba1e60c378dcdb418 /freedreno | |
parent | 2932a03180b9224b9d44a83c2ee299f19107f92d (diff) |
freedreno: slight reordering
Splitting code-motion out from next patch. Once we add stateobj rb's
this loop could add new entries to bos table, so it needs to be before
we set req.bos/req.nr_bos.
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r-- | freedreno/msm/msm_ringbuffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index a5f9861c..156c23c6 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -391,12 +391,6 @@ static int msm_ringbuffer_flush(struct fd_ringbuffer *ring, uint32_t *last_start finalize_current_cmd(ring, last_start); - /* needs to be after get_cmd() as that could create bos/cmds table: */ - req.bos = VOID2U64(msm_ring->submit.bos), - req.nr_bos = msm_ring->submit.nr_bos; - req.cmds = VOID2U64(msm_ring->submit.cmds), - req.nr_cmds = msm_ring->submit.nr_cmds; - /* for each of the cmd's fix up their reloc's: */ for (i = 0; i < msm_ring->submit.nr_cmds; i++) { struct drm_msm_gem_submit_cmd *cmd = &msm_ring->submit.cmds[i]; @@ -407,6 +401,12 @@ static int msm_ringbuffer_flush(struct fd_ringbuffer *ring, uint32_t *last_start cmd->nr_relocs = (b > a) ? b - a : 0; } + /* needs to be after get_cmd() as that could create bos/cmds table: */ + req.bos = VOID2U64(msm_ring->submit.bos), + req.nr_bos = msm_ring->submit.nr_bos; + req.cmds = VOID2U64(msm_ring->submit.cmds), + req.nr_cmds = msm_ring->submit.nr_cmds; + DEBUG_MSG("nr_cmds=%u, nr_bos=%u", req.nr_cmds, req.nr_bos); ret = drmCommandWriteRead(ring->pipe->dev->fd, DRM_MSM_GEM_SUBMIT, |