drm/amdgpu: remove fence context from the job
authorChristian König <christian.koenig@amd.com>
Fri, 13 Jul 2018 07:58:49 +0000 (09:58 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Jul 2018 21:11:52 +0000 (16:11 -0500)
Can be obtained directly from the fence as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.h

index 6d8df76b5a5d54b5cecebcaa46bb34c4337ee712..6eb7ee859ffd1a131bf7f15c699ea1634704529f 100644 (file)
@@ -1239,7 +1239,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
        }
 
        job->owner = p->filp;
-       job->fence_ctx = entity->fence_context;
        p->fence = dma_fence_get(&job->base.s_fence->finished);
 
        r = amdgpu_ctx_add_fence(p->ctx, ring, p->fence, &seq);
index ce7739832d292c26697db38a9c0f84c2d965ac7a..5518e623fed21046791c42e026383526f8cf8adb 100644 (file)
@@ -139,7 +139,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
        /* ring tests don't use a job */
        if (job) {
                vm = job->vm;
-               fence_ctx = job->fence_ctx;
+               fence_ctx = job->base.s_fence->scheduled.context;
        } else {
                vm = NULL;
                fence_ctx = 0;
index 2bd56760c7441fdc720d3a469fef424ae39741ea..10e0a97c7c03ead2694c5dbe41430aa023699b8b 100644 (file)
@@ -132,7 +132,6 @@ int amdgpu_job_submit(struct amdgpu_job *job, struct amdgpu_ring *ring,
                return r;
 
        job->owner = owner;
-       job->fence_ctx = entity->fence_context;
        *f = dma_fence_get(&job->base.s_fence->finished);
        amdgpu_job_free_resources(job);
        amdgpu_ring_priority_get(job->ring, job->base.s_priority);
index 35bb93254eb262eb63dde5a9b4885db743a010ae..3151692312bdf6d9934bb3d63268c16c1eea1199 100644 (file)
@@ -45,7 +45,6 @@ struct amdgpu_job {
        uint32_t                preamble_status;
        uint32_t                num_ibs;
        void                    *owner;
-       uint64_t                fence_ctx; /* the fence_context this job uses */
        bool                    vm_needs_flush;
        uint64_t                vm_pd_addr;
        unsigned                vmid;