Skip to content

Commit a9366b9

Browse files
WangSungHuaialexdeucher
authored andcommitted
drm/amd/display: fix static screen detection setting
[WHY] OTG_STATIC_SCREEN_EVENT_MASK is changed in DCN3, but we still follow DCN2 to apply setting for OTG_STATIC_SCREEN_EVENT_MASK. [How] Add new function to apply correct settings for DCN3 series. Reviewed-by: Anthony Koo <[email protected]> Acked-by: Wayne Lin <[email protected]> Signed-off-by: SungHuai Wang <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ea7971a commit a9366b9

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,3 +987,20 @@ void dcn30_prepare_bandwidth(struct dc *dc,
987987
}
988988
}
989989

990+
void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
991+
int num_pipes, const struct dc_static_screen_params *params)
992+
{
993+
unsigned int i;
994+
unsigned int triggers = 0;
995+
996+
if (params->triggers.surface_update)
997+
triggers |= 0x100;
998+
if (params->triggers.cursor_update)
999+
triggers |= 0x8;
1000+
if (params->triggers.force_trigger)
1001+
triggers |= 0x1;
1002+
1003+
for (i = 0; i < num_pipes; i++)
1004+
pipe_ctx[i]->stream_res.tg->funcs->set_static_screen_control(pipe_ctx[i]->stream_res.tg,
1005+
triggers, params->num_frames);
1006+
}

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,7 @@ void dcn30_set_hubp_blank(const struct dc *dc,
8787
void dcn30_prepare_bandwidth(struct dc *dc,
8888
struct dc_state *context);
8989

90+
void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
91+
int num_pipes, const struct dc_static_screen_params *params);
9092

9193
#endif /* __DC_HWSS_DCN30_H__ */

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
6464
.update_bandwidth = dcn20_update_bandwidth,
6565
.set_drr = dcn10_set_drr,
6666
.get_position = dcn10_get_position,
67-
.set_static_screen_control = dcn10_set_static_screen_control,
67+
.set_static_screen_control = dcn30_set_static_screen_control,
6868
.setup_stereo = dcn10_setup_stereo,
6969
.set_avmute = dcn30_set_avmute,
7070
.log_hw_state = dcn10_log_hw_state,

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
6767
.update_bandwidth = dcn20_update_bandwidth,
6868
.set_drr = dcn10_set_drr,
6969
.get_position = dcn10_get_position,
70-
.set_static_screen_control = dcn10_set_static_screen_control,
70+
.set_static_screen_control = dcn30_set_static_screen_control,
7171
.setup_stereo = dcn10_setup_stereo,
7272
.set_avmute = dcn30_set_avmute,
7373
.log_hw_state = dcn10_log_hw_state,

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
6969
.update_bandwidth = dcn20_update_bandwidth,
7070
.set_drr = dcn10_set_drr,
7171
.get_position = dcn10_get_position,
72-
.set_static_screen_control = dcn10_set_static_screen_control,
72+
.set_static_screen_control = dcn30_set_static_screen_control,
7373
.setup_stereo = dcn10_setup_stereo,
7474
.set_avmute = dcn30_set_avmute,
7575
.log_hw_state = dcn10_log_hw_state,

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
6565
.update_bandwidth = dcn20_update_bandwidth,
6666
.set_drr = dcn10_set_drr,
6767
.get_position = dcn10_get_position,
68-
.set_static_screen_control = dcn10_set_static_screen_control,
68+
.set_static_screen_control = dcn30_set_static_screen_control,
6969
.setup_stereo = dcn10_setup_stereo,
7070
.set_avmute = dcn30_set_avmute,
7171
.log_hw_state = dcn10_log_hw_state,

0 commit comments

Comments
 (0)