All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>,
	Octavian Purdila <octavian.purdila@nxp.com>
Subject: Re: [PATCH v3 4/5] drm: convert drivers to use drm_of_find_panel_or_bridge
Date: Tue, 9 May 2017 17:43:48 -0500	[thread overview]
Message-ID: <CAL_JsqLZin_8k=Sn4Q+SC5awGDAyz-_RvLkU-TZCAXngheKZ=A@mail.gmail.com> (raw)
In-Reply-To: <1494340101.24555.37.camel@nxp.com>

On Tue, May 9, 2017 at 9:28 AM, Leonard Crestez <leonard.crestez@nxp.com> wrote:
> On Wed, Mar 22, 2017 at 5:01 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
>> On Wed, 2017-03-22 at 08:26 -0500, Rob Herring wrote:
>> >
>> > Similar to the previous commit, convert drivers open coding OF graph
>> > parsing to use drm_of_find_panel_or_bridge instead.
>> >
>> > This changes some error messages to debug messages (in the graph core).
>> > Graph connections are often "no connects" depending on the particular
>> > board, so we want to avoid spurious messages. Plus the kernel is not a
>> > DT validator.
>> >
>> > Signed-off-by: Rob Herring <robh@kernel.org>
>> > Reviewed-by: Archit Taneja <architt@codeaurora.org>
>> Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
>> (imx-ldb on i.MX6)
>
> It seems that this breaks on (at least) imx6qdl-sabreauto. The relevant
> section of the boot log looks like this:
>
> imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
> imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
> dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.31a with HDCP
> (DWC HDMI 3D TX PHY)
> dwhdmi-imx 120000.hdmi: registered DesignWare HDMI I2C bus driver
> imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops)
> imx-drm display-subsystem: failed to bind 2000000.aips-bus:ldb (ops
> imx_ldb_ops): -19
> imx-drm display-subsystem: master bind failed: -19
>
> It seems that imx6qdl-sabreauto does not have any panel defined in dts.
> This used to be ignored when of_graph_get_endpoint_by_regs returned
> NULL but now drm_of_find_panel_or_bridge returns -ENODEV and this
> causes imx_ldb_bind to fail altogether. Defining a panel works
> (including showing stuff on a LVDS panel). Ignoring -ENODEV also fixes
> this:
>
> --- drivers/gpu/drm/imx/imx-ldb.c
> +++ drivers/gpu/drm/imx/imx-ldb.c
> @@ -673,7 +673,7 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
>                 ret = drm_of_find_panel_or_bridge(child,
>                                                   imx_ldb->lvds_mux ? 4 : 2, 0,
>                                                   &channel->panel, &channel->bridge);
> -               if (ret)
> +               if (ret != -ENODEV)
>                         return ret;
>
>                 /* panel ddc only if there is no bridge */
>
> I don't know much about drm and it's not clear if failing to find a
> panel should be an error here or not and the hack above is likely the
> wrong way to handle it anyway.

That looks like the right fix to me. Ideally, the DT should probably
define an LVDS connector node (if not a panel) in this case like we do
for other cases with DDC, but more importantly we shouldn't require a
DT update to fix things. If you needed power or gpio controls of the
panel you would also need some node in DT.

Do you mind sending a proper patch?

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Leonard Crestez <leonard.crestez@nxp.com>
Cc: Octavian Purdila <octavian.purdila@nxp.com>,
	Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/5] drm: convert drivers to use drm_of_find_panel_or_bridge
Date: Tue, 9 May 2017 17:43:48 -0500	[thread overview]
Message-ID: <CAL_JsqLZin_8k=Sn4Q+SC5awGDAyz-_RvLkU-TZCAXngheKZ=A@mail.gmail.com> (raw)
In-Reply-To: <1494340101.24555.37.camel@nxp.com>

On Tue, May 9, 2017 at 9:28 AM, Leonard Crestez <leonard.crestez@nxp.com> wrote:
> On Wed, Mar 22, 2017 at 5:01 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
>> On Wed, 2017-03-22 at 08:26 -0500, Rob Herring wrote:
>> >
>> > Similar to the previous commit, convert drivers open coding OF graph
>> > parsing to use drm_of_find_panel_or_bridge instead.
>> >
>> > This changes some error messages to debug messages (in the graph core).
>> > Graph connections are often "no connects" depending on the particular
>> > board, so we want to avoid spurious messages. Plus the kernel is not a
>> > DT validator.
>> >
>> > Signed-off-by: Rob Herring <robh@kernel.org>
>> > Reviewed-by: Archit Taneja <architt@codeaurora.org>
>> Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
>> (imx-ldb on i.MX6)
>
> It seems that this breaks on (at least) imx6qdl-sabreauto. The relevant
> section of the boot log looks like this:
>
> imx-drm display-subsystem: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)
> imx-drm display-subsystem: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)
> dwhdmi-imx 120000.hdmi: Detected HDMI TX controller v1.31a with HDCP
> (DWC HDMI 3D TX PHY)
> dwhdmi-imx 120000.hdmi: registered DesignWare HDMI I2C bus driver
> imx-drm display-subsystem: bound 120000.hdmi (ops dw_hdmi_imx_ops)
> imx-drm display-subsystem: failed to bind 2000000.aips-bus:ldb (ops
> imx_ldb_ops): -19
> imx-drm display-subsystem: master bind failed: -19
>
> It seems that imx6qdl-sabreauto does not have any panel defined in dts.
> This used to be ignored when of_graph_get_endpoint_by_regs returned
> NULL but now drm_of_find_panel_or_bridge returns -ENODEV and this
> causes imx_ldb_bind to fail altogether. Defining a panel works
> (including showing stuff on a LVDS panel). Ignoring -ENODEV also fixes
> this:
>
> --- drivers/gpu/drm/imx/imx-ldb.c
> +++ drivers/gpu/drm/imx/imx-ldb.c
> @@ -673,7 +673,7 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
>                 ret = drm_of_find_panel_or_bridge(child,
>                                                   imx_ldb->lvds_mux ? 4 : 2, 0,
>                                                   &channel->panel, &channel->bridge);
> -               if (ret)
> +               if (ret != -ENODEV)
>                         return ret;
>
>                 /* panel ddc only if there is no bridge */
>
> I don't know much about drm and it's not clear if failing to find a
> panel should be an error here or not and the hack above is likely the
> wrong way to handle it anyway.

That looks like the right fix to me. Ideally, the DT should probably
define an LVDS connector node (if not a panel) in this case like we do
for other cases with DDC, but more importantly we shouldn't require a
DT update to fix things. If you needed power or gpio controls of the
panel you would also need some node in DT.

Do you mind sending a proper patch?

Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-05-09 22:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 13:26 [PATCH v3 0/5] DRM OF graph clean-up Rob Herring
2017-03-22 13:26 ` Rob Herring
2017-03-22 13:26 ` [PATCH v3 1/5] drm: make of_drm_find_panel also depend on CONFIG_DRM_PANEL Rob Herring
2017-03-22 13:26   ` Rob Herring
2017-03-22 16:11   ` Eric Anholt
2017-03-22 13:26 ` [PATCH v3 2/5] drm: of: introduce drm_of_find_panel_or_bridge Rob Herring
2017-03-22 13:26   ` Rob Herring
2017-03-22 15:00   ` Philipp Zabel
2017-03-22 15:00     ` Philipp Zabel
2017-03-22 13:26 ` [PATCH v3 3/5] drm: convert drivers to use of_graph_get_remote_node Rob Herring
2017-03-22 13:26   ` Rob Herring
2017-03-22 13:26 ` [PATCH v3 4/5] drm: convert drivers to use drm_of_find_panel_or_bridge Rob Herring
2017-03-22 13:26   ` Rob Herring
2017-03-22 15:01   ` Philipp Zabel
2017-03-22 15:01     ` Philipp Zabel
2017-05-09 14:28     ` Leonard Crestez
2017-05-09 14:28       ` Leonard Crestez
2017-05-09 22:43       ` Rob Herring [this message]
2017-05-09 22:43         ` Rob Herring
2017-03-23  8:03   ` Maxime Ripard
2017-03-23  8:03     ` Maxime Ripard
2017-03-24 14:22   ` Sean Paul
2017-03-24 14:22     ` Sean Paul
2017-03-29 18:55   ` [PATCH v4 " Rob Herring
2017-03-29 18:55     ` Rob Herring
2017-03-22 13:26 ` [PATCH v3 5/5] drm: omap: use common OF graph helpers Rob Herring
2017-03-22 13:26   ` Rob Herring
2017-04-06 21:03 ` [PATCH v3 0/5] DRM OF graph clean-up Sean Paul
2017-04-06 21:03   ` Sean Paul

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='CAL_JsqLZin_8k=Sn4Q+SC5awGDAyz-_RvLkU-TZCAXngheKZ=A@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=cristina-mihaela.ciocan@nxp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=octavian.purdila@nxp.com \
    --cc=p.zabel@pengutronix.de \
    /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.