Skip to content

Commit

Permalink
drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers
Browse files Browse the repository at this point in the history
DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
for KMS drivers.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
pinchartl authored and airlied committed Jul 17, 2012
1 parent faadaf9 commit 2993555
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ EXPORT_SYMBOL(drm_vblank_off);
* drm_vblank_pre_modeset - account for vblanks across mode sets
* @dev: DRM device
* @crtc: CRTC in question
* @post: post or pre mode set?
*
* Account for vblank events across mode setting events, which will likely
* reset the hardware frame counter.
Expand Down Expand Up @@ -1037,6 +1036,10 @@ int drm_modeset_ctl(struct drm_device *dev, void *data,
if (!dev->num_crtcs)
return 0;

/* KMS drivers handle this internally */
if (drm_core_check_feature(dev, DRIVER_MODESET))
return 0;

crtc = modeset->crtc;
if (crtc >= dev->num_crtcs)
return -EINVAL;
Expand Down

0 comments on commit 2993555

Please sign in to comment.