linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Nicolas Boichat <drinkcat@chromium.org>
Cc: "Archit Taneja" <architt@codeaurora.org>,
	dri-devel@lists.freedesktop.org,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	linux-kernel@vger.kernel.org,
	"Enric Balletbo i Serra" <enric.balletbo@collabora.com>,
	"Russell King" <rmk+kernel@arm.linux.org.uk>,
	"Thierry Reding" <treding@nvidia.com>
Subject: Re: [RFC PATCH 1/2] drm: bridge: anx7688: Add anx7688 bridge driver support.
Date: Wed, 22 Jun 2016 10:51:49 +0200	[thread overview]
Message-ID: <1466585509.4123.23.camel@pengutronix.de> (raw)
In-Reply-To: <CANMq1KAZhV2FKNVyqOMs0K3ipjSQ=7CW47v4UPDdN2UYgTaVdQ@mail.gmail.com>

Hi Nicolas,

Am Mittwoch, den 22.06.2016, 14:32 +0800 schrieb Nicolas Boichat:
> >> Actually, experimenting a bit more with the code, I realized that the
> >> connector is always attached to the encoder, not the bridge, so the 2
> >> layouts above are actually identical (from the userspace point of
> >> view). Except that the connector name should be HDMI in one case, and
> >> DP in the other. But I think that's mostly a cosmetic difference?
> >
> >
> > Yeah, probably. I don't know what exactly the userspace does with
> > the connector type, but it would be nice to represent it as a DP
> > connector in case it makes any decisions based on it.
> 
> AFAICT does not matter... And, in any case, USB-C to HDMI adapters are
> far more common (so we'd do HDMI->(DP over USB-C)->HDMI....), so there
> is a high change that advertising as DP would be wrong (and
> advertising as HDMI would be correct by chance...).

If anything it should be represented as an USB-C connector, whatever
USB-C(DP)->HDMI->VGA adapter chain is connected externally shouldn't
matter.

> >>> One way I can think of fixing this is to make make the MTK hdmi
> >>> encoder driver a bit smarter by observing the DT connections. If
> >>> it's output port is connected to just a hdmi-connector, then
> >>> things should be as before. If the output is connected to the DP
> >>> bridge, then it should create a DP connector. The connector ops
> >>> for the DP connector can still be the same as that of the HDMI
> >>> connector before, but the phandle to the DDC bus would be in the
> >>> DP device node in this case.
> >>
> >>
> >> I think it'd be a bit weird to have the DDC bus phandle on the DP
> >> connector, as we're not reading the EDID on the DP side of the bridge,
> >> but on the HDMI side (and the bridge can do all sort of things to the
> >> EDID: At the very least, I think it caches it).
>>
> > On the board, do the DDC lines join directly from the SoC pins to the
> > DP connector, or does it go via the ANX7688 chip?
> 
> The DDC/I2C lines go to the ANX7688 chip. (DP has AUX channel instead)

The anx7688 should get the i2c-ddc-bus property then, and the driver
should use it to implement get_modes (or its bridge API equivalent, once
it exists).

> > Even with the current bindings (referred from the link below), the
> > hdmi connector has the DDC node. Shouldn't it be the same in the DP
> > case too? The DP connector, like before, is still manged by the HDMI
> > driver, the only difference being the name and that it's two hops away
> > in the DT bindings.
> >
> > https://patchwork.kernel.org/patch/9137089/
> 
> True, the bindings say so, but the current code actually looks for
> ddc-i2c-bus property in whatever is connected on the endpoint (be it a
> bridge or a connector).

The HDMI driver only handles this itself because there are no separate
connector drivers (or helpers) to do this. Ideally the HDMI driver
shouldn't have to parse the connector DT node.

> And again, a bit odd as DP connector does not have true I2C lines...
> 
> Phillip? Any opinion?

Make the HDMI driver leave the bridges' DT node alone and let the bridge
handle DDC, if that's where it is connected physically.

regards
Philipp

  reply	other threads:[~2016-06-22  8:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20  7:14 [RFC PATCH 1/2] drm: bridge: anx7688: Add anx7688 bridge driver support Nicolas Boichat
2016-06-20  7:14 ` [RFC PATCH 2/2] devicetree: Add ANX7688 transmitter binding Nicolas Boichat
2016-06-21 15:39 ` [RFC PATCH 1/2] drm: bridge: anx7688: Add anx7688 bridge driver support Archit Taneja
2016-06-22  2:44   ` Nicolas Boichat
2016-06-22  3:54     ` Archit Taneja
2016-06-22  6:32       ` Nicolas Boichat
2016-06-22  8:51         ` Philipp Zabel [this message]
2016-06-23  4:08           ` Nicolas Boichat
2016-06-23  9:18             ` Philipp Zabel

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=1466585509.4123.23.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drinkcat@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcheu@chromium.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=treding@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).