Commit 367eeed4 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: add interface to notify smu enable pme restore register

This patch adds interface to notify smu enable pme restore register for display
and in smu v11 didn't have this implementation.
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarKevin Wang <Kevin1.Wang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5e2d3881
...@@ -593,10 +593,10 @@ void pp_rv_set_pme_wa_enable(struct pp_smu *pp) ...@@ -593,10 +593,10 @@ void pp_rv_set_pme_wa_enable(struct pp_smu *pp)
void *pp_handle = adev->powerplay.pp_handle; void *pp_handle = adev->powerplay.pp_handle;
const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
if (!pp_funcs || !pp_funcs->notify_smu_enable_pwe) if (pp_funcs && pp_funcs->notify_smu_enable_pwe)
return;
pp_funcs->notify_smu_enable_pwe(pp_handle); pp_funcs->notify_smu_enable_pwe(pp_handle);
else if (adev->smu.funcs)
smu_notify_smu_enable_pwe(&adev->smu);
} }
void pp_rv_set_active_display_count(struct pp_smu *pp, int count) void pp_rv_set_active_display_count(struct pp_smu *pp, int count)
......
...@@ -319,6 +319,7 @@ struct smu_funcs ...@@ -319,6 +319,7 @@ struct smu_funcs
struct smu_performance_level *level); struct smu_performance_level *level);
int (*get_current_shallow_sleep_clocks)(struct smu_context *smu, int (*get_current_shallow_sleep_clocks)(struct smu_context *smu,
struct smu_clock_info *clocks); struct smu_clock_info *clocks);
int (*notify_smu_enable_pwe)(struct smu_context *smu);
}; };
#define smu_init_microcode(smu) \ #define smu_init_microcode(smu) \
...@@ -436,6 +437,8 @@ struct smu_funcs ...@@ -436,6 +437,8 @@ struct smu_funcs
((smu)->funcs->get_perf_level ? (smu)->funcs->get_perf_level((smu), (designation), (level)) : 0) ((smu)->funcs->get_perf_level ? (smu)->funcs->get_perf_level((smu), (designation), (level)) : 0)
#define smu_get_current_shallow_sleep_clocks(smu, clocks) \ #define smu_get_current_shallow_sleep_clocks(smu, clocks) \
((smu)->funcs->get_current_shallow_sleep_clocks ? (smu)->funcs->get_current_shallow_sleep_clocks((smu), (clocks)) : 0) ((smu)->funcs->get_current_shallow_sleep_clocks ? (smu)->funcs->get_current_shallow_sleep_clocks((smu), (clocks)) : 0)
#define smu_notify_smu_enable_pwe(smu) \
((smu)->funcs->notify_smu_enable_pwe ? (smu)->funcs->notify_smu_enable_pwe((smu)) : 0)
extern int smu_get_atom_data_table(struct smu_context *smu, uint32_t table, extern int smu_get_atom_data_table(struct smu_context *smu, uint32_t table,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment