]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
authorCandice Li <candice.li@amd.com>
Thu, 18 Aug 2022 02:47:09 +0000 (10:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:23:51 +0000 (12:23 +0200)
[ Upstream commit c351938350ab9b5e978dede2c321da43de7eb70c ]

No need to set up rb when no gfx rings.

Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 53186c5e1066b0cc269290df6c79324a57829824..bb0d32b4be74d3d6c47b48bead863ac39c321646 100644 (file)
@@ -1514,7 +1514,8 @@ static void gfx_v9_0_gpu_init(struct amdgpu_device *adev)
 
        gfx_v9_0_tiling_mode_table_init(adev);
 
-       gfx_v9_0_setup_rb(adev);
+       if (adev->gfx.num_gfx_rings)
+               gfx_v9_0_setup_rb(adev);
        gfx_v9_0_get_cu_info(adev, &adev->gfx.cu_info);
 
        /* XXX SH_MEM regs */