Skip to content

Commit db83914

Browse files
Allen Panalexdeucher
authored andcommitted
drm/amd/display: correct static screen event mask
[Why] Hardware register definition changed Reviewed-by: Charlene Liu <[email protected]> Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Allen Pan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0a8ff0c commit db83914

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,8 +1342,8 @@ void dcn35_set_drr(struct pipe_ctx **pipe_ctx,
13421342
{
13431343
int i = 0;
13441344
struct drr_params params = {0};
1345-
// DRR set trigger event mapped to OTG_TRIG_A (bit 11) for manual control flow
1346-
unsigned int event_triggers = 0x800;
1345+
// DRR set trigger event mapped to OTG_TRIG_A
1346+
unsigned int event_triggers = 0x2;//Bit[1]: OTG_TRIG_A
13471347
// Note DRR trigger events are generated regardless of whether num frames met.
13481348
unsigned int num_frames = 2;
13491349

@@ -1377,3 +1377,20 @@ void dcn35_set_drr(struct pipe_ctx **pipe_ctx,
13771377
}
13781378
}
13791379
}
1380+
void dcn35_set_static_screen_control(struct pipe_ctx **pipe_ctx,
1381+
int num_pipes, const struct dc_static_screen_params *params)
1382+
{
1383+
unsigned int i;
1384+
unsigned int triggers = 0;
1385+
1386+
if (params->triggers.surface_update)
1387+
triggers |= 0x200;/*bit 9 : 10 0000 0000*/
1388+
if (params->triggers.cursor_update)
1389+
triggers |= 0x8;/*bit3*/
1390+
if (params->triggers.force_trigger)
1391+
triggers |= 0x1;
1392+
for (i = 0; i < num_pipes; i++)
1393+
pipe_ctx[i]->stream_res.tg->funcs->
1394+
set_static_screen_control(pipe_ctx[i]->stream_res.tg,
1395+
triggers, params->num_frames);
1396+
}

drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,7 @@ uint32_t dcn35_get_idle_state(const struct dc *dc);
9090
void dcn35_set_drr(struct pipe_ctx **pipe_ctx,
9191
int num_pipes, struct dc_crtc_timing_adjust adjust);
9292

93+
void dcn35_set_static_screen_control(struct pipe_ctx **pipe_ctx,
94+
int num_pipes, const struct dc_static_screen_params *params);
95+
9396
#endif /* __DC_HWSS_DCN35_H__ */

drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static const struct hw_sequencer_funcs dcn35_funcs = {
7070
.update_bandwidth = dcn20_update_bandwidth,
7171
.set_drr = dcn35_set_drr,
7272
.get_position = dcn10_get_position,
73-
.set_static_screen_control = dcn31_set_static_screen_control,
73+
.set_static_screen_control = dcn35_set_static_screen_control,
7474
.setup_stereo = dcn10_setup_stereo,
7575
.set_avmute = dcn30_set_avmute,
7676
.log_hw_state = dcn10_log_hw_state,

drivers/gpu/drm/amd/display/dc/hwss/dcn351/dcn351_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 dcn351_funcs = {
6969
.update_bandwidth = dcn20_update_bandwidth,
7070
.set_drr = dcn10_set_drr,
7171
.get_position = dcn10_get_position,
72-
.set_static_screen_control = dcn31_set_static_screen_control,
72+
.set_static_screen_control = dcn35_set_static_screen_control,
7373
.setup_stereo = dcn10_setup_stereo,
7474
.set_avmute = dcn30_set_avmute,
7575
.log_hw_state = dcn10_log_hw_state,

0 commit comments

Comments
 (0)