diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2017-12-15 09:08:31 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-03-01 02:18:18 -0500 |
commit | da77772172059e609ef5135881df55e3e6c5c808 (patch) | |
tree | 4572ea25d567c20d9b38191fc474c56a8a7e3dd3 /drivers/gpu/drm/omapdrm/omap_fbdev.c | |
parent | efd1f06be004a6a384f0482ef76c12bc202e1b8e (diff) |
drm/omap: Init fbdev emulation only when we have displays
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@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fbdev.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index be94480326d7..0f66c74a54b0 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c | |||
@@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev) | |||
249 | struct drm_fb_helper *helper; | 249 | struct drm_fb_helper *helper; |
250 | int ret = 0; | 250 | int ret = 0; |
251 | 251 | ||
252 | if (!priv->num_crtcs || !priv->num_connectors) | ||
253 | return; | ||
254 | |||
252 | fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); | 255 | fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); |
253 | if (!fbdev) | 256 | if (!fbdev) |
254 | goto fail; | 257 | goto fail; |