Skip to content

Commit

Permalink
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
Browse files Browse the repository at this point in the history
[ Upstream commit c351938 ]

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>
  • Loading branch information
candicelicy authored and gregkh committed Sep 15, 2022
1 parent f589c1f commit cb7eb0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
Expand Up @@ -2587,7 +2587,8 @@ static void gfx_v9_0_constants_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);
adev->gfx.config.db_debug2 = RREG32_SOC15(GC, 0, mmDB_DEBUG2);

Expand Down

0 comments on commit cb7eb0a

Please sign in to comment.