[PATCH 2/2] drm/i915: properly implement doubleclocked hdmi modes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paulo Zanoni already fixed up the avi infoframes as mandated by CEA,
this patch here now ensures that we correctly scan out these
double-clocked modes.

Intel hw automatically doubles the pixels and clocks, hence we want
half wire pixel clock from the drm mode, but otherwise can take the
framebuffer timings as-is. The only other thing is to correctly set
the pixel-doubling, but that infrastructure already exist to support
low pixel-clocks on sdvo encoders.

I've tested this with a HDMI monitor that supports two of these
special modes, and everything looks correct now. Well, for the minor
fact that the screen applies some stupid overscan correction, but
that's something to fix up in another patch series.

Signed-Off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/intel_hdmi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 03b3524..ed81e96 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -424,6 +424,12 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
 				  struct drm_display_mode *mode,
 				  struct drm_display_mode *adjusted_mode)
 {
+	if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) {
+		intel_mode_set_pixel_multiplier(adjusted_mode, 2);
+
+		adjusted_mode->clock /= 2;
+	}
+
 	return true;
 }
 
-- 
1.7.9



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux