* [PATCH 1/2] drm/amd/powerplay: fix ret checks in amd_powerplay.c
@ 2017-10-06 5:18 Rex Zhu
[not found] ` <1507267136-5636-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Rex Zhu @ 2017-10-06 5:18 UTC (permalink / raw
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
Change-Id: Ie745bc10d933462863b4295eb26cc2af08f06547
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index f3f303e..463905b 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -396,7 +396,7 @@ static int pp_dpm_force_performance_level(void *handle,
hwmgr->request_dpm_level = level;
hwmgr_handle_task(pp_handle, AMD_PP_TASK_READJUST_POWER_STATE, NULL, NULL);
ret = hwmgr->hwmgr_func->force_dpm_level(hwmgr, level);
- if (ret)
+ if (!ret)
hwmgr->dpm_level = hwmgr->request_dpm_level;
mutex_unlock(&pp_handle->pp_lock);
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga
[not found] ` <1507267136-5636-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-10-06 5:18 ` Rex Zhu
[not found] ` <1507267136-5636-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Rex Zhu @ 2017-10-06 5:18 UTC (permalink / raw
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
regresstion issue caused by
commit 47047263c52779f1f3393c32e3e53661b53a372e
("drm/amd/powerplay: delete eventmgr related files.")
Change-Id: Ia2ddf83443a666fd1e97ddf4142acce147be00dc
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 -
drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 35e80c9..ce59e0e 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@ -292,7 +292,6 @@ int hwmgr_hw_fini(struct pp_instance *handle)
phm_stop_thermal_controller(hwmgr);
psm_set_boot_states(hwmgr);
- phm_display_configuration_changed(hwmgr);
psm_adjust_power_state_dynamic(hwmgr, false, NULL);
phm_disable_dynamic_state_management(hwmgr);
phm_disable_clock_power_gatings(hwmgr);
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
index 167cdc3..ffa44bb 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
@@ -224,6 +224,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
if (skip)
return 0;
+ phm_display_configuration_changed(hwmgr);
+
if (new_ps != NULL)
requested = new_ps;
else
@@ -232,7 +234,6 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
pcurrent = hwmgr->current_ps;
phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
-
if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr,
&pcurrent->hardware, &requested->hardware, &equal)))
equal = false;
@@ -241,6 +242,9 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size);
}
+
+ phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
+
return 0;
}
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga
[not found] ` <1507267136-5636-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2017-10-06 10:39 ` Tom St Denis
[not found] ` <ecbd147a-069f-db93-3a5f-a2e973a6e984-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tom St Denis @ 2017-10-06 10:39 UTC (permalink / raw
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Hi Rex,
Thanks. Everything seems to be functional again on my Tonga.
Cheers,
Tom
On 06/10/17 01:18 AM, Rex Zhu wrote:
> regresstion issue caused by
> commit 47047263c52779f1f3393c32e3e53661b53a372e
> ("drm/amd/powerplay: delete eventmgr related files.")
>
> Change-Id: Ia2ddf83443a666fd1e97ddf4142acce147be00dc
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 -
> drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++-
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> index 35e80c9..ce59e0e 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> @@ -292,7 +292,6 @@ int hwmgr_hw_fini(struct pp_instance *handle)
>
> phm_stop_thermal_controller(hwmgr);
> psm_set_boot_states(hwmgr);
> - phm_display_configuration_changed(hwmgr);
> psm_adjust_power_state_dynamic(hwmgr, false, NULL);
> phm_disable_dynamic_state_management(hwmgr);
> phm_disable_clock_power_gatings(hwmgr);
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> index 167cdc3..ffa44bb 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
> @@ -224,6 +224,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
> if (skip)
> return 0;
>
> + phm_display_configuration_changed(hwmgr);
> +
> if (new_ps != NULL)
> requested = new_ps;
> else
> @@ -232,7 +234,6 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
> pcurrent = hwmgr->current_ps;
>
> phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
> -
> if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr,
> &pcurrent->hardware, &requested->hardware, &equal)))
> equal = false;
> @@ -241,6 +242,9 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
> phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
> memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size);
> }
> +
> + phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
> +
> return 0;
> }
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga
[not found] ` <ecbd147a-069f-db93-3a5f-a2e973a6e984-5C7GfCeVMHo@public.gmane.org>
@ 2017-10-06 18:19 ` Andy Furniss
0 siblings, 0 replies; 4+ messages in thread
From: Andy Furniss @ 2017-10-06 18:19 UTC (permalink / raw
To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
These also fix for me.
Testing with 4.15-wip I also need the partial revert patch.
Tom St Denis wrote:
> Hi Rex,
>
> Thanks. Everything seems to be functional again on my Tonga.
>
> Cheers,
> Tom
>
> On 06/10/17 01:18 AM, Rex Zhu wrote:
>> regresstion issue caused by
>> commit 47047263c52779f1f3393c32e3e53661b53a372e
>> ("drm/amd/powerplay: delete eventmgr related files.")
>>
>> Change-Id: Ia2ddf83443a666fd1e97ddf4142acce147be00dc
>> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
>> ---
>> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 -
>> drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++-
>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> index 35e80c9..ce59e0e 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
>> @@ -292,7 +292,6 @@ int hwmgr_hw_fini(struct pp_instance *handle)
>> phm_stop_thermal_controller(hwmgr);
>> psm_set_boot_states(hwmgr);
>> - phm_display_configuration_changed(hwmgr);
>> psm_adjust_power_state_dynamic(hwmgr, false, NULL);
>> phm_disable_dynamic_state_management(hwmgr);
>> phm_disable_clock_power_gatings(hwmgr);
>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
>> b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
>> index 167cdc3..ffa44bb 100644
>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
>> @@ -224,6 +224,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr
>> *hwmgr, bool skip,
>> if (skip)
>> return 0;
>> + phm_display_configuration_changed(hwmgr);
>> +
>> if (new_ps != NULL)
>> requested = new_ps;
>> else
>> @@ -232,7 +234,6 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr
>> *hwmgr, bool skip,
>> pcurrent = hwmgr->current_ps;
>> phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
>> -
>> if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr,
>> &pcurrent->hardware, &requested->hardware, &equal)))
>> equal = false;
>> @@ -241,6 +242,9 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr
>> *hwmgr, bool skip,
>> phm_set_power_state(hwmgr, &pcurrent->hardware,
>> &requested->hardware);
>> memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size);
>> }
>> +
>> + phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
>> +
>> return 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] 4+ messages in thread
end of thread, other threads:[~2017-10-06 18:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-06 5:18 [PATCH 1/2] drm/amd/powerplay: fix ret checks in amd_powerplay.c Rex Zhu
[not found] ` <1507267136-5636-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-10-06 5:18 ` [PATCH 2/2] drm/amd/powerplay: fix mclk can't switch on Tonga Rex Zhu
[not found] ` <1507267136-5636-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2017-10-06 10:39 ` Tom St Denis
[not found] ` <ecbd147a-069f-db93-3a5f-a2e973a6e984-5C7GfCeVMHo@public.gmane.org>
2017-10-06 18:19 ` Andy Furniss
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.