drm/amdgpu: fix the nullptr issue as for PWR IP not existing in discovery table
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix the nullptr issue as for PWR IP not existing in discovery table
fix e467ab869f57 drm/amdgpu: use IP discovery table for renoir.
This nullptr issue should be specific on the Renoir series during try access the PWR_MISC_CNTL_STATUS when PWR IP not been detected by discovery table. Moreover the PWR IP not existing in Renoir series is expected therefore just avoid access PWR register in Renoir series.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -2
@@ -2856,8 +2856,8 @@ static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev)/* program GRBM_REG_SAVE_GFX_IDLE_THRESHOLD to 0x55f0 */ data |= (0x55f0 <<RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT );WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_AUTO_PG_CTRL), data); - -pwr_10_0_gfxip_control_over_cgpg (adev, true); +if (adev->asic_type !=CHIP_RENOIR ) +pwr_10_0_gfxip_control_over_cgpg (adev, true); } }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 16 lines · Prike.Liang
fix
e467ab869f57drm/amdgpu: use IP discovery table for renoir.This nullptr issue should be specific on the Renoir series during try access the
PWR_MISC_CNTL_STATUSwhen PWR IP not been detected by discovery table. Moreover the PWR IP not existing in Renoir series is expected therefore just avoid access PWR register in Renoir series.Signed-off-by Prike.Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev) · line 2859
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-2@@ -2856,8 +2856,8 @@ static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev)/* program GRBM_REG_SAVE_GFX_IDLE_THRESHOLD to 0x55f0 */ data |= (0x55f0 <<RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT );WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_AUTO_PG_CTRL), data); - -pwr_10_0_gfxip_control_over_cgpg (adev, true); +if (adev->asic_type !=CHIP_RENOIR )
You should move that check inside pwr_10_0_gfxip_control_over_cgpg() for better understanding.
Otherwise Acked-by: Nirmoy Das <[email protected]>
Nirmoy
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev) · line 2863
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1
-0+pwr_10_0_gfxip_control_over_cgpg (adev, true); } }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 30 lines · Prike.Liang
fix
e467ab869f57drm/amdgpu: use IP discovery table for renoir.This nullptr issue should be specific on the Renoir series during try access the
PWR_MISC_CNTL_STATUSwhen PWR IP not been detected by discovery table. Moreover the PWR IP not existing in Renoir series is expected therefore just avoid access PWR register in Renoir series.Signed-off-by Prike.Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2
-3@@ -2856,8 +2856,8 @@ static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev)/* program GRBM_REG_SAVE_GFX_IDLE_THRESHOLD to 0x55f0 */ data |= (0x55f0 <<RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT );WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_AUTO_PG_CTRL), data); - -pwr_10_0_gfxip_control_over_cgpg (adev, true); +if (adev->asic_type !=CHIP_RENOIR ) +pwr_10_0_gfxip_control_over_cgpg (adev, true); } } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx