diff mbox

drm/tilcdc: Defer probe if no encoders/connectors found

Message ID 1387374961-11741-1-git-send-email-mpa@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Markus Pargmann Dec. 18, 2013, 1:56 p.m. UTC
At the moment this driver fails to load if no encoders/connectors were
found. In case other drivers that register encoders/connectors
(tilcdc_panel) are defered it would be better to check for
encoders/connectors later again. This patch replaces the returncode
-ENXIO with -EPROBE_DEFER to get a working setup even if tilcdc_panel
probes after tilcdc.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Clark Dec. 18, 2013, 3:01 p.m. UTC | #1
On Wed, Dec 18, 2013 at 8:56 AM, Markus Pargmann <mpa@pengutronix.de> wrote:
> At the moment this driver fails to load if no encoders/connectors were
> found. In case other drivers that register encoders/connectors
> (tilcdc_panel) are defered it would be better to check for
> encoders/connectors later again. This patch replaces the returncode
> -ENXIO with -EPROBE_DEFER to get a working setup even if tilcdc_panel
> probes after tilcdc.

yeah, that is probably better than relying on late_initcall() hacks..

Signed-off-by: Rob Clark <robdclark@gmail.com>

> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 116da19..217303c 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -84,7 +84,7 @@ static int modeset_init(struct drm_device *dev)
>         if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) {
>                 /* oh nos! */
>                 dev_err(dev->dev, "no encoders/connectors found\n");
> -               return -ENXIO;
> +               return -EPROBE_DEFER;
>         }
>
>         dev->mode_config.min_width = 0;
> --
> 1.8.5.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Markus Pargmann Feb. 16, 2014, 10:10 p.m. UTC | #2
Hi,

On Wed, Dec 18, 2013 at 02:56:01PM +0100, Markus Pargmann wrote:
> At the moment this driver fails to load if no encoders/connectors were
> found. In case other drivers that register encoders/connectors
> (tilcdc_panel) are defered it would be better to check for
> encoders/connectors later again. This patch replaces the returncode
> -ENXIO with -EPROBE_DEFER to get a working setup even if tilcdc_panel
> probes after tilcdc.
> 

Ping. Anything I need to change?

Regards,

Markus

> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index 116da19..217303c 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -84,7 +84,7 @@ static int modeset_init(struct drm_device *dev)
>  	if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) {
>  		/* oh nos! */
>  		dev_err(dev->dev, "no encoders/connectors found\n");
> -		return -ENXIO;
> +		return -EPROBE_DEFER;
>  	}
>  
>  	dev->mode_config.min_width = 0;
> -- 
> 1.8.5.1
> 
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 116da19..217303c 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -84,7 +84,7 @@  static int modeset_init(struct drm_device *dev)
 	if ((priv->num_encoders == 0) || (priv->num_connectors == 0)) {
 		/* oh nos! */
 		dev_err(dev->dev, "no encoders/connectors found\n");
-		return -ENXIO;
+		return -EPROBE_DEFER;
 	}
 
 	dev->mode_config.min_width = 0;