aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2016-03-09 23:14:44 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-05-02 15:20:07 -0400
commitb6723c8da55af5309cf06e71a5228f3c02846c5a (patch)
tree268b16b48fca9556569ce72c02b9c1a0985b3df3 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent0de2479c953ae07fd11e7b1bc8d4fc831e6842bb (diff)
drm/amdgpu: use ref to keep job alive
this is to fix fatal page fault error that occured if: job is signaled/released after its timeout work is already put to the global queue (in this case the cancel_delayed_work will return false), which will lead to NX-protection error page fault during job_timeout_func. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index ccb28468ece8..2ac07ebecfd1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -750,7 +750,9 @@ int amdgpu_job_alloc(struct amdgpu_device *adev, unsigned num_ibs,
750 struct amdgpu_job **job); 750 struct amdgpu_job **job);
751int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size, 751int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size,
752 struct amdgpu_job **job); 752 struct amdgpu_job **job);
753
753void amdgpu_job_free(struct amdgpu_job *job); 754void amdgpu_job_free(struct amdgpu_job *job);
755void amdgpu_job_free_func(struct kref *refcount);
754int amdgpu_job_submit(struct amdgpu_job *job, struct amdgpu_ring *ring, 756int amdgpu_job_submit(struct amdgpu_job *job, struct amdgpu_ring *ring,
755 struct amd_sched_entity *entity, void *owner, 757 struct amd_sched_entity *entity, void *owner,
756 struct fence **f); 758 struct fence **f);