linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm: rcar_lvds: Fix dual link mode operations
@ 2019-08-05 16:18 Jacopo Mondi
  2019-08-05 17:17 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Jacopo Mondi @ 2019-08-05 16:18 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	fabrizio.castro
  Cc: Jacopo Mondi, open list:DRM DRIVERS FOR RENESAS,
	open list:DRM DRIVERS FOR RENESAS, open list

The R-Car LVDS encoder units support dual-link operations by splitting
the pixel output between the primary encoder and the companion one.

Currently the companion encoder fails at probe time, causing the
registration of the primary to fail as well, preventing the whole DU unit
from being registered at all.

Fix this by not bailing out from probe with error if the
"renesas,companion" property is not specified.

Fixes: fa440d870358 ("drm: rcar-du: lvds: Add support for dual-link mode")
Reported-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/gpu/drm/rcar-du/rcar_lvds.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
index bada7ee98544..0b872d00760b 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -662,10 +662,8 @@ static int rcar_lvds_parse_dt_companion(struct rcar_lvds *lvds)

 	/* Locate the companion LVDS encoder for dual-link operation, if any. */
 	companion = of_parse_phandle(dev->of_node, "renesas,companion", 0);
-	if (!companion) {
-		dev_err(dev, "Companion LVDS encoder not found\n");
-		return -ENXIO;
-	}
+	if (!companion)
+		return 0;

 	/*
 	 * Sanity check: the companion encoder must have the same compatible
--
2.22.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm: rcar_lvds: Fix dual link mode operations
  2019-08-05 16:18 [PATCH v2] drm: rcar_lvds: Fix dual link mode operations Jacopo Mondi
@ 2019-08-05 17:17 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2019-08-05 17:17 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, fabrizio.castro,
	open list:DRM DRIVERS FOR RENESAS,
	open list:DRM DRIVERS FOR RENESAS, open list

Hi Jacopo,

Thank you for the patch.

On Mon, Aug 05, 2019 at 06:18:37PM +0200, Jacopo Mondi wrote:
> The R-Car LVDS encoder units support dual-link operations by splitting
> the pixel output between the primary encoder and the companion one.

s/companion one/companion encoder/

> Currently the companion encoder fails at probe time, causing the
> registration of the primary to fail as well, preventing the whole DU unit
> from being registered at all.
> 
> Fix this by not bailing out from probe with error if the
> "renesas,companion" property is not specified.
> 
> Fixes: fa440d870358 ("drm: rcar-du: lvds: Add support for dual-link mode")
> Reported-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree, thank you.

> ---
>  drivers/gpu/drm/rcar-du/rcar_lvds.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> index bada7ee98544..0b872d00760b 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> @@ -662,10 +662,8 @@ static int rcar_lvds_parse_dt_companion(struct rcar_lvds *lvds)
> 
>  	/* Locate the companion LVDS encoder for dual-link operation, if any. */
>  	companion = of_parse_phandle(dev->of_node, "renesas,companion", 0);
> -	if (!companion) {
> -		dev_err(dev, "Companion LVDS encoder not found\n");
> -		return -ENXIO;
> -	}
> +	if (!companion)
> +		return 0;
> 
>  	/*
>  	 * Sanity check: the companion encoder must have the same compatible

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-05 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 16:18 [PATCH v2] drm: rcar_lvds: Fix dual link mode operations Jacopo Mondi
2019-08-05 17:17 ` Laurent Pinchart

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).