[PATCH 1/3] RFC: drm: Restrict vblank ioctl to master

Michel Dänzer michel at daenzer.net
Tue Jun 14 09:09:34 UTC 2016


On 14.06.2016 18:03, Daniel Vetter wrote:
> Somehow this escaped us, this is a KMS ioctl which should only be used
> by the master (which is the thing that's also in control of kms
> resources). Everything else is bound to result in fail.
> 
> Clients shouldn't have a trouble coping with this, since a pile of
> drivers don't support vblank waits (or just randomly fall over when
> using them). Note that the big motivation for abusing this like mad
> seems to be that EGL doesn't have OML_sync, but somehow it didn't
> cross anyone's mind that adding OML_sync to EGL would be useful.

That may be one motivation, but it's certainly not the only one.
DRM_IOCTL_WAIT_VBLANK is used by apps which don't use EGL or any similar
API at all.

Seems like you really want to throw out a baby with the bathwater. :(


> -	DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, 0),
> +	DRM_IOCTL_DEF(DRM_IOCTL_MODESET_CTL, drm_modeset_ctl, DRM_MASTER),

If the DRM_IOCTL_MODESET_CTL change is intended, it should be documented
in the commit log.


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


More information about the dri-devel mailing list