From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
Andy Yan <andy.yan@rock-chips.com>,
Fabio Estevam <fabio.estevam@freescale.com>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Nickey Yang <nickey.yang@rock-chips.com>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v4 7/9] drm: bridge: dw-hdmi: Add support for custom PHY configuration
Date: Thu, 02 Mar 2017 17:38:51 +0200 [thread overview]
Message-ID: <20121862.XIvFFZlWoF@avalon> (raw)
In-Reply-To: <a0fa074e-500e-e290-4b8b-7f6cdedaee6f@synopsys.com>
Hi Jose,
On Thursday 02 Mar 2017 14:50:02 Jose Abreu wrote:
> On 02-03-2017 13:41, Laurent Pinchart wrote:
> >> Hmm, this is kind of confusing. Why do you need a phy_ops and
> >> then a separate configure_phy function? Can't we just use phy_ops
> >> always? If its external phy then it would need to implement all
> >> phy_ops functions.
> >
> > The phy_ops are indeed meant to support vendor PHYs. The .configure_phy()
> > operation is meant to support Synopsys PHYs that don't comply with the
> > HDMI TX MHL and 3D PHYs I2C register layout and thus need a different
> > configure function, but can share the other operations with the HDMI TX
> > MHL and 3D PHYs. Ideally I'd like to move that code to the dw-hdmi core,
> > but at the moment I don't have enough information to decide whether the
> > register layout corresponds to the standard Synopsys HDMI TX 2.0 PHY or
> > if it has been modified by the vendor. Once we'll have a second SoC using
> > the same PHY we should have more information to consolidate the code. Of
> > course, if you can share the HDMI TX 2.0 PHY datasheet, I won't mind
> > reworking the code now ;-)
>
> Well, if I want to keep my job I can't share the datasheet, and I
> do want to keep my job :)
That's so selfish :-D
> As far as I know this shouldn't change much. I already used (it
> was like a year ago) the dw-hdmi driver in a HDMI TX 2.0 PHY.
I really wonder what exactly has been integrated in the Renesas R-Car Gen3
SoC. The PHY is certainly reported as an HDMI TX 2.0 PHY, but the registers
seem different compared to the 2.0 PHY you've tested.
> But I am not following your logic here, sorry: You are mentioning a
> custom phy, right?
Custom is probably a bad name. From what I've been told it's a standard
Synopsys PHY, but I can't rule out vendor-specific customizations.
> If its custom then it should implement its own phy_ops. And I don't think
> that phy logic should go into core, this should all be extracted because I
> really believe it will make the code easier to read. Imagine this
> organization:
>
> Folders/Files:
> drm/bridge/dw-hdmi/dw-hdmi-core.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-synopsys.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-*renesas*.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-something.c
> Structures:
> dw_hdmi_pdata
> dw_hdmi_phy_pdata
> dw_hdmi_phy_ops
That looks good to me.
> As the phy is interacted using controller we would need to pass
> some callbacks to the phy, but ultimately the phy would be a
> platform driver which could have its own compatible string that
> would be associated with controller (not sure exactly about this
> because I only used this in non-dt).
We already have glue code, having to provide separate glue and PHY drivers
seems a bit overkill to me. If we could get rid of glue code by adding a node
for the PHY in DT that would be nice, but if we have to keep the glue then we
can as well use platform data there.
> This is just an idea though. I followed this logic in the RX side
> and its very easy to add a new phy now, its a matter of creating
> a new file, implement ops and associate it with controller. Of
> course some phys will be very similar, for that we can use minor
> tweaks via id detection.
>
> What do you think?
It sounds neat overall, but I wonder whether it should really block this
series, or be added on top of it :-) I think we're already moving in the right
direction here.
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Kieran Bingham <kieran.bingham@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
Nickey Yang <nickey.yang@rock-chips.com>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Andy Yan <andy.yan@rock-chips.com>,
Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Subject: Re: [PATCH v4 7/9] drm: bridge: dw-hdmi: Add support for custom PHY configuration
Date: Thu, 02 Mar 2017 17:38:51 +0200 [thread overview]
Message-ID: <20121862.XIvFFZlWoF@avalon> (raw)
In-Reply-To: <a0fa074e-500e-e290-4b8b-7f6cdedaee6f@synopsys.com>
Hi Jose,
On Thursday 02 Mar 2017 14:50:02 Jose Abreu wrote:
> On 02-03-2017 13:41, Laurent Pinchart wrote:
> >> Hmm, this is kind of confusing. Why do you need a phy_ops and
> >> then a separate configure_phy function? Can't we just use phy_ops
> >> always? If its external phy then it would need to implement all
> >> phy_ops functions.
> >
> > The phy_ops are indeed meant to support vendor PHYs. The .configure_phy()
> > operation is meant to support Synopsys PHYs that don't comply with the
> > HDMI TX MHL and 3D PHYs I2C register layout and thus need a different
> > configure function, but can share the other operations with the HDMI TX
> > MHL and 3D PHYs. Ideally I'd like to move that code to the dw-hdmi core,
> > but at the moment I don't have enough information to decide whether the
> > register layout corresponds to the standard Synopsys HDMI TX 2.0 PHY or
> > if it has been modified by the vendor. Once we'll have a second SoC using
> > the same PHY we should have more information to consolidate the code. Of
> > course, if you can share the HDMI TX 2.0 PHY datasheet, I won't mind
> > reworking the code now ;-)
>
> Well, if I want to keep my job I can't share the datasheet, and I
> do want to keep my job :)
That's so selfish :-D
> As far as I know this shouldn't change much. I already used (it
> was like a year ago) the dw-hdmi driver in a HDMI TX 2.0 PHY.
I really wonder what exactly has been integrated in the Renesas R-Car Gen3
SoC. The PHY is certainly reported as an HDMI TX 2.0 PHY, but the registers
seem different compared to the 2.0 PHY you've tested.
> But I am not following your logic here, sorry: You are mentioning a
> custom phy, right?
Custom is probably a bad name. From what I've been told it's a standard
Synopsys PHY, but I can't rule out vendor-specific customizations.
> If its custom then it should implement its own phy_ops. And I don't think
> that phy logic should go into core, this should all be extracted because I
> really believe it will make the code easier to read. Imagine this
> organization:
>
> Folders/Files:
> drm/bridge/dw-hdmi/dw-hdmi-core.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-synopsys.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-*renesas*.c
> drm/bridge/dw-hdmi/dw-hdmi-phy-something.c
> Structures:
> dw_hdmi_pdata
> dw_hdmi_phy_pdata
> dw_hdmi_phy_ops
That looks good to me.
> As the phy is interacted using controller we would need to pass
> some callbacks to the phy, but ultimately the phy would be a
> platform driver which could have its own compatible string that
> would be associated with controller (not sure exactly about this
> because I only used this in non-dt).
We already have glue code, having to provide separate glue and PHY drivers
seems a bit overkill to me. If we could get rid of glue code by adding a node
for the PHY in DT that would be nice, but if we have to keep the glue then we
can as well use platform data there.
> This is just an idea though. I followed this logic in the RX side
> and its very easy to add a new phy now, its a matter of creating
> a new file, implement ops and associate it with controller. Of
> course some phys will be very similar, for that we can use minor
> tweaks via id detection.
>
> What do you think?
It sounds neat overall, but I wonder whether it should really block this
series, or be added on top of it :-) I think we're already moving in the right
direction here.
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-03-02 16:34 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 22:39 [PATCH v4 0/9] drm: bridge: dw-hdmi: Refactor PHY support Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-01 22:39 ` [PATCH v4 1/9] drm: bridge: dw-hdmi: Remove unused functions Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:19 ` Jose Abreu
2017-03-02 12:19 ` Jose Abreu
2017-03-03 6:30 ` Nickey.Yang
2017-03-03 6:30 ` Nickey.Yang
2017-03-01 22:39 ` [PATCH v4 2/9] drm: bridge: dw-hdmi: Move CSC configuration out of PHY code Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:21 ` Jose Abreu
2017-03-02 12:21 ` Jose Abreu
2017-03-01 22:39 ` [PATCH v4 3/9] drm: bridge: dw-hdmi: Enable CSC even for DVI Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-01 22:39 ` [PATCH v4 4/9] drm: bridge: dw-hdmi: Fix the PHY power down sequence Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:27 ` Jose Abreu
2017-03-02 12:27 ` Jose Abreu
2017-03-01 22:39 ` [PATCH v4 5/9] drm: bridge: dw-hdmi: Fix the PHY power up sequence Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:30 ` Jose Abreu
2017-03-02 12:30 ` Jose Abreu
2017-03-01 22:39 ` [PATCH v4 6/9] drm: bridge: dw-hdmi: Create PHY operations Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:34 ` Jose Abreu
2017-03-02 12:34 ` Jose Abreu
2017-03-01 22:39 ` [PATCH v4 7/9] drm: bridge: dw-hdmi: Add support for custom PHY configuration Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:50 ` Jose Abreu
2017-03-02 12:50 ` Jose Abreu
2017-03-02 13:41 ` Laurent Pinchart
2017-03-02 13:41 ` Laurent Pinchart
2017-03-02 14:50 ` Jose Abreu
2017-03-02 14:50 ` Jose Abreu
2017-03-02 15:38 ` Laurent Pinchart [this message]
2017-03-02 15:38 ` Laurent Pinchart
2017-03-03 15:57 ` Jose Abreu
2017-03-03 15:57 ` Jose Abreu
2017-03-03 16:56 ` Laurent Pinchart
2017-03-03 16:56 ` Laurent Pinchart
2017-03-01 22:39 ` [PATCH v4 8/9] drm: bridge: dw-hdmi: Remove device type from platform data Laurent Pinchart
2017-03-01 22:39 ` Laurent Pinchart
2017-03-02 12:51 ` Jose Abreu
2017-03-02 12:51 ` Jose Abreu
2017-03-01 22:39 ` [PATCH v4 9/9] drm: bridge: dw-hdmi: Switch to regmap for register access Laurent Pinchart
2017-03-02 11:27 ` [PATCH v4 0/9] drm: bridge: dw-hdmi: Refactor PHY support Neil Armstrong
2017-03-02 11:27 ` Neil Armstrong
2017-03-02 11:30 ` Laurent Pinchart
2017-03-02 11:30 ` Laurent Pinchart
2017-03-03 16:50 ` [PATCH] drm: bridge: dw-hdmi: Move the driver to a separate directory Laurent Pinchart
2017-03-03 16:59 ` Jose Abreu
2017-03-03 17:04 ` Laurent Pinchart
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=20121862.XIvFFZlWoF@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=Jose.Abreu@synopsys.com \
--cc=andy.yan@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@freescale.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=nickey.yang@rock-chips.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=vladimir_zapolskiy@mentor.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.