artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8534e9c
)
drm/amdgpu: Check BO's requested pinning domains against its preferred_domains
author
jsg
<jsg@openbsd.org>
Thu, 18 Aug 2022 00:41:20 +0000
(
00:41
+0000)
committer
jsg
<jsg@openbsd.org>
Thu, 18 Aug 2022 00:41:20 +0000
(
00:41
+0000)
From Leo Li
eb3c69c7c777d9d3c016568cb062ef02197a5a4e
in linux 5.15.y/5.15.61
f5ba14043621f4afdf3ad5f92ee2d8dbebbe4340
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
index
b5c67fb
..
54b498d
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
@@
-914,6
+914,10
@@
int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
if (WARN_ON_ONCE(min_offset > max_offset))
return -EINVAL;
+ /* Check domain to be pinned to against preferred domains */
+ if (bo->preferred_domains & domain)
+ domain = bo->preferred_domains & domain;
+
/* A shared bo cannot be migrated to VRAM */
if (bo->tbo.base.import_attach) {
if (domain & AMDGPU_GEM_DOMAIN_GTT)