Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 2/2] drm/i915: properly implement doubleclocked hdmi modes
Date: Sun, 13 May 2012 00:07:51 +0200	[thread overview]
Message-ID: <1336860471-7129-2-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1336860471-7129-1-git-send-email-daniel.vetter@ffwll.ch>

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 the 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.

v2: Fix up English fail in the commit message a bit.

Signed-Off-by: Daniel Vetter <daniel.vetter@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

  reply	other threads:[~2012-05-12 22:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12 22:07 [PATCH 1/2] drm/edid: adjust double-clocked cea modes Daniel Vetter
2012-05-12 22:07 ` Daniel Vetter [this message]
2012-05-14 17:37 ` Adam Jackson
2012-05-14 19:29   ` Paulo Zanoni
2012-05-14 19:43     ` Paulo Zanoni
2012-05-15 15:33       ` Adam Jackson
2012-05-15 18:50         ` mesa compile error Kong, Bertrand C
2012-05-16  1:47           ` Eugeni Dodonov
2012-05-18 20:28             ` Kong, Bertrand C
2012-05-19 18:29         ` [PATCH 1/2] drm/edid: adjust double-clocked cea modes Daniel Vetter
2012-05-14 19:55 ` Paulo Zanoni
2012-05-20 15:59   ` Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2012-05-12 22:02 Daniel Vetter
2012-05-12 22:02 ` [PATCH 2/2] drm/i915: properly implement doubleclocked hdmi modes Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336860471-7129-2-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox