* [PATCH] drm/amd/powerplay: Add notify PWE function to SMU10
@ 2018-05-14 14:23 mikita.lipski-5C7GfCeVMHo
[not found] ` <1526307817-4473-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: mikita.lipski-5C7GfCeVMHo @ 2018-05-14 14:23 UTC (permalink / raw)
To: rex.zhu-5C7GfCeVMHo, alexander.deucher-5C7GfCeVMHo,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Mikita Lipski, Harry.Wentland-5C7GfCeVMHo
From: Mikita Lipski <mikita.lipski@amd.com>
Functionality to message smc to enable pwe after gpu suspense.
It is used in case when display resumes from S3 and wants to start
audio driver by enabling pwe.
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 8 ++++++++
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
index 8b75f52..2f69bfa 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
@@ -1113,6 +1113,13 @@ static int smu10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,
data->water_marks_exist = true;
return result;
}
+
+static int smu10_smus_notify_pwe(struct pp_hwmgr *hwmgr)
+{
+
+ return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SetRccPfcPmeRestoreRegister);
+}
+
static int smu10_set_mmhub_powergating_by_smu(struct pp_hwmgr *hwmgr)
{
return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PowerGateMmHub);
@@ -1153,6 +1160,7 @@ static const struct pp_hwmgr_func smu10_hwmgr_funcs = {
.power_state_set = smu10_set_power_state_tasks,
.dynamic_state_management_disable = smu10_disable_dpm_tasks,
.set_mmhub_powergating_by_smu = smu10_set_mmhub_powergating_by_smu,
+ .smus_notify_pwe = smu10_smus_notify_pwe,
.gfx_off_control = smu10_gfx_off_control,
};
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
index 3d9743f..3c321c7 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
@@ -326,6 +326,7 @@ struct pp_hwmgr_func {
long *input, uint32_t size);
int (*set_power_limit)(struct pp_hwmgr *hwmgr, uint32_t n);
int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr *hwmgr);
+ int (*smus_notify_pwe)(struct pp_hwmgr *hwmgr);
};
struct pp_table_func {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Add notify PWE function to SMU10
[not found] ` <1526307817-4473-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
@ 2018-05-14 14:38 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2018-05-14 14:38 UTC (permalink / raw)
To: Lipski, Mikita; +Cc: Deucher, Alexander, Wentland, Harry, Rex Zhu, amd-gfx list
On Mon, May 14, 2018 at 10:23 AM, <mikita.lipski@amd.com> wrote:
> From: Mikita Lipski <mikita.lipski@amd.com>
>
> Functionality to message smc to enable pwe after gpu suspense.
> It is used in case when display resumes from S3 and wants to start
> audio driver by enabling pwe.
>
> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 8 ++++++++
> drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> index 8b75f52..2f69bfa 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
> @@ -1113,6 +1113,13 @@ static int smu10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,
> data->water_marks_exist = true;
> return result;
> }
> +
> +static int smu10_smus_notify_pwe(struct pp_hwmgr *hwmgr)
> +{
> +
> + return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_SetRccPfcPmeRestoreRegister);
> +}
> +
> static int smu10_set_mmhub_powergating_by_smu(struct pp_hwmgr *hwmgr)
> {
> return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PowerGateMmHub);
> @@ -1153,6 +1160,7 @@ static const struct pp_hwmgr_func smu10_hwmgr_funcs = {
> .power_state_set = smu10_set_power_state_tasks,
> .dynamic_state_management_disable = smu10_disable_dpm_tasks,
> .set_mmhub_powergating_by_smu = smu10_set_mmhub_powergating_by_smu,
> + .smus_notify_pwe = smu10_smus_notify_pwe,
> .gfx_off_control = smu10_gfx_off_control,
> };
>
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> index 3d9743f..3c321c7 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> @@ -326,6 +326,7 @@ struct pp_hwmgr_func {
> long *input, uint32_t size);
> int (*set_power_limit)(struct pp_hwmgr *hwmgr, uint32_t n);
> int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr *hwmgr);
> + int (*smus_notify_pwe)(struct pp_hwmgr *hwmgr);
> };
>
> struct pp_table_func {
> --
> 2.7.4
>
> _______________________________________________
> 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] 2+ messages in thread
end of thread, other threads:[~2018-05-14 14:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 14:23 [PATCH] drm/amd/powerplay: Add notify PWE function to SMU10 mikita.lipski-5C7GfCeVMHo
[not found] ` <1526307817-4473-1-git-send-email-mikita.lipski-5C7GfCeVMHo@public.gmane.org>
2018-05-14 14:38 ` Alex Deucher
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.