* [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display()
@ 2017-10-04 17:49 Tom St Denis
[not found] ` <20171004174917.5310-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Tom St Denis @ 2017-10-04 17:49 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis
This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes
the noise issues on Tonga.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 8dbe9148aad3..4826b2991b7e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -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)
--
2.12.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <20171004174917.5310-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() [not found] ` <20171004174917.5310-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org> @ 2017-10-04 17:52 ` Deucher, Alexander 2017-10-04 20:21 ` Andy Furniss 1 sibling, 0 replies; 5+ messages in thread From: Deucher, Alexander @ 2017-10-04 17:52 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: StDenis, Tom > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Wednesday, October 04, 2017 1:49 PM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH] drm/amd/powerplay: Partially revert changes and fix > smu7_notify_smc_display() > > This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes > the noise issues on Tonga. > > Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > index 8dbe9148aad3..4826b2991b7e 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > @@ -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) > -- > 2.12.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() [not found] ` <20171004174917.5310-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org> 2017-10-04 17:52 ` Deucher, Alexander @ 2017-10-04 20:21 ` Andy Furniss [not found] ` <eb5871b8-3b6f-407d-55e5-c74e98be06ce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Andy Furniss @ 2017-10-04 20:21 UTC (permalink / raw) To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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? Tom St Denis wrote: > This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes > the noise issues on Tonga. > > Signed-off-by: Tom St Denis <tom.stdenis@amd.com> > --- > drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > index 8dbe9148aad3..4826b2991b7e 100644 > --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c > @@ -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) > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <eb5871b8-3b6f-407d-55e5-c74e98be06ce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() [not found] ` <eb5871b8-3b6f-407d-55e5-c74e98be06ce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-10-04 20:52 ` Tom St Denis [not found] ` <78bb78d8-3652-a42b-e569-e3c53522aee8-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Tom St Denis @ 2017-10-04 20:52 UTC (permalink / raw) To: Andy Furniss, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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 On 04/10/17 04:21 PM, Andy Furniss wrote: > 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? > > Tom St Denis wrote: >> This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and fixes >> the noise issues on Tonga. >> >> Signed-off-by: Tom St Denis <tom.stdenis@amd.com> >> --- >> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- >> 1 file changed, 2 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> index 8dbe9148aad3..4826b2991b7e 100644 >> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >> @@ -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) >> > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <78bb78d8-3652-a42b-e569-e3c53522aee8-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() [not found] ` <78bb78d8-3652-a42b-e569-e3c53522aee8-5C7GfCeVMHo@public.gmane.org> @ 2017-10-05 12:22 ` Tom St Denis 0 siblings, 0 replies; 5+ messages in thread From: Tom St Denis @ 2017-10-05 12:22 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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 On 04/10/17 04:52 PM, Tom St Denis wrote: > 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 > > On 04/10/17 04:21 PM, Andy Furniss wrote: >> 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? >> >> Tom St Denis wrote: >>> This partially reverts 0b6b4cbf77c995a34a4ec3d705a636434dadc51a and >>> fixes >>> the noise issues on Tonga. >>> >>> Signed-off-by: Tom St Denis <tom.stdenis@amd.com> >>> --- >>> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 ++----- >>> 1 file changed, 2 insertions(+), 5 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >>> b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >>> index 8dbe9148aad3..4826b2991b7e 100644 >>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c >>> @@ -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) >>> >> > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-05 12:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 17:49 [PATCH] drm/amd/powerplay: Partially revert changes and fix smu7_notify_smc_display() Tom St Denis
[not found] ` <20171004174917.5310-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-10-04 17:52 ` Deucher, Alexander
2017-10-04 20:21 ` Andy Furniss
[not found] ` <eb5871b8-3b6f-407d-55e5-c74e98be06ce-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-04 20:52 ` Tom St Denis
[not found] ` <78bb78d8-3652-a42b-e569-e3c53522aee8-5C7GfCeVMHo@public.gmane.org>
2017-10-05 12:22 ` Tom St Denis
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.