summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-10-13 06:35:26 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-10-13 06:35:26 +0000
commit0e199fc8ccefabf20659e6b4e88d70a76496aaec (patch)
tree6d32275e1bc2b7b6fe974ef5d21216be109e4b9d /sys/dev
parent6873b4d43002b1539aaa097bd2ca3a7b75a2ff50 (diff)
drm/amdgpu: Fix KFD-related kernel oops on Hawaii
From Felix Kuehling e0af3b19ad77b4a2c53ef05c1c11e2f58462d59c in linux 4.19.y/4.19.79 dcafbd50f2e4d5cc964aae409fb5691b743fba23 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_ib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ib.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ib.c
index 51b5e977ca8..f4e9d1b10e3 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ib.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ib.c
@@ -139,7 +139,8 @@ 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->base.s_fence->scheduled.context;
+ fence_ctx = job->base.s_fence ?
+ job->base.s_fence->scheduled.context : 0;
} else {
vm = NULL;
fence_ctx = 0;