浏览代码

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>
Peter Ujfalusi 7 年之前
父节点
当前提交
da77772172
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/gpu/drm/omapdrm/omap_fbdev.c

+ 3 - 0
drivers/gpu/drm/omapdrm/omap_fbdev.c

@@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev)
 	struct drm_fb_helper *helper;
 	int ret = 0;
 
+	if (!priv->num_crtcs || !priv->num_connectors)
+		return;
+
 	fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
 	if (!fbdev)
 		goto fail;