Commit e0af3b19 authored by Felix Kuehling's avatar Felix Kuehling Committed by Greg Kroah-Hartman

drm/amdgpu: Fix KFD-related kernel oops on Hawaii

[ Upstream commit dcafbd50 ]

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: eb3961a5 ("drm/amdgpu: remove fence context from the job")
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f7ace7f2
...@@ -139,7 +139,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, ...@@ -139,7 +139,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
/* ring tests don't use a job */ /* ring tests don't use a job */
if (job) { if (job) {
vm = job->vm; vm = job->vm;
fence_ctx = job->base.s_fence->scheduled.context; fence_ctx = job->base.s_fence ?
job->base.s_fence->scheduled.context : 0;
} else { } else {
vm = NULL; vm = NULL;
fence_ctx = 0; fence_ctx = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment