diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-09-16 02:20:29 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-09-16 02:20:29 +0000 |
commit | 7eca707098e42812268da32f7a42aff8112e079b (patch) | |
tree | d73fd6a9437d861b3b0c7f2b72c22289982e727c /sys/dev | |
parent | 2cfeb77a7f99e7b807669356a330aba43d4ca993 (diff) |
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
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/gfx_v9_0.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |