Commit f93e29f0 authored by Lewis Huang's avatar Lewis Huang Committed by Alex Deucher

drm/amd/display: Temporary workaround to toggle watermark setting

[Why]
Watermarks not propagated to DCHUBP after it is powered on

[How]
Add temoprary function apply_DEDCN21_147_wa to apply wm settings for Renoir
Signed-off-by: default avatarLewis Huang <Lewis.Huang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: default avatarRoman Li <Roman.Li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d4516d3e
...@@ -1533,6 +1533,10 @@ static void dcn20_program_front_end_for_ctx( ...@@ -1533,6 +1533,10 @@ static void dcn20_program_front_end_for_ctx(
msleep(1); msleep(1);
} }
} }
/* WA to apply WM setting*/
if (dc->hwseq->wa.DEGVIDCN21)
dc->res_pool->hubbub->funcs->apply_DEDCN21_147_wa(dc->res_pool->hubbub);
} }
......
...@@ -616,6 +616,14 @@ void hubbub21_wm_read_state(struct hubbub *hubbub, ...@@ -616,6 +616,14 @@ void hubbub21_wm_read_state(struct hubbub *hubbub,
DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D, &s->dram_clk_chanage); DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D, &s->dram_clk_chanage);
} }
void hubbub21_apply_DEDCN21_147_wa(struct hubbub *hubbub)
{
struct dcn20_hubbub *hubbub1 = TO_DCN20_HUBBUB(hubbub);
uint32_t prog_wm_value;
prog_wm_value = REG_READ(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A);
REG_WRITE(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A, prog_wm_value);
}
static const struct hubbub_funcs hubbub21_funcs = { static const struct hubbub_funcs hubbub21_funcs = {
.update_dchub = hubbub2_update_dchub, .update_dchub = hubbub2_update_dchub,
...@@ -627,6 +635,7 @@ static const struct hubbub_funcs hubbub21_funcs = { ...@@ -627,6 +635,7 @@ static const struct hubbub_funcs hubbub21_funcs = {
.wm_read_state = hubbub21_wm_read_state, .wm_read_state = hubbub21_wm_read_state,
.get_dchub_ref_freq = hubbub2_get_dchub_ref_freq, .get_dchub_ref_freq = hubbub2_get_dchub_ref_freq,
.program_watermarks = hubbub21_program_watermarks, .program_watermarks = hubbub21_program_watermarks,
.apply_DEDCN21_147_wa = hubbub21_apply_DEDCN21_147_wa,
}; };
void hubbub21_construct(struct dcn20_hubbub *hubbub, void hubbub21_construct(struct dcn20_hubbub *hubbub,
......
...@@ -1470,6 +1470,7 @@ static struct dce_hwseq *dcn21_hwseq_create( ...@@ -1470,6 +1470,7 @@ static struct dce_hwseq *dcn21_hwseq_create(
hws->regs = &hwseq_reg; hws->regs = &hwseq_reg;
hws->shifts = &hwseq_shift; hws->shifts = &hwseq_shift;
hws->masks = &hwseq_mask; hws->masks = &hwseq_mask;
hws->wa.DEGVIDCN21 = true;
} }
return hws; return hws;
} }
......
...@@ -147,6 +147,7 @@ struct hubbub_funcs { ...@@ -147,6 +147,7 @@ struct hubbub_funcs {
bool (*is_allow_self_refresh_enabled)(struct hubbub *hubbub); bool (*is_allow_self_refresh_enabled)(struct hubbub *hubbub);
void (*allow_self_refresh_control)(struct hubbub *hubbub, bool allow); void (*allow_self_refresh_control)(struct hubbub *hubbub, bool allow);
void (*apply_DEDCN21_147_wa)(struct hubbub *hubbub);
}; };
struct hubbub { struct hubbub {
......
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