drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()
This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes the noise issues on Tonga.
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -5
@@ -3825,14 +3825,11 @@ static int smu7_notify_link_speed_change_after_state_change(static int smu7_notify_smc_display (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); -int ret =0 ; -if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK ) { +if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK )smum_send_msg_to_smc_with_parameter (hwmgr, (PPSMC_Msg )PPSMC_MSG_SetVBITimeout, data->frame_time_x2); - ret = (smum_send_msg_to_smc (hwmgr, (PPSMC_Msg )PPSMC_HasDisplay) ==0 ) ?0 : -EINVAL ; - } -return ret; +return (smum_send_msg_to_smc (hwmgr, (PPSMC_Msg )PPSMC_HasDisplay) ==0 ) ?0 : -EINVAL ; }static int smu7_set_power_state_tasks (struct pp_hwmgr *hwmgr,const void *input)
Signature · 6 lines
2.12.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 9 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, October 04, 2017 1:49 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] drm/amd/powerplay: Partially revert changes and fixsmu7_notify_smc_display()
Quoted 4 lines
This partially reverts
0b6b4cbf77c995a34a4ec3d705a636434dadc51aand fixes the noise issues on Tonga.Signed-off-by Tom St Denis <[email protected]>
Quoted 35 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-0@@ -3825,14 +3825,11 @@ static intsmu7_notify_link_speed_change_after_state_change(
static intsmu7_notify_smc_display(struct pp_hwmgr *hwmgr){
structsmu7_hwmgr*data = (structsmu7_hwmgr*)(hwmgr-Quoted 1 line
backend);
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1
-2-int ret =0 ; -if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK ) { +if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK ) smum_send_msg_to_smc_with_parameter(hwmgr, (PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data-Quoted 1 line
frame_time_x2);drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-1- ret = (smum_send_msg_to_smc(hwmgr,(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 :
-EINVAL;drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1
-2- } -return ret; + return (smum_send_msg_to_smc(hwmgr,(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 :
-EINVAL;
}static int smu7_set_power_state_tasks(struct
pp_hwmgr*hwmgr, const
void *input)
--
2.12.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
For me testing on 4.15-wip with tonga it does "fix", but memclk is stuck, which would have avoided the lines had I forced it without this.
Maybe you see different on a different kernel - is memclk stuck for you with this?
Quoted 20 lines · Tom St Denis
This partially reverts
0b6b4cbf77c995a34a4ec3d705a636434dadc51aand fixes the noise issues on Tonga.Signed-off-by Tom St Denis <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-2@@ -3825,14 +3825,11 @@ static int smu7_notify_link_speed_change_after_state_change(static int smu7_notify_smc_display (struct pp_hwmgr *hwmgr) {struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); -int ret =0 ; -if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK ) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c static int smu7_notify_link_speed_change_after_state_change( · line 3835
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2
-3+if (hwmgr->feature_mask &PP_VBI_TIME_SUPPORT_MASK )smum_send_msg_to_smc_with_parameter (hwmgr, (PPSMC_Msg )PPSMC_MSG_SetVBITimeout, data->frame_time_x2); - ret = (smum_send_msg_to_smc (hwmgr, (PPSMC_Msg )PPSMC_HasDisplay) ==0 ) ?0 : -EINVAL ; - } -return ret; +return (smum_send_msg_to_smc (hwmgr, (PPSMC_Msg )PPSMC_HasDisplay) ==0 ) ?0 : -EINVAL ; }static int smu7_set_power_state_tasks (struct pp_hwmgr *hwmgr,const void *input)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Andy,
I didn't check that but this part of the original patch:
@@ -689,7 +697,7 @@ static int smu7_setup_dpm_tables_v0(struct pp_hwmgr *hwmgr)
allowed_vdd_sclk_table->entries[i].clk) {data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].value =
allowed_vdd_sclk_table->entries[i].clk;
- data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; to do */
+ data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].enabled = (i == 0) ? 1 : 0;
data->dpm_table.sclk_table.count++;
}
}
@@ -703,7 +711,7 @@ static int smu7_setup_dpm_tables_v0(struct pp_hwmgr *hwmgr)
allowed_vdd_mclk_table->entries[i].clk) {data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].value =
allowed_vdd_mclk_table->entries[i].clk;
- data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; */
+ data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].enabled = (i == 0) ? 1 : 0;
data->dpm_table.mclk_table.count++;
}Might be the culprit. It seems to disable all but the first clock settings. It's beyond EOD for me today but I'll check first thing in the morning.
Cheers,
Tom
Quoted 28 lines · Andy Furniss
For me testing on 4.15-wip with tonga it does "fix", but memclk is stuck, which would have avoided the lines had I forced it without this.
Maybe you see different on a different kernel - is memclk stuck for you with this?
Quoted 23 lines · Tom St Denis
This partially reverts
0b6b4cbf77c995a34a4ec3d705a636434dadc51aand fixes the noise issues on Tonga.Signed-off-by Tom St Denis <[email protected]>---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c| 7 ++-----1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-0@@ -3825,14 +3825,11 @@ static intsmu7_notify_link_speed_change_after_state_change(
static intsmu7_notify_smc_display(struct pp_hwmgr *hwmgr){
structsmu7_hwmgr*data = (structsmu7_hwmgr*)(hwmgr->backend); - int ret = 0;
- if (hwmgr->feature_mask&PP_VBI_TIME_SUPPORT_MASK) {
+ if (hwmgr->feature_mask&PP_VBI_TIME_SUPPORT_MASK)smum_send_msg_to_smc_with_parameter(hwmgr, (PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data->frame_time_x2); - ret = (smum_send_msg_to_smc(hwmgr,
Quoted 9 lines
Quoted 8 lines
(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 :
-EINVAL;
- }
- return ret;
+ return (smum_send_msg_to_smc(hwmgr, (PPSMC_Msg)PPSMC_HasDisplay)== 0) ? 0 :-EINVAL;
}
static intsmu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
I reset to before offending commit and mclk is still pegged at low. So this commit isn't responsible for this.
I'll bisect and try to hunt it down.
Tom
Quoted 75 lines · Tom St Denis
Hi Andy,
I didn't check that but this part of the original patch:
(quoted diff) +0
-0@@ -689,7 +697,7 @@ static int smu7_setup_dpm_tables_v0(struct pp_hwmgr *hwmgr) allowed_vdd_sclk_table->entries[i].clk) {data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].value =
allowed_vdd_sclk_table->entries[i].clk;
-
data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; to do */ +
data->dpm_table.sclk_table.dpm_levels[data->dpm_table.sclk_table.count].enabled = (i == 0) ? 1 : 0;
data->dpm_table.sclk_table.count++;
}
}(quoted diff) +0
-0@@ -703,7 +711,7 @@ static int smu7_setup_dpm_tables_v0(struct pp_hwmgr *hwmgr) allowed_vdd_mclk_table->entries[i].clk) {data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].value =
allowed_vdd_mclk_table->entries[i].clk;
-
data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; */ +
data->dpm_table.mclk_table.dpm_levels[data->dpm_table.mclk_table.count].enabled = (i == 0) ? 1 : 0;
data->dpm_table.mclk_table.count++;
}Might be the culprit. It seems to disable all but the first clock settings. It's beyond EOD for me today but I'll check first thing in the morning.
Cheers,
Tom
Quoted 28 lines · Andy Furniss
For me testing on 4.15-wip with tonga it does "fix", but memclk is stuck, which would have avoided the lines had I forced it without this.
Maybe you see different on a different kernel - is memclk stuck for you with this?
Quoted 23 lines · Tom St Denis
This partially reverts
0b6b4cbf77c995a34a4ec3d705a636434dadc51aand fixes the noise issues on Tonga.Signed-off-by Tom St Denis <[email protected]>---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c| 7 ++-----1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0
-0@@ -3825,14 +3825,11 @@ static intsmu7_notify_link_speed_change_after_state_change(
static intsmu7_notify_smc_display(struct pp_hwmgr *hwmgr){
structsmu7_hwmgr*data = (structsmu7_hwmgr*)(hwmgr->backend); - int ret = 0;
- if (hwmgr->feature_mask&PP_VBI_TIME_SUPPORT_MASK) {
+ if (hwmgr->feature_mask&PP_VBI_TIME_SUPPORT_MASK)smum_send_msg_to_smc_with_parameter(hwmgr, (PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data->frame_time_x2); - ret = (smum_send_msg_to_smc(hwmgr,Quoted 9 lines
Quoted 8 lines
(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 :
-EINVAL;
- }
- return ret;
+ return (smum_send_msg_to_smc(hwmgr, (PPSMC_Msg)PPSMC_HasDisplay)== 0) ? 0 :-EINVAL;
}
static intsmu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input)
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