Simple cleanups for cz_hwmgr.c
Subsystems (2)
Small set of simple cleanups with no functional changes.
_______________________________________________
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 1/7 drm/amd/powerplay: Tidy up cz_start_dpm()
--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2 -7
@@ -961,18 +961,13 @@ static void cz_clear_voting_clients(struct pp_hwmgr *hwmgr)static int cz_start_dpm (struct pp_hwmgr *hwmgr) { -int ret =0 ;struct cz_hwmgr *cz_hwmgr = (struct cz_hwmgr *)(hwmgr->backend); -unsigned long dpm_features =0 ; cz_hwmgr->dpm_flags |= DPMFlags_SCLK_Enabled; - dpm_features |=SCLK_DPM_MASK ; - ret =smum_send_msg_to_smc_with_parameter (hwmgr, +return smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_EnableAllSmuFeatures, - dpm_features); - -return ret; +SCLK_DPM_MASK ); }static int cz_stop_dpm (struct pp_hwmgr *hwmgr)
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/7 drm/amd/powerplay: Tidy up cz_dpm_powerdown_uvd()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +1 -2
@@ -1276,8 +1276,7 @@ int cz_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr) {if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDPowerGating)) -return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_UVDPowerOFF); +return smum_send_msg_to_smc (hwmgr, PPSMC_MSG_UVDPowerOFF);return 0 ; }
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/7 drm/amd/powerplay: Tidy up cz_dpm_powerup_uvd()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +5 -12
@@ -1282,18 +1282,11 @@ int cz_dpm_powerdown_uvd(struct pp_hwmgr *hwmgr)int cz_dpm_powerup_uvd (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_UVDPowerGating)) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_UVDDynamicPowerGating)) { -return smum_send_msg_to_smc_with_parameter ( - hwmgr, - PPSMC_MSG_UVDPowerON,1 ); - }else { -return smum_send_msg_to_smc_with_parameter ( - hwmgr, - PPSMC_MSG_UVDPowerON,0 ); - } +if (PP_CAP (PHM_PlatformCaps_UVDPowerGating)) { +return smum_send_msg_to_smc_with_parameter ( + hwmgr, + PPSMC_MSG_UVDPowerON, +PP_CAP (PHM_PlatformCaps_UVDDynamicPowerGating) ?1 :0 ); }return 0 ;
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/7 drm/amd/powerplay: Tidy up cz_dpm_update_uvd_dpm()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +6 -7
@@ -1300,17 +1300,16 @@ int cz_dpm_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate)if (!bgate) {/* Stable Pstate is enabled and we need to set the UVD DPM to highest level */ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_StablePState) - || hwmgr->en_umd_pstate) { +if (PP_CAP (PHM_PlatformCaps_StablePState) || + hwmgr->en_umd_pstate) { cz_hwmgr->uvd_dpm.hard_min_clk = ptable->entries[ptable->count -1 ].vclk;smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetUvdHardMin, -cz_get_uvd_level (hwmgr, - cz_hwmgr->uvd_dpm.hard_min_clk, - PPSMC_MSG_SetUvdHardMin)); + PPSMC_MSG_SetUvdHardMin, +cz_get_uvd_level (hwmgr, + cz_hwmgr->uvd_dpm.hard_min_clk, + PPSMC_MSG_SetUvdHardMin));cz_enable_disable_uvd_dpm (hwmgr, true); }else {
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/7 drm/amd/powerplay: Tidy up cz_dpm_update_vce_dpm()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +10 -11
@@ -1329,17 +1329,16 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) hwmgr->dyn_state.vce_clock_voltage_dependency_table;/* Stable Pstate is enabled and we need to set the VCE DPM to highest level */ -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_StablePState) - || hwmgr->en_umd_pstate) { +if (PP_CAP (PHM_PlatformCaps_StablePState) || + hwmgr->en_umd_pstate) { cz_hwmgr->vce_dpm.hard_min_clk = ptable->entries[ptable->count -1 ].ecclk;smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetEclkHardMin, -cz_get_eclk_level (hwmgr, - cz_hwmgr->vce_dpm.hard_min_clk, - PPSMC_MSG_SetEclkHardMin)); + PPSMC_MSG_SetEclkHardMin, +cz_get_eclk_level (hwmgr, + cz_hwmgr->vce_dpm.hard_min_clk, + PPSMC_MSG_SetEclkHardMin)); }else {/*Program HardMin based on the vce_arbiter.ecclk */ if (hwmgr->vce_arbiter.ecclk ==0 ) {
@@ -1352,10 +1351,10 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr) }else { cz_hwmgr->vce_dpm.hard_min_clk = hwmgr->vce_arbiter.ecclk;smum_send_msg_to_smc_with_parameter (hwmgr, - PPSMC_MSG_SetEclkHardMin, -cz_get_eclk_level (hwmgr, - cz_hwmgr->vce_dpm.hard_min_clk, - PPSMC_MSG_SetEclkHardMin)); + PPSMC_MSG_SetEclkHardMin, +cz_get_eclk_level (hwmgr, + cz_hwmgr->vce_dpm.hard_min_clk, + PPSMC_MSG_SetEclkHardMin)); } }return 0 ;
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/7 drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2 -3
@@ -1362,10 +1362,9 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)int cz_dpm_powerdown_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerOFF); + PPSMC_MSG_VCEPowerOFF);return 0 ; }
Signature · 6 lines
2.12.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 6/7] drm/amd/powerplay: Tidy up cz_dpm_powerdown_vce()
Quoted 22 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Monday, October 16, 2017 1:55 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 6/7] drm/amd/powerplay: Tidy upcz_dpm_powerdown_vce()Signed-off-by Tom St Denis <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +0
-0@@ -1362,10 +1362,9 @@ int cz_dpm_update_vce_dpm(struct pp_hwmgr *hwmgr)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c int cz_dpm_update_vce_dpm(struct pp_hwmgr · line 1370
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2
-3int cz_dpm_powerdown_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerOFF); + PPSMC_MSG_VCEPowerOFF);
The indentation looked correct before.
Alex
Quoted 10 lines
return 0;
}--
2.12.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
PATCH 7/7 drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()
In reply to a message not in the archive--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2 -3
@@ -1370,10 +1370,9 @@ int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr)int cz_dpm_powerup_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerON); + PPSMC_MSG_VCEPowerON);return 0 ; }
Signature · 6 lines
2.12.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 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()
Quoted 21 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Monday, October 16, 2017 1:55 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 7/7] drm/amd/powerplay: Tidy upcz_dpm_powerup_vce()Signed-off-by Tom St Denis <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +0
-0@@ -1370,10 +1370,9 @@ int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr)
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c int cz_dpm_powerdown_vce(struct pp_hwmgr · line 1378
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2
-3int cz_dpm_powerup_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerON); + PPSMC_MSG_VCEPowerON);
Same here (indentation looked correct before).
Alex
Quoted 10 lines
return 0;
}--
2.12.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): BN6PR12MB1652818229E93890BA988F6BF74F0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: [PATCH 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()
Quoted 21 lines · Alexander
Quoted 21 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Monday, October 16, 2017 1:55 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 7/7] drm/amd/powerplay: Tidy upcz_dpm_powerup_vce()Signed-off-by Tom St Denis <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +0
-0@@ -1370,10 +1370,9 @@ int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr)
Quoted 12 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr) · line 1375
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2
-3int cz_dpm_powerup_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerON); + PPSMC_MSG_VCEPowerON);Same here (indentation looked correct before).
I was simply trying to make the lines a bit narrower. (while using the PP_CAP macro).
I can drop that part of the commits if you want.
Tom
_______________________________________________
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): e18b6bdf-a2da-73d9-2c72-acce94d7671f-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherRE: [PATCH 7/7] drm/amd/powerplay: Tidy up cz_dpm_powerup_vce()
Quoted 44 lines
-----Original Message-----
From: StDenis, Tom
Sent: Monday, October 16, 2017 2:25 PM
To: Deucher, Alexander; [email protected]
Subject: Re: [PATCH 7/7] drm/amd/powerplay: Tidy upcz_dpm_powerup_vce()Quoted 2 lines · Alexander
Quoted 2 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] OnBehalf
Quoted 5 lines
Quoted 5 lines
Of Tom St Denis
Sent: Monday, October 16, 2017 1:55 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH 7/7] drm/amd/powerplay: Tidy up
cz_dpm_powerup_vce()Quoted 14 lines
Quoted 14 lines
Signed-off-by Tom St Denis <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +0
-0@@ -1370,10 +1370,9 @@ int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr)Quoted 12 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c int cz_dpm_powerdown_vce(struct pp_hwmgr *hwmgr) · line 1375
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c +2
-3int cz_dpm_powerup_vce (struct pp_hwmgr *hwmgr) { -if (phm_cap_enabled (hwmgr->platform_descriptor.platformCaps, - PHM_PlatformCaps_VCEPowerGating)) +if (PP_CAP (PHM_PlatformCaps_VCEPowerGating))return smum_send_msg_to_smc (hwmgr, - PPSMC_MSG_VCEPowerON); + PPSMC_MSG_VCEPowerON);Same here (indentation looked correct before).
Quoted 4 lines
I was simply trying to make the lines a bit narrower. (while using the
PP_CAPmacro).I can drop that part of the commits if you want.
Please. Thanks! With that fixed and the commit messages updates, patches 6 and 7 are:
Alex
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherPlease provide a commit message for each patch. E.g., something like:
Fix up whitespace and use new PP_CAP macro. No function change intended.
With that fixed, patches 1-5 are:
The new indentation looks wrong on patches 6 and 7.
Alex
Quoted 7 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Monday, October 16, 2017 1:55 PM
To: [email protected]
Subject: Simple cleanups forcz_hwmgr.c
Quoted 6 lines
Small set of simple cleanups with no functional changes.
_______________________________________________
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