summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_kms.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-04-29 00:42:22 +0200
committerEric Anholt <eric@anholt.net>2017-05-08 21:24:06 +0200
commit1e70bdcbeb210afedc8f3103ff4fe295c2fa9fc1 (patch)
tree9943e873a70be11883b412ee7841cb111b246db7 /drivers/gpu/drm/vc4/vc4_kms.c
parentdrm/vc4: Turn the V3D clock on at runtime. (diff)
downloadlinux-1e70bdcbeb210afedc8f3103ff4fe295c2fa9fc1.tar.xz
linux-1e70bdcbeb210afedc8f3103ff4fe295c2fa9fc1.zip
drm/vc4: Don't try to initialize FBDEV if we're only bound to V3D.
There's no sense in having an fbdev if there's no display, since connectors don't get hotplugged to this hardware. On Cygnus we were getting a dmesg error from passing in num_connectors (0), when that argument is supposed to be the maximum number of cloned connectors per CRTC (1). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170428224223.21904-2-eric@anholt.net
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_kms.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index ad7925a9e0ea..237a504f11f0 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -230,10 +230,12 @@ int vc4_kms_load(struct drm_device *dev)
drm_mode_config_reset(dev);
- vc4->fbdev = drm_fbdev_cma_init(dev, 32,
- dev->mode_config.num_connector);
- if (IS_ERR(vc4->fbdev))
- vc4->fbdev = NULL;
+ if (dev->mode_config.num_connector) {
+ vc4->fbdev = drm_fbdev_cma_init(dev, 32,
+ dev->mode_config.num_connector);
+ if (IS_ERR(vc4->fbdev))
+ vc4->fbdev = NULL;
+ }
drm_kms_helper_poll_init(dev);