artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2a3093
)
drm/amd/amdgpu: Check tbo resource pointer
author
jsg
<jsg@openbsd.org>
Mon, 9 Sep 2024 09:07:31 +0000
(09:07 +0000)
committer
jsg
<jsg@openbsd.org>
Mon, 9 Sep 2024 09:07:31 +0000
(09:07 +0000)
From Asad Kamal
4dfec5f5501a27e0a0da00e136d65ef9011ded4c
in linux-6.6.y/6.6.50
6cd2b872643bb29bba01a8ac739138db7bd79007
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
index
2c2bb60
..
55095fd
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
@@
-4605,7
+4605,8
@@
static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
shadow = vmbo->shadow;
/* No need to recover an evicted BO */
- if (shadow->tbo.resource->mem_type != TTM_PL_TT ||
+ if (!shadow->tbo.resource ||
+ shadow->tbo.resource->mem_type != TTM_PL_TT ||
shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET ||
shadow->parent->tbo.resource->mem_type != TTM_PL_VRAM)
continue;