drm/tilcdc: Defer probe if there are no connectors
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 30 Mar 2018 13:15:53 +0000 (15:15 +0200)
committerJyri Sarha <jsarha@ti.com>
Thu, 5 Jul 2018 11:06:22 +0000 (14:06 +0300)
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>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_drv.c

index b8a5e4ed22e6d84ce5637e9b42db93bbbc54b13a..0fb300d41a09c02508e70e89678695e09a8ff0f9 100644 (file)
@@ -378,7 +378,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;
        }