diff options
author | Candice Li <candice.li@amd.com> | 2022-08-18 04:47:09 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-08-19 23:06:29 +0200 |
commit | c351938350ab9b5e978dede2c321da43de7eb70c (patch) | |
tree | cff35736063dd85bd8652c9f77c52cd1a4dffba3 /drivers | |
parent | drm/amdgpu: fix hive reference leak when adding xgmi device (diff) | |
download | linux-c351938350ab9b5e978dede2c321da43de7eb70c.tar.xz linux-c351938350ab9b5e978dede2c321da43de7eb70c.zip |
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index c6e0f9313a7f..fc9c1043244c 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -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); |