aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
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,
647 if (bo->pin_count) { 647 if (bo->pin_count) {
648 uint32_t mem_type = bo->tbo.mem.mem_type; 648 uint32_t mem_type = bo->tbo.mem.mem_type;
649 649
650 if (domain != amdgpu_mem_type_to_domain(mem_type)) 650 if (!(domain & amdgpu_mem_type_to_domain(mem_type)))
651 return -EINVAL; 651 return -EINVAL;
652 652
653 bo->pin_count++; 653 bo->pin_count++;