From: jsg Date: Fri, 16 Sep 2022 02:20:28 +0000 (+0000) Subject: drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b87290b81984fdeb4e2fc529fc87e75b18be4f94;p=openbsd 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 --- 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);