OSDN Git Service

drm/msm: Save buffer iova's for rd-dump
authorSharat Masetty <smasetty@codeaurora.org>
Tue, 28 Nov 2017 12:04:01 +0000 (17:34 +0530)
committerSharat Masetty <smasetty@codeaurora.org>
Tue, 28 Nov 2017 12:04:01 +0000 (17:34 +0530)
rd-dump needs the buffer iova's captured in the submit path. This helps
the offline parser construct the relocs correctly. Save the buffer
iova's for the buffers which were not mapped yet and then call the API
to rd-dump the submission.

Change-Id: Ic771f3e76d8b3b943300e69fd62320f387c2d4c0
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
drivers/gpu/drm/msm/msm_gpu.c

index 44d9784..50dd710 100644 (file)
@@ -526,8 +526,6 @@ int msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
 
        list_add_tail(&submit->node, &ring->submits);
 
-       msm_rd_dump_submit(submit);
-
        ring->submitted_fence = submit->fence;
 
        submit->tick_index = ring->tick_index;
@@ -556,6 +554,8 @@ int msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
                        /* ring takes a reference to the bo and iova: */
                        drm_gem_object_reference(&msm_obj->base);
                        msm_gem_get_iova(&msm_obj->base, aspace, &iova);
+
+                       submit->bos[i].iova = iova;
                }
 
                if (submit->bos[i].flags & MSM_SUBMIT_BO_READ)
@@ -564,6 +564,8 @@ int msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
                        msm_gem_move_to_active(&msm_obj->base, gpu, true, submit->fence);
        }
 
+       msm_rd_dump_submit(submit);
+
        gpu->funcs->submit(gpu, submit);
 
        hangcheck_timer_reset(gpu);