diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2019-09-05 19:22:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-17 15:38:35 -0400 |
commit | dcafbd50f2e4d5cc964aae409fb5691b743fba23 (patch) | |
tree | f60261f3512f7fd01d4a6dd12758a19c0f77d936 | |
parent | 4f3a2c10772581840d11b76b5c1147a3767710f7 (diff) |
drm/amdgpu: Fix KFD-related kernel oops on Hawaii
Hawaii needs to flush caches explicitly, submitting an IB in a user
VMID from kernel mode. There is no s_fence in this case.
Fixes: eb3961a57424 ("drm/amdgpu: remove fence context from the job")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 7850084a05e3..60655834d649 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -143,7 +143,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
143 | /* ring tests don't use a job */ | 143 | /* ring tests don't use a job */ |
144 | if (job) { | 144 | if (job) { |
145 | vm = job->vm; | 145 | vm = job->vm; |
146 | fence_ctx = job->base.s_fence->scheduled.context; | 146 | fence_ctx = job->base.s_fence ? |
147 | job->base.s_fence->scheduled.context : 0; | ||
147 | } else { | 148 | } else { |
148 | vm = NULL; | 149 | vm = NULL; |
149 | fence_ctx = 0; | 150 | fence_ctx = 0; |