Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5318959 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: fix pin domain compatibility check



We need to test if any domain fits, not all of them.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ead282a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;