drm/amd/powerplay: correct power reading on fiji
Subsystems (2)
PATCH 1/2 drm/amd/powerplay: correct power reading on fiji
Set sampling period as 500ms to provide a smooth power reading output. Also, correct the register for power reading.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +3 -3
@@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogStart);cgs_write_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94,0 ); + ixSMU_PM_STATUS_95,0 );for (i =0 ; i <10 ; i++) { -mdelay (1 ); +mdelay (500 );smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogSample); tmp =cgs_read_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94); + ixSMU_PM_STATUS_95);if (tmp !=0 )break ; }
Signature · 6 lines
2.21.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 drm/amd/powerplay: override duty cycle on Vega20
This is needed for the new SMC firmwares only.
--- .../gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +16 -0
@@ -828,6 +828,17 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr *hwmgr)return 0 ; } +static int vega20_override_duty_cycle (struct pp_hwmgr *hwmgr) +{ +struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev); +int ret =0 ; + +if (adev->pm.fw_version >=0x00282700 ) + ret =smum_send_msg_to_smc (hwmgr, PPSMC_MSG_OverrideDutyCycle); + +return ret; +} +static int vega20_set_allowed_featuresmask (struct pp_hwmgr *hwmgr) { struct vega20_hwmgr *data =
@@ -1644,6 +1655,11 @@ static int vega20_enable_dpm_tasks(struct pp_hwmgr *hwmgr)"[EnableDPMTasks] Failed to enable all smu features!" , return result); + result =vega20_override_duty_cycle (hwmgr); +PP_ASSERT_WITH_CODE (!result, +"[EnableDPMTasks] Failed to override duty cycle!" , + return result); + result =vega20_override_pcie_parameters (hwmgr); PP_ASSERT_WITH_CODE(!result, "[EnableDPMTasks] Failed to override pcie parameters!",
drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h +2 -1
@@ -119,7 +119,8 @@#define PPSMC_MSG_PrepareMp1ForShutdown 0x5A#define PPSMC_MSG_SetMGpuFanBoostLimitRpm 0x5D#define PPSMC_MSG_GetAVFSVoltageByDpm 0x5F -#define PPSMC_Message_Count 0x60 +#define PPSMC_MSG_OverrideDutyCycle 0x64 +#define PPSMC_Message_Count 0x65typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ;
Signature · 6 lines
2.21.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
RE: [PATCH 2/2] drm/amd/powerplay: override duty cycle on Vega20
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Thursday, February 28, 2019 6:32 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drm/amd/powerplay: override duty cycle on Vega20
This is needed for the new SMC firmwares only.
--- .../gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +15 -0
@@ -828,6 +828,17 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr *hwmgr)return 0 ; } +static int vega20_override_duty_cycle (struct pp_hwmgr *hwmgr) { +struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev); +int ret =0 ; + +if (adev->pm.fw_version >=0x00282700 ) + ret =smum_send_msg_to_smc (hwmgr, PPSMC_MSG_OverrideDutyCycle); + +return ret; +} +static int vega20_set_allowed_featuresmask (struct pp_hwmgr *hwmgr) { struct vega20_hwmgr *data =
@@ -1644,6 +1655,11 @@ static int vega20_enable_dpm_tasks(struct pp_hwmgr *hwmgr)"[EnableDPMTasks] Failed to enable all smu features!" , return result); + result =vega20_override_duty_cycle (hwmgr); +PP_ASSERT_WITH_CODE (!result, +"[EnableDPMTasks] Failed to override duty cycle!" , + return result); + result =vega20_override_pcie_parameters (hwmgr);PP_ASSERT_WITH_CODE (!result, "[EnableDPMTasks] Failed to override pcie parameters!", diff --git a/drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h b/drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h
index 4f63a736ea0e..4a1e01f04cf5 100644
drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h +2 -1
@@ -119,7 +119,8 @@#define PPSMC_MSG_PrepareMp1ForShutdown 0x5A#define PPSMC_MSG_SetMGpuFanBoostLimitRpm 0x5D#define PPSMC_MSG_GetAVFSVoltageByDpm 0x5F -#define PPSMC_Message_Count 0x60 +#define PPSMC_MSG_OverrideDutyCycle 0x64 +#define PPSMC_Message_Count 0x65typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ;
--
2.21.0
_______________________________________________
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
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 2/2] drm/amd/powerplay: override duty cycle on Vega20
In reply to a message not in the archiveQuoted 8 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Thursday, February 28, 2019 5:32 AM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 2/2] drm/amd/powerplay: override duty cycle on Vega20
Quoted 4 lines
This is needed for the new SMC firmwares only.
Change-Id I5934e5161ec53c1dd73cb1542ef6b738ad2e620cSigned-off-by Evan Quan <[email protected]>
Series is:
Quoted 63 lines
--- .../gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +15
-0@@ -828,6 +828,17 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr *hwmgr)return 0 ; } +static int vega20_override_duty_cycle (struct pp_hwmgr *hwmgr) { +struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr- >adev); +int ret =0 ; + +if (adev->pm.fw_version >=0x00282700 ) + ret =smum_send_msg_to_smc (hwmgr, PPSMC_MSG_OverrideDutyCycle); + +return ret; +} +static int vega20_set_allowed_featuresmask (struct pp_hwmgr *hwmgr) { struct vega20_hwmgr *data =@@ -1644,6 +1655,11 @@ static int vega20_enable_dpm_tasks(struct pp_hwmgr *hwmgr) "[EnableDPMTasks] Failed to enable all smu features!", return result); + result =vega20_override_duty_cycle (hwmgr); +PP_ASSERT_WITH_CODE (!result, +"[EnableDPMTasks] Failed to override duty cycle!" , + return result); + result =vega20_override_pcie_parameters (hwmgr);drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +0
-0PP_ASSERT_WITH_CODE(!result, "[EnableDPMTasks] Failed to override pcieparameters!", diff --git
a/drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.hb/drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.hindex4f63a736ea0e..4a1e01f04cf5100644drivers/gpu/drm/amd/powerplay/inc/vega20_ppsmc.h +2
-2@@ -119,7 +119,8 @@#define PPSMC_MSG_PrepareMp1ForShutdown 0x5A#define PPSMC_MSG_SetMGpuFanBoostLimitRpm 0x5D#define PPSMC_MSG_GetAVFSVoltageByDpm 0x5F -#define PPSMC_Message_Count 0x60 +#define PPSMC_MSG_OverrideDutyCycle 0x64 +#define PPSMC_Message_Count 0x65typedef uint32_t PPSMC_Result ;typedef uint32_t PPSMC_Msg ; --2.21.0
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
Xu, Feifei
Reviewed-by Feifei Xu-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Thursday, February 28, 2019 6:32 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 1/2] drm/amd/powerplay: correct power reading on fiji
Set sampling period as 500ms to provide a smooth power reading output. Also, correct the register for power reading.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +3 -3
@@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogStart);cgs_write_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94,0 ); + ixSMU_PM_STATUS_95,0 );for (i =0 ; i <10 ; i++) { -mdelay (1 ); +mdelay (500 );smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogSample); tmp =cgs_read_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94); + ixSMU_PM_STATUS_95);if (tmp !=0 )break ; }
--
2.21.0
_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): BYAPR12MB3048D49F85E48E84EA9462F3FE750-ZGDeBxoHBPnONjofGsFOUAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Wasn't there a long discussion about this timing some months ago... ?
Regards
//Ernst
Den tors 28 feb. 2019 kl 11:47 skrev Xu, Feifei <[email protected]>:
Quoted 43 lines
Reviewed-by Feifei Xu <[email protected]>-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Thursday, February 28, 2019 6:32 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 1/2] drm/amd/powerplay: correct power reading on fijiSet sampling period as 500ms to provide a smooth power reading output. Also, correct the register for power reading.
Change-Id I13935f3e7fcd026d34aa6a68cf7f683dc6785ab7Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +3
-4@@ -3491,14 +3491,14 @@ static int smu7_get_gpu_power(struct pp_hwmgr *hwmgr, u32 *query)smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogStart);cgs_write_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94,0 ); + ixSMU_PM_STATUS_95,0 );for (i =0 ; i <10 ; i++) { -mdelay (1 ); +mdelay (500 );smum_send_msg_to_smc (hwmgr, PPSMC_MSG_PmStatusLogSample); tmp =cgs_read_ind_register (hwmgr->device,CGS_IND_REG__SMC , - ixSMU_PM_STATUS_94); + ixSMU_PM_STATUS_95);if (tmp !=0 )break ; } --2.21.0
Quoted 8 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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx