[PATCH/RFC] drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers

Michel Dänzer michel at daenzer.net
Wed May 30 04:29:06 PDT 2012


On Mit, 2012-05-30 at 00:58 +0200, Laurent Pinchart wrote: 
> DRM_IOCTL_MODESET_CTL must only be used for UMS drivers. Make it a no-op
> for KMS drivers.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  drivers/gpu/drm/drm_irq.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> My understanding of the DRM framework tells me that calling
> DRM_IOCTL_MODESET_CTL on a KMS driver is not only unneeded, but could also
> mess up its internal state. Did I get it right ?

Yes, good catch.


> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index c798eea..03f16f3 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -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.

This hunk should really be in a separate patch, but other than that

Reviewed-by: Michel Dänzer <michel at daenzer.net>


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the dri-devel mailing list