]> Git Repo - linux.git/commitdiff
drm/amdgpu: fix pin domain compatibility check
authorChristian König <[email protected]>
Mon, 23 Oct 2017 15:29:36 +0000 (17:29 +0200)
committerAlex Deucher <[email protected]>
Mon, 4 Dec 2017 21:33:16 +0000 (16:33 -0500)
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]>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 6f876deaafc694f2e2d50e46eb69de38d4517ab4..6d4b22fdc1b4e23afe0517a6b8ea3b8ce31b1e1c 100644 (file)
@@ -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++;
This page took 0.041823 seconds and 4 git commands to generate.