All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Doug Anderson <dianders@chromium.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	Thierry Reding <treding@nvidia.com>,
	Heiko Stuebner <heiko@sntech.de>, 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"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI
Date: Thu, 18 Jun 2015 17:09:15 +0100	[thread overview]
Message-ID: <20150618160915.GA16638@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20150618155545.GQ7557@n2100.arm.linux.org.uk>

On Thu, Jun 18, 2015 at 04:55:45PM +0100, Russell King - ARM Linux wrote:
> On Thu, Jun 18, 2015 at 08:26:39AM -0700, Doug Anderson wrote:
> > Perhaps you can try <https://patchwork.kernel.org/patch/5906771/>
> 
> Something like that needs to be done, but let's get rid of the mdvi
> thing in struct hdmi_vmode - it doesn't belong there, it isn't part
> of the currently set video mode, but becomes a property of the
> connected sink.
> 
> I'd also prefer it to be called "is_dvi_sink", especially as its
> function is changing from "is it a CEA mode" to "is the attached
> device a DVI sink".
> 
> Even better would be to call it "is_hdmi_sink" to maintain positive
> logic with single-negation where required, rather than double-
> negation in places.

This is actually a _very_ important point.  Changing the function of
mdvi when it's used in multiple places throughout the driver is not on -
it's too big a change:

        /*check csc whether needed activated in HDMI mode */
        cscon = (is_color_space_conversion(hdmi) &&
                        !hdmi->hdmi_data.video_mode.mdvi);

        inv_val |= (vmode->mdvi ?
                HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE :
                HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE);

        if (hdmi->cable_plugin && !hdmi->hdmi_data.video_mode.mdvi)
                hdmi_enable_overflow_interrupts(hdmi);

It's unclear what the effect would be to change the meaning of mdvi
from "this is a CEA mode" to "the attached device is DVI" in all these
locations, and it's just not on to do this in a patch which merely
says:

   If the monitor support audio, so we should support audio for it, even if
   the display resolution is No-CEA mode.

In other words, doesn't even describe this change.

In any case, this patch has been dropped from more recent audio driver
series.

So, what I'd like to see is a patch series which starts with the change
below, and builds on that, with explainations why each change is needed.
This is important, as this is shared IP, and we need to make sure that
we don't regress non-Rockchip users of this IP.  I'll try and do some
work in this area if nothing crops up in the next month.

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

diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 49cafb61d290..8834e8142ea6 100644
--- a/drivers/gpu/drm/bridge/dw_hdmi.c
+++ b/drivers/gpu/drm/bridge/dw_hdmi.c
@@ -119,6 +119,8 @@ struct dw_hdmi {
 
 	u8 edid[HDMI_EDID_LEN];
 	bool cable_plugin;
+	bool sink_is_hdmi;
+	bool sink_has_audio;
 
 	bool phy_enabled;
 	struct drm_display_mode previous_mode;
@@ -1402,6 +1404,9 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
 
 	edid = drm_get_edid(connector, hdmi->ddc);
 	if (edid) {
+		hdmi->sink_is_hdmi = drm_detect_hdmi_monitor(edid);
+		hdmi->sink_has_audio = drm_detect_monitor_audio(edid);
+
 		dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
 			edid->width_cm, edid->height_cm);
 


-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-06-18 16:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 23:14 [PATCH] drm: bridge/dw_hdmi: Filter modes > 165MHz for DVI Doug Anderson
2015-06-17 23:30 ` 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 [this message]
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=20150618160915.GA16638@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=airlied@linux.ie \
    --cc=andy.yan@rock-chips.com \
    --cc=dianders@chromium.org \
    --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=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.