All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Thierry Reding <treding@nvidia.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Doug Anderson <dianders@chromium.org>,
	David Airlie <airlied@linux.ie>,
	Andy Yan <andy.yan@rock-chips.com>,
	Yakir Yang <ykk@rock-chips.com>,
	Fabio Estevam <fabio.estevam@freescale.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI
Date: Wed, 17 Jun 2015 16:14:07 -0700	[thread overview]
Message-ID: <1434582847-713-1-git-send-email-dianders@chromium.org> (raw)

If you plug in a DVI monitor to your HDMI port, you need to filter out
clocks > 165MHz.  That's because 165MHz is the maximum clock rate that
we can run single-link DVI at.

If you want to run high resolutions to DVI, you'd need some type of an
active adapter that pretended that it was HDMI, interpreted the
signal, and produced a new dual link DVI signal at a lower clock rate.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
Note: this patch was tested against a 3.14 kernel with backports.  It
was only compile tested against linuxnext, but the code is
sufficiently similar that I'm convinced it will work there.

 drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 816d104..48b8532 100644
--- a/drivers/gpu/drm/bridge/dw_hdmi.c
+++ b/drivers/gpu/drm/bridge/dw_hdmi.c
@@ -1421,8 +1421,12 @@ dw_hdmi_connector_mode_valid(struct drm_connector *connector,
 {
 	struct dw_hdmi *hdmi = container_of(connector,
 					   struct dw_hdmi, connector);
+	struct hdmi_vmode *vmode = &hdmi->hdmi_data.video_mode;
 	enum drm_mode_status mode_status = MODE_OK;
 
+	if (mode->clock > 165000 && vmode->mdvi)
+		return MODE_BAD;
+
 	if (hdmi->plat_data->mode_valid)
 		mode_status = hdmi->plat_data->mode_valid(connector, mode);
 
-- 
2.4.3.573.g4eafbef


             reply	other threads:[~2015-06-17 23:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 23:14 Doug Anderson [this message]
2015-06-17 23:30 ` [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI Russell King - ARM Linux
2015-06-17 23:30   ` Russell King - ARM Linux
2015-06-18  2:52   ` Doug Anderson
2015-06-18  8:53     ` Russell King - ARM Linux
2015-06-18  8:53       ` Russell King - ARM Linux
2015-06-18 15:26       ` Doug Anderson
2015-06-18 15:55         ` Russell King - ARM Linux
2015-06-18 15:55           ` Russell King - ARM Linux
2015-06-18 16:09           ` Russell King - ARM Linux
2015-06-18 16:22             ` Doug Anderson
2015-06-18 16:10           ` Doug Anderson
2015-06-19  1:31             ` Yakir Yang
2015-06-19  1:31               ` Yakir Yang

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=1434582847-713-1-git-send-email-dianders@chromium.org \
    --to=dianders@chromium.org \
    --cc=airlied@linux.ie \
    --cc=andy.yan@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@freescale.com \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=treding@nvidia.com \
    --cc=ykk@rock-chips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.