diff mbox

drm/bridge: tc358767: fix probe without attached output node

Message ID 20170710124125.9019-1-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach July 10, 2017, 12:41 p.m. UTC
The output node of the TC358767 is only used if another bridge is chained
behind it. Panels attached to the TC358767 can be detected using the usual
DP AUX probing. This restores the old behavior of ignoring the output if
no endpoint is found.

Fixes: ebc944613567 (drm: convert drivers to use drm_of_find_panel_or_bridge)
CC: stable@vger.kernel.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/bridge/tc358767.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrey Gusakov July 27, 2017, 12:56 p.m. UTC | #1
Hi,

On Mon, Jul 10, 2017 at 3:41 PM, Lucas Stach <l.stach@pengutronix.de> wrote:

> The output node of the TC358767 is only used if another bridge is chained
> behind it. Panels attached to the TC358767 can be detected using the usual
> DP AUX probing. This restores the old behavior of ignoring the output if
> no endpoint is found.
>
> Fixes: ebc944613567 (drm: convert drivers to use
> drm_of_find_panel_or_bridge)
> CC: stable@vger.kernel.org
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>

Acked-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>

---
>  drivers/gpu/drm/bridge/tc358767.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/tc358767.c
> b/drivers/gpu/drm/bridge/tc358767.c
> index 5c26488e7a2d..0529e500c534 100644
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
> @@ -1255,7 +1255,7 @@ static int tc_probe(struct i2c_client *client, const
> struct i2c_device_id *id)
>
>         /* port@2 is the output port */
>         ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &tc->panel,
> NULL);
> -       if (ret)
> +       if (ret && ret != -ENODEV)
>                 return ret;
>
>         /* Shut down GPIO is optional */
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
Archit Taneja July 28, 2017, 4:19 a.m. UTC | #2
On 07/27/2017 06:26 PM, Andrey Gusakov wrote:
> Hi,
> 
> On Mon, Jul 10, 2017 at 3:41 PM, Lucas Stach <l.stach@pengutronix.de 
> <mailto:l.stach@pengutronix.de>> wrote:
> 
>     The output node of the TC358767 is only used if another bridge is chained
>     behind it. Panels attached to the TC358767 can be detected using the usual
>     DP AUX probing. This restores the old behavior of ignoring the output if
>     no endpoint is found.
> 
>     Fixes: ebc944613567 (drm: convert drivers to use drm_of_find_panel_or_bridge)
>     CC: stable@vger.kernel.org <mailto:stable@vger.kernel.org>
>     Signed-off-by: Lucas Stach <l.stach@pengutronix.de <mailto:l.stach@pengutronix.de>>
> 
> 
> Acked-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com <mailto:andrey.gusakov@cogentembedded.com>>

Thanks, queued to drm-misc-fixes.

Archit

> 
>     ---
>       drivers/gpu/drm/bridge/tc358767.c | 2 +-
>       1 file changed, 1 insertion(+), 1 deletion(-)
> 
>     diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
>     index 5c26488e7a2d..0529e500c534 100644
>     --- a/drivers/gpu/drm/bridge/tc358767.c
>     +++ b/drivers/gpu/drm/bridge/tc358767.c
>     @@ -1255,7 +1255,7 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
> 
>              /* port@2 is the output port */
>              ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &tc->panel, NULL);
>     -       if (ret)
>     +       if (ret && ret != -ENODEV)
>                      return ret;
> 
>              /* Shut down GPIO is optional */
>     --
>     2.11.0
> 
>     _______________________________________________
>     dri-devel mailing list
>     dri-devel@lists.freedesktop.org <mailto:dri-devel@lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/dri-devel
>     <https://lists.freedesktop.org/mailman/listinfo/dri-devel>
> 
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 5c26488e7a2d..0529e500c534 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1255,7 +1255,7 @@  static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
 
 	/* port@2 is the output port */
 	ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &tc->panel, NULL);
-	if (ret)
+	if (ret && ret != -ENODEV)
 		return ret;
 
 	/* Shut down GPIO is optional */