aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2017-10-23 15:29:36 +0000
committerAlex Deucher <[email protected]>2017-12-04 21:33:16 +0000
commitf5318959b51274a5feea129ce472fe66cecc5241 (patch)
treea13559db19cd9a88dffd92eb0027cfd17428f607 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdrm/amdgpu: always bind pinned BOs (diff)
downloadkernel-f5318959b51274a5feea129ce472fe66cecc5241.tar.gz
kernel-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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-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++;