linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tilcdc: Defer probe if there are no connectors
@ 2018-03-30 13:15 Sjoerd Simons
  2018-07-06  9:26 ` Jyri Sarha
  0 siblings, 1 reply; 2+ messages in thread
From: Sjoerd Simons @ 2018-03-30 13:15 UTC (permalink / raw)
  To: dri-devel; +Cc: kernel, Jyri Sarha, David Airlie, Tomi Valkeinen, linux-kernel

During probe there may not be any connectors yet if e.g. the panel
failed or hasn't been probed yet. I hitting this in practice the panels
probing was being delayed due to using a gpio backlight.

Fix this by returning -EPROBE_DEFER so the probing will be retried.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

---

 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 1afde61f1247..59f0a44bb6e3 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -380,7 +380,7 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev)
 	if (!priv->external_connector &&
 	    ((priv->num_encoders == 0) || (priv->num_connectors == 0))) {
 		dev_err(dev, "no encoders/connectors found\n");
-		ret = -ENXIO;
+		ret = -EPROBE_DEFER;
 		goto init_failed;
 	}
 
-- 
2.16.3

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

* [PATCH] drm/tilcdc: Defer probe if there are no connectors
  2018-03-30 13:15 [PATCH] drm/tilcdc: Defer probe if there are no connectors Sjoerd Simons
@ 2018-07-06  9:26 ` Jyri Sarha
  0 siblings, 0 replies; 2+ messages in thread
From: Jyri Sarha @ 2018-07-06  9:26 UTC (permalink / raw)
  To: Sjoerd Simons, dri-devel
  Cc: kernel, David Airlie, Tomi Valkeinen, linux-kernel

On 30/03/18 16:15, Sjoerd Simons wrote:
> During probe there may not be any connectors yet if e.g. the panel
> failed or hasn't been probed yet. I hitting this in practice the panels
> probing was being delayed due to using a gpio backlight.
> 
> Fix this by returning -EPROBE_DEFER so the probing will be retried.
> 
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> 

Sorry that I did not have time to look into this earlier.

I do not really like the way this solves the the issue. The problem
isn't really about the patch, but the way the old tilcdc internal panel
driver works. But since there is no easy way to fix this better, I'll
merge the patch and hopefully fix the internal panel module later.

BR,
Jyri

> ---
> 
>  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 1afde61f1247..59f0a44bb6e3 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -380,7 +380,7 @@ static int tilcdc_init(struct drm_driver *ddrv, struct device *dev)
>  	if (!priv->external_connector &&
>  	    ((priv->num_encoders == 0) || (priv->num_connectors == 0))) {
>  		dev_err(dev, "no encoders/connectors found\n");
> -		ret = -ENXIO;
> +		ret = -EPROBE_DEFER;
>  		goto init_failed;
>  	}
>  
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



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

end of thread, other threads:[~2018-07-06  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 13:15 [PATCH] drm/tilcdc: Defer probe if there are no connectors Sjoerd Simons
2018-07-06  9:26 ` Jyri Sarha

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