From b87290b81984fdeb4e2fc529fc87e75b18be4f94 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 16 Sep 2022 02:20:28 +0000 Subject: [PATCH] drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. From Candice Li 622a557b28b718d4da92ff3504d83af2310324d2 in linux 5.15.y/5.15.68 c351938350ab9b5e978dede2c321da43de7eb70c in mainline linux --- sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c index 54f25062b79..79c15b4ed1b 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c @@ -2624,7 +2624,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); -- 2.20.1