Skip to content

Commit eacb3d3

Browse files
gugulotmichalsimek
authored andcommitted
drm: xlnx: hdmi: Downgrade the FRL rate when sink requests
Fix the LTS:4 state to drop the FRL rate when sink requests and initiate the FRL training again. Signed-off-by: Rajesh Gugulothu <rajesh.gugulothu@amd.com> Reviewed-by: Vishal Sagar <vishal.sagar@amd.com>
1 parent 37a9782 commit eacb3d3

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

drivers/gpu/drm/xlnx/xlnx_hdmi.c

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,24 +2399,32 @@ static int xlnx_hdmi_exec_frl_state_lts4(struct xlnx_hdmi *hdmi)
23992399

24002400
xlnx_hdmi_set_frl_timer(hdmi, 0);
24012401
xlnx_hdmi_clear_frl_ltp(hdmi);
2402-
status = xlnx_hdmi_ddcwrite_field(hdmi,
2403-
HDMI_TX_SCDC_FIELD_FLT_UPDATE, 1);
2402+
2403+
if (hdmi->stream.frl_config.max_frl_rate > 1) {
2404+
hdmi->config.max_frl_rate = hdmi->config.max_frl_rate - 1;
2405+
hdmi->stream.sink_max_linerate =
2406+
rate_table[hdmi->config.max_frl_rate].linerate;
2407+
hdmi->stream.sink_max_lanes = rate_table[hdmi->config.max_frl_rate].lanes;
2408+
status = 0;
2409+
} else {
2410+
status = 1;
2411+
}
2412+
24042413
if (!status) {
24052414
status = xlnx_hdmi_ddcwrite_field(hdmi,
2406-
HDMI_TX_SCDC_FIELD_FLT_UPDATE,
2407-
1);
2415+
HDMI_TX_SCDC_FIELD_FLT_UPDATE, 1);
24082416
if (!status) {
24092417
hdmi->stream.frl_config.timer_cnt = 0;
24102418
hdmi->stream.frl_config.frl_train_states =
24112419
HDMI_TX_FRLSTATE_LTS_3_ARM;
2412-
xlnx_hdmi_frl_execute(hdmi);
2413-
return status;
2420+
xlnx_hdmi_frl_config(hdmi);
24142421
}
2422+
} else {
2423+
hdmi->stream.frl_config.timer_cnt = 0;
2424+
hdmi->stream.frl_config.frl_train_states = HDMI_TX_FRLSTATE_LTS_L;
2425+
xlnx_hdmi_set_frl_timer(hdmi, TIMEOUT_10US);
24152426
}
24162427

2417-
hdmi->stream.frl_config.timer_cnt = 0;
2418-
hdmi->stream.frl_config.frl_train_states = HDMI_TX_FRLSTATE_LTS_L;
2419-
xlnx_hdmi_set_frl_timer(hdmi, TIMEOUT_10US);
24202428
xlnx_hdmi_frl_execute(hdmi);
24212429

24222430
return status;

0 commit comments

Comments
 (0)