From: Dom Cobley Date: Thu, 13 Jan 2022 15:47:23 +0000 (+0000) Subject: drm/vc4: hdmi: Fix clock value used for validating hdmi modes X-Git-Tag: submit/tizen/20220208.074352~332 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd1b7bebe7248d9caae337e0b02e42ec0522745a;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: hdmi: Fix clock value used for validating hdmi modes We are using mode->crt_clock here which is filled by drm_mode_set_crtcinfo() which is called right after .mode_valid. Use mode->clock which is valid here. Fixes: 624d93a4f0 ("drm/vc4: hdmi: Move clock calculation into its own function") Signed-off-by: Dom Cobley --- diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index ccfcfce..d71cd43 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1496,7 +1496,7 @@ vc4_hdmi_encoder_compute_mode_clock(const struct drm_display_mode *mode, unsigned int bpc, enum vc4_hdmi_output_format fmt) { - unsigned long long clock = mode->crtc_clock * 1000; + unsigned long long clock = mode->clock * 1000; if (mode->flags & DRM_MODE_FLAG_DBLCLK) clock = clock * 2;