Skip to content

Commit

Permalink
drm/kms: allow drm_mode_group with no objects
Browse files Browse the repository at this point in the history
Sometimes we could be controlling a device (such as an NVIDIA Tesla) that
has no crtcs/encoders/connectors.

One could argue that the driver should unset DRIVER_MODESET in this case,
but that changes a whole heap of the DRM's other behaviours, and it's much
easier to just be a modesetting driver without any outputs.

Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
Ben Skeggs authored and airlied committed Jul 7, 2011
1 parent ccd6895 commit d61a068
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,9 +886,6 @@ int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group)
total_objects += dev->mode_config.num_connector;
total_objects += dev->mode_config.num_encoder;

if (total_objects == 0)
return -EINVAL;

group->id_list = kzalloc(total_objects * sizeof(uint32_t), GFP_KERNEL);
if (!group->id_list)
return -ENOMEM;
Expand Down

0 comments on commit d61a068

Please sign in to comment.