From: Evan Quan Date: Tue, 27 Oct 2020 02:24:18 +0000 (+0800) Subject: drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running X-Git-Tag: baikal/mips/sdk5.9~12066^2~12^2~93 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=4e1b7be8a9a5f8fcdc85d2c2358ee77c9a399e49;p=kernel.git drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running This reverts commit b9aa9d1960d425cea6d2357cf44b545dd57e5304 ("drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume"). It was intended to fix Hawaii S4(hibernation) issue but break S3. As ixFEATURE_STATUS is filled with garbage data on resume which can be only cleared by reloading smc firmware(but that will involve many changes). So, we will revert this S4 fix and seek a new way. Signed-off-by: Evan Quan Tested-by: Sandeep Raghuraman Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c index 09128122b4932..329bf4d44bbce 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c @@ -2726,10 +2726,7 @@ static int ci_initialize_mc_reg_table(struct pp_hwmgr *hwmgr) static bool ci_is_dpm_running(struct pp_hwmgr *hwmgr) { - return (1 == PHM_READ_INDIRECT_FIELD(hwmgr->device, - CGS_IND_REG__SMC, FEATURE_STATUS, - VOLTAGE_CONTROLLER_ON)) - ? true : false; + return ci_is_smc_ram_running(hwmgr); } static int ci_smu_init(struct pp_hwmgr *hwmgr)