950-0655-drm-vc4-hdmi-Fix-clock-value-used-for-validating-hdm.patch 988 B

1234567891011121314151617181920212223242526272829
  1. From f285cba93ac9425078740d20456f34c94ad7511c Mon Sep 17 00:00:00 2001
  2. From: Dom Cobley <[email protected]>
  3. Date: Thu, 13 Jan 2022 15:47:23 +0000
  4. Subject: [PATCH] drm/vc4: hdmi: Fix clock value used for validating
  5. hdmi modes
  6. We are using mode->crt_clock here which is filled by drm_mode_set_crtcinfo()
  7. which is called right after .mode_valid.
  8. Use mode->clock which is valid here.
  9. Fixes: 624d93a4f0 ("drm/vc4: hdmi: Move clock calculation into its own function")
  10. Signed-off-by: Dom Cobley <[email protected]>
  11. ---
  12. drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
  15. +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
  16. @@ -1497,7 +1497,7 @@ vc4_hdmi_encoder_compute_mode_clock(cons
  17. unsigned int bpc,
  18. enum vc4_hdmi_output_format fmt)
  19. {
  20. - unsigned long long clock = mode->crtc_clock * 1000;
  21. + unsigned long long clock = mode->clock * 1000;
  22. if (mode->flags & DRM_MODE_FLAG_DBLCLK)
  23. clock = clock * 2;