aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-02-23 20:51:26 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-03-03 09:16:06 -0500
commit931b7336214bec8538babfde5eaa6833e179c804 (patch)
tree056893b248a2ff0be7aebd96fe0cd9941ca94186 /drivers/gpu/drm/rcar-du
parent0cd90a542885a1272b58f96bbe4010588105e1bc (diff)
drm: rcar-du: Disable fbdev emulation when no connector is present
fbdev emulation requires at least one connector, and will fail to initialize if no connector has been successfully instantiated. Disable it in that case and print an informational message instead of failing probe with a confusing fbdev emulation error message. It could be argued that probe should fail when no connector is present, but the DU could still be useful in that case with the to-be-implemented memory write-back support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_kms.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index aebbcde82ddf..888df404932e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -448,12 +448,17 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
448 448
449 drm_kms_helper_poll_init(dev); 449 drm_kms_helper_poll_init(dev);
450 450
451 fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc, 451 if (dev->mode_config.num_connector) {
452 dev->mode_config.num_connector); 452 fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc,
453 if (IS_ERR(fbdev)) 453 dev->mode_config.num_connector);
454 return PTR_ERR(fbdev); 454 if (IS_ERR(fbdev))
455 return PTR_ERR(fbdev);
455 456
456 rcdu->fbdev = fbdev; 457 rcdu->fbdev = fbdev;
458 } else {
459 dev_info(rcdu->dev,
460 "no connector found, disabling fbdev emulation\n");
461 }
457 462
458 return 0; 463 return 0;
459} 464}