summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_drv.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-05-23 12:07:50 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-05-23 12:54:21 +0300
commit591a0ac7f14aae6bf11b1cb6b5a68480bd644ddb (patch)
treecb2b4707ecd8aaac1eff6901b311d4f839c69383 /drivers/gpu/drm/omapdrm/omap_drv.c
parentb358c6cf029cb67b3ed9cc367fb46f1fa3228c5b (diff)
downloadblackbird-op-linux-591a0ac7f14aae6bf11b1cb6b5a68480bd644ddb.tar.gz
blackbird-op-linux-591a0ac7f14aae6bf11b1cb6b5a68480bd644ddb.zip
OMAPDSS: Fix crash with DT boot
When booting with DT, there's a crash when omapfb is probed. This is caused by the fact that omapdss+DT is not yet supported, and thus omapdss is not probed at all. On the other hand, omapfb is always probed. When omapfb tries to use omapdss, there's a NULL pointer dereference crash. The same error should most likely happen with omapdrm and omap_vout also. To fix this, add an "initialized" state to omapdss. When omapdss has been probed, it's marked as initialized. omapfb, omapdrm and omap_vout check this state when they are probed to see that omapdss is actually there. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 079c54c6f94c..902074bbd1f4 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -548,6 +548,9 @@ static void pdev_shutdown(struct platform_device *device)
static int pdev_probe(struct platform_device *device)
{
+ if (omapdss_is_initialized() == false)
+ return -EPROBE_DEFER;
+
DBG("%s", device->name);
return drm_platform_init(&omap_drm_driver, device);
}
OpenPOWER on IntegriCloud