> -Original Message-
> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Thursday, October 26, 2017 12:06 PM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH 3/8] drm/amdgpu: fix pin domain compatibility check
>
> From: Christian König
>
> We need to test if any domain fits, not all of them.
>
> Signed-off-by: Christian König
Reviewed-by: Alex Deucher
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 0b76d83..65289de 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++;
> --
> 2.7.4
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx