Commit a8c40b0b authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: PME sw wa to support waking AZ D3

Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 02d170e2
...@@ -1788,7 +1788,19 @@ static enum dc_status enable_link( ...@@ -1788,7 +1788,19 @@ static enum dc_status enable_link(
} }
if (pipe_ctx->stream_res.audio && status == DC_OK) { if (pipe_ctx->stream_res.audio && status == DC_OK) {
struct dc *core_dc = pipe_ctx->stream->ctx->dc;
/* notify audio driver for audio modes of monitor */ /* notify audio driver for audio modes of monitor */
struct pp_smu_funcs_rv *pp_smu = core_dc->res_pool->pp_smu;
unsigned int i, num_audio = 1;
for (i = 0; i < MAX_PIPES; i++) {
/*current_state not updated yet*/
if (core_dc->current_state->res_ctx.pipe_ctx[i].stream_res.audio != NULL)
num_audio++;
}
if (num_audio == 1 && pp_smu != NULL && pp_smu->set_pme_wa_enable != NULL)
/*this is the first audio. apply the PME w/a in order to wake AZ from D3*/
pp_smu->set_pme_wa_enable(&pp_smu->pp_smu);
pipe_ctx->stream_res.audio->funcs->az_enable(pipe_ctx->stream_res.audio); pipe_ctx->stream_res.audio->funcs->az_enable(pipe_ctx->stream_res.audio);
/* un-mute audio */ /* un-mute audio */
......
...@@ -91,7 +91,8 @@ struct pp_smu_funcs_rv { ...@@ -91,7 +91,8 @@ struct pp_smu_funcs_rv {
/* which SMU message? are reader and writer WM separate SMU msg? */ /* which SMU message? are reader and writer WM separate SMU msg? */
void (*set_wm_ranges)(struct pp_smu *pp, void (*set_wm_ranges)(struct pp_smu *pp,
struct pp_smu_wm_range_sets *ranges); struct pp_smu_wm_range_sets *ranges);
/* PME w/a */
void (*set_pme_wa_enable)(struct pp_smu *pp);
}; };
#if 0 #if 0
......
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