drm/amdgpu: Fix BUG_ON assert
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Tue, 22 Jun 2021 16:23:38 +0000 (12:23 -0400)
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 23 Jun 2021 18:59:39 +0000 (14:59 -0400)
With added CPU domain to placement you can have
now 3 placemnts at once.

CC: stable@kernel.org
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210622162339.761651-5-andrey.grodzovsky@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index d13490975ac37f07912f9ec6b08d6a79b7b38e55..22fb4ab43eefc4aa257e95d022552b32340d94eb 100644 (file)
@@ -180,7 +180,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
                c++;
        }
 
-       BUG_ON(c >= AMDGPU_BO_MAX_PLACEMENTS);
+       BUG_ON(c > AMDGPU_BO_MAX_PLACEMENTS);
 
        placement->num_placement = c;
        placement->placement = places;