Skip to content

Commit d379321

Browse files
committed
drm/vc4: hdmi: Take the sink maximum TMDS clock into account
In the function that validates that the clock isn't too high, we've only taken our controller limitations into account so far. However, the sink can have a limit on the maximum TMDS clock it can deal with too which is exposed through the EDID and the drm_display_info. Make sure we check it. Signed-off-by: Maxime Ripard <[email protected]>
1 parent 52b8566 commit d379321

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,12 +1252,18 @@ static enum drm_mode_status
12521252
vc4_hdmi_encoder_clock_valid(const struct vc4_hdmi *vc4_hdmi,
12531253
unsigned long long clock)
12541254
{
1255+
const struct drm_connector *connector = &vc4_hdmi->connector;
1256+
const struct drm_display_info *info = &connector->display_info;
1257+
12551258
if (clock > vc4_hdmi->variant->max_pixel_clock)
12561259
return MODE_CLOCK_HIGH;
12571260

12581261
if (vc4_hdmi->disable_4kp60 && clock > HDMI_14_MAX_TMDS_CLK)
12591262
return MODE_CLOCK_HIGH;
12601263

1264+
if (clock > (info->max_tmds_clock * 1000))
1265+
return MODE_CLOCK_HIGH;
1266+
12611267
return MODE_OK;
12621268
}
12631269

0 commit comments

Comments
 (0)