From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751619AbbFRCwY (ORCPT ); Wed, 17 Jun 2015 22:52:24 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:36247 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbbFRCwQ (ORCPT ); Wed, 17 Jun 2015 22:52:16 -0400 MIME-Version: 1.0 In-Reply-To: <20150617233040.GE7557@n2100.arm.linux.org.uk> References: <1434582847-713-1-git-send-email-dianders@chromium.org> <20150617233040.GE7557@n2100.arm.linux.org.uk> Date: Wed, 17 Jun 2015 19:52:14 -0700 X-Google-Sender-Auth: 6VcWyOY-5LXh66QFcH8M68KZi9E Message-ID: Subject: Re: [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI From: Doug Anderson To: Russell King - ARM Linux Cc: Philipp Zabel , Thierry Reding , Heiko Stuebner , David Airlie , Andy Yan , Yakir Yang , Fabio Estevam , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Russell, On Wed, Jun 17, 2015 at 4:30 PM, Russell King - ARM Linux wrote: > On Wed, Jun 17, 2015 at 04:14:07PM -0700, Doug Anderson wrote: >> 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 >> --- >> 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. > > Really? I have to wonder what your testing was... > > hdmi->vic = drm_match_cea_mode(mode); > > if (!hdmi->vic) { > dev_dbg(hdmi->dev, "Non-CEA mode used in HDMI\n"); > hdmi->hdmi_data.video_mode.mdvi = true; > } else { > dev_dbg(hdmi->dev, "CEA mode used vic=%d\n", hdmi->vic); > hdmi->hdmi_data.video_mode.mdvi = false; > } > > mdvi indicates whether the _currently set mode_ is a CEA mode or not (imho, > it's mis-named). It doesn't indicate whether we have a HDMI display device > or a DVI display device connected, which seems to be what you want to use > it for below. > > To sort that, what you need to do is detect a HDMI display device using > drm_detect_hdmi_monitor() on the EDID received from the device before > parsing the modes, and save that value in a dw_hdmi struct member, and > I'd suggest that it's a top-level struct member, not buried in 'hdmi_data' > or 'video_mode'. OK, so clearly my patch won't work against mainline. I guess it's a good thing that I pointed out that it was only tested locally (would have been better to test against mainline, but I don't think that's so easy since there are several unlanded patches in mainline for Rockchip). As pointed out by others at , locally our kernel has a slightly older version of , which would change mdvi to be as needed. ...so I guess my change is blocked on someone reviewing/landing that series. If that series is rejected (or is changed sufficiently so that mdvi no longer is set via drm_detect_hdmi_monitor() then my patch will need to be re-spun. -Doug