diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-07-03 23:16:17 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-07-07 03:49:00 -0400 |
commit | d61a06862ba8c14466e1dd718cac460da0465ddd (patch) | |
tree | f291208be1768fa870fa373d2c4397f75a84d789 /drivers/gpu/drm | |
parent | ccd6895d401efad0c0e41d0e93fba4ef3085e268 (diff) |
drm/kms: allow drm_mode_group with no objects
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 <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 21058e6ad2b8..82db18506662 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -886,9 +886,6 @@ int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) | |||
886 | total_objects += dev->mode_config.num_connector; | 886 | total_objects += dev->mode_config.num_connector; |
887 | total_objects += dev->mode_config.num_encoder; | 887 | total_objects += dev->mode_config.num_encoder; |
888 | 888 | ||
889 | if (total_objects == 0) | ||
890 | return -EINVAL; | ||
891 | |||
892 | group->id_list = kzalloc(total_objects * sizeof(uint32_t), GFP_KERNEL); | 889 | group->id_list = kzalloc(total_objects * sizeof(uint32_t), GFP_KERNEL); |
893 | if (!group->id_list) | 890 | if (!group->id_list) |
894 | return -ENOMEM; | 891 | return -ENOMEM; |