]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: Fix BUG_ON assert
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Tue, 22 Jun 2021 16:23:38 +0000 (12:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:26:38 +0000 (12:26 +0200)
commit ea7acd7c5967542353430947f3faf699e70602e5 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index 28361a9c5addc4e87c78be107cb6aded3e4ba395..532d1842f6a30640094c4a44d4d71fb398bc2dcb 100644 (file)
@@ -200,7 +200,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;