summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König2017-10-23 17:29:36 +0200
committerAlex Deucher2017-12-04 22:33:16 +0100
commitf5318959b51274a5feea129ce472fe66cecc5241 (patch)
treea13559db19cd9a88dffd92eb0027cfd17428f607
parentdrm/amdgpu: always bind pinned BOs (diff)
downloadkernel-qcow2-linux-f5318959b51274a5feea129ce472fe66cecc5241.tar.gz
kernel-qcow2-linux-f5318959b51274a5feea129ce472fe66cecc5241.tar.xz
kernel-qcow2-linux-f5318959b51274a5feea129ce472fe66cecc5241.zip
drm/amdgpu: fix pin domain compatibility check
We need to test if any domain fits, not all of them. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 6f876deaafc6..6d4b22fdc1b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -647,7 +647,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
if (bo->pin_count) {
uint32_t mem_type = bo->tbo.mem.mem_type;
- if (domain != amdgpu_mem_type_to_domain(mem_type))
+ if (!(domain & amdgpu_mem_type_to_domain(mem_type)))
return -EINVAL;
bo->pin_count++;