diff options
| author | Thomas Zimmermann <[email protected]> | 2022-08-01 13:54:52 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2022-08-01 14:04:00 +0000 |
| commit | 9cf26c8968b358bb14cc078f8153300a493613d4 (patch) | |
| tree | cb560226137022539f1ddaa9292f64a35ea5f736 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/mgag200: Remove type field from struct mga_device (diff) | |
| parent | Merge tag 'topic/nouveau-misc-2022-07-27' of git://anongit.freedesktop.org/dr... (diff) | |
| download | kernel-9cf26c8968b358bb14cc078f8153300a493613d4.tar.gz kernel-9cf26c8968b358bb14cc078f8153300a493613d4.zip | |
Merge drm/drm-next into drm-misc-next
Backmerging to pick up fixes from amdgpu.
Signed-off-by: Thomas Zimmermann <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 677d1dfab37f..e6a9b9fc9e0b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -882,6 +882,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) |
