Skip to content

Commit

Permalink
drm/vc4: Don't try to initialize FBDEV if we're only bound to V3D.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Eric Anholt committed May 8, 2017
1 parent b72a281 commit 1e70bdc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/gpu/drm/vc4/vc4_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1e70bdc

Please sign in to comment.