[PATCH 07/36] drm/omap: Init fbdev emulation only when we have displays
Tomi Valkeinen
tomi.valkeinen at ti.com
Wed Nov 30 11:17:09 UTC 2016
From: Peter Ujfalusi <peter.ujfalusi at ti.com>
Do not try to init the fbdev if either num_crtcs or num_connectors is 0.
In this case we do not have display so the fbdev init would fail anyways.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index 8d8ac173f55d..2b045262f8ad 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -255,6 +255,9 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
struct drm_fb_helper *helper;
int ret = 0;
+ if (!priv->num_crtcs || !priv->num_connectors)
+ return NULL;
+
fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
if (!fbdev)
goto fail;
--
2.7.4
More information about the dri-devel
mailing list