]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/powerplay: Add notify PWE function to SMU10
authorMikita Lipski <mikita.lipski@amd.com>
Mon, 14 May 2018 14:13:57 +0000 (10:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:44:25 +0000 (13:44 -0500)
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

index 8b75f525fe49052966e1a128bfde1a4d81dafeb3..2f69bfa478a716b0c41ce6b1cba997e529c3533a 100644 (file)
@@ -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,
 };
 
index 3d9743f5bb4559189cdf4043ee7c4c2ec6c0c848..3c321c7d962625c0df0e4d19eb058d5c48c2191b 100644 (file)
@@ -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 {