drm/amdgpu: add mode2 reset support for vangogh
Subsystems (3)
PATCH 1/3 drm/amdgpu: add mode2 reset support for vangogh
GPU reset is handled via SMU similar to previous APUs.
Acked-by Evan Quan <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +6 -0
@@ -322,6 +322,11 @@ static bool vangogh_is_dpm_running(struct smu_context *smu) } +static int vangogh_mode2_reset (struct smu_context *smu) +{ +return smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GfxDeviceDriverReset,SMU_RESET_MODE_2 ,NULL ); +} +static const struct pptable_funcs vangogh_ppt_funcs = { .dpm_set_vcn_enable = vangogh_dpm_set_vcn_enable, .dpm_set_jpeg_enable = vangogh_dpm_set_jpeg_enable,
@@ -342,6 +347,7 @@ static const struct pptable_funcs vangogh_ppt_funcs = { .set_pp_feature_mask = smu_cmn_set_pp_feature_mask, .disable_all_features_with_exception = smu_cmn_disable_all_features_with_exception, .interrupt_work = smu_v11_0_interrupt_work, + .mode2_reset = vangogh_mode2_reset, };void vangogh_set_ppt_funcs (struct smu_context *smu)
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/3 drm/amdgpu/nv: add mode2 reset handling
Vangogh will use mode2 reset, so plumb it through the nv soc driver.
Acked-by Evan Quan <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/nv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +12 -2
@@ -352,6 +352,7 @@ nv_asic_reset_method(struct amdgpu_device *adev)struct smu_context *smu = &adev->smu;if (amdgpu_reset_method ==AMD_RESET_METHOD_MODE1 || + amdgpu_reset_method ==AMD_RESET_METHOD_MODE2 || amdgpu_reset_method ==AMD_RESET_METHOD_BACO )return amdgpu_reset_method;
@@ -360,6 +361,8 @@ nv_asic_reset_method(struct amdgpu_device *adev) amdgpu_reset_method);switch (adev->asic_type) { +case CHIP_VANGOGH : +return AMD_RESET_METHOD_MODE2 ;case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :return AMD_RESET_METHOD_MODE1 ;
@@ -376,7 +379,8 @@ static int nv_asic_reset(struct amdgpu_device *adev)int ret =0 ;struct smu_context *smu = &adev->smu; -if (nv_asic_reset_method (adev) ==AMD_RESET_METHOD_BACO ) { +switch (nv_asic_reset_method (adev)) { +case AMD_RESET_METHOD_BACO :dev_info (adev->dev,"BACO reset\n" ); ret =smu_baco_enter (smu);
@@ -385,9 +389,15 @@ static int nv_asic_reset(struct amdgpu_device *adev) ret =smu_baco_exit (smu);if (ret)return ret; - }else { +break ; +case AMD_RESET_METHOD_MODE2 : +dev_info (adev->dev,"MODE2 reset\n" ); + ret =amdgpu_dpm_mode2_reset (adev); +break ; +default :dev_info (adev->dev,"MODE1 reset\n" ); ret =nv_asic_mode1_reset (adev); +break ; }return ret;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 drm/amdgpu: Enable GPU reset for vangogh
In reply to Alex DeucherEnable GPU reset when we encounter a hang.
Acked-by Evan Quan <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
@@ -4178,6 +4178,7 @@ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev)case CHIP_NAVI14 :case CHIP_NAVI12 :case CHIP_SIENNA_CICHLID : +case CHIP_VANGOGH :break ;default : goto disabled;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx