Commit 9af68235 authored by Yiling Chen's avatar Yiling Chen Committed by Alex Deucher

drm/amd/display: Fix static screen event mask definition change

[why]
The static screen event mask definition is different
betwnn DCN31 after and before.

[how]
Rename DCN30_set_static_screen_control to DCN31.
Reviewed-by: default avatarCharlene Liu <charlene.liu@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarYiling Chen <yi-ling.chen2@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ba162ae7
...@@ -1164,21 +1164,3 @@ void dcn30_prepare_bandwidth(struct dc *dc, ...@@ -1164,21 +1164,3 @@ void dcn30_prepare_bandwidth(struct dc *dc,
if (!dc->clk_mgr->clks.fw_based_mclk_switching) if (!dc->clk_mgr->clks.fw_based_mclk_switching)
dc_dmub_srv_p_state_delegate(dc, false, context); dc_dmub_srv_p_state_delegate(dc, false, context);
} }
void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
int num_pipes, const struct dc_static_screen_params *params)
{
unsigned int i;
unsigned int triggers = 0;
if (params->triggers.surface_update)
triggers |= 0x100;
if (params->triggers.cursor_update)
triggers |= 0x8;
if (params->triggers.force_trigger)
triggers |= 0x1;
for (i = 0; i < num_pipes; i++)
pipe_ctx[i]->stream_res.tg->funcs->set_static_screen_control(pipe_ctx[i]->stream_res.tg,
triggers, params->num_frames);
}
...@@ -93,7 +93,4 @@ void dcn30_set_hubp_blank(const struct dc *dc, ...@@ -93,7 +93,4 @@ void dcn30_set_hubp_blank(const struct dc *dc,
void dcn30_prepare_bandwidth(struct dc *dc, void dcn30_prepare_bandwidth(struct dc *dc,
struct dc_state *context); struct dc_state *context);
void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
int num_pipes, const struct dc_static_screen_params *params);
#endif /* __DC_HWSS_DCN30_H__ */ #endif /* __DC_HWSS_DCN30_H__ */
...@@ -64,7 +64,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = { ...@@ -64,7 +64,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn10_set_drr, .set_drr = dcn10_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn10_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
...@@ -617,3 +617,21 @@ void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable) ...@@ -617,3 +617,21 @@ void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable)
if (hws->ctx->dc->debug.hpo_optimization) if (hws->ctx->dc->debug.hpo_optimization)
REG_UPDATE(HPO_TOP_HW_CONTROL, HPO_IO_EN, !!enable); REG_UPDATE(HPO_TOP_HW_CONTROL, HPO_IO_EN, !!enable);
} }
void dcn31_set_static_screen_control(struct pipe_ctx **pipe_ctx,
int num_pipes, const struct dc_static_screen_params *params)
{
unsigned int i;
unsigned int triggers = 0;
if (params->triggers.surface_update)
triggers |= 0x100;
if (params->triggers.cursor_update)
triggers |= 0x8;
if (params->triggers.force_trigger)
triggers |= 0x1;
for (i = 0; i < num_pipes; i++)
pipe_ctx[i]->stream_res.tg->funcs->set_static_screen_control(pipe_ctx[i]->stream_res.tg,
triggers, params->num_frames);
}
...@@ -56,4 +56,8 @@ bool dcn31_is_abm_supported(struct dc *dc, ...@@ -56,4 +56,8 @@ bool dcn31_is_abm_supported(struct dc *dc,
void dcn31_init_pipes(struct dc *dc, struct dc_state *context); void dcn31_init_pipes(struct dc *dc, struct dc_state *context);
void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable); void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable);
void dcn31_set_static_screen_control(struct pipe_ctx **pipe_ctx,
int num_pipes, const struct dc_static_screen_params *params);
#endif /* __DC_HWSS_DCN31_H__ */ #endif /* __DC_HWSS_DCN31_H__ */
...@@ -67,7 +67,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = { ...@@ -67,7 +67,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn10_set_drr, .set_drr = dcn10_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn31_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
...@@ -69,7 +69,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = { ...@@ -69,7 +69,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn10_set_drr, .set_drr = dcn10_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn31_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
...@@ -65,7 +65,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = { ...@@ -65,7 +65,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn10_set_drr, .set_drr = dcn10_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn31_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
...@@ -70,7 +70,7 @@ static const struct hw_sequencer_funcs dcn35_funcs = { ...@@ -70,7 +70,7 @@ static const struct hw_sequencer_funcs dcn35_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn35_set_drr, .set_drr = dcn35_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn31_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
...@@ -69,7 +69,7 @@ static const struct hw_sequencer_funcs dcn351_funcs = { ...@@ -69,7 +69,7 @@ static const struct hw_sequencer_funcs dcn351_funcs = {
.update_bandwidth = dcn20_update_bandwidth, .update_bandwidth = dcn20_update_bandwidth,
.set_drr = dcn10_set_drr, .set_drr = dcn10_set_drr,
.get_position = dcn10_get_position, .get_position = dcn10_get_position,
.set_static_screen_control = dcn30_set_static_screen_control, .set_static_screen_control = dcn31_set_static_screen_control,
.setup_stereo = dcn10_setup_stereo, .setup_stereo = dcn10_setup_stereo,
.set_avmute = dcn30_set_avmute, .set_avmute = dcn30_set_avmute,
.log_hw_state = dcn10_log_hw_state, .log_hw_state = dcn10_log_hw_state,
......
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