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

Michel Dänzer michel at daenzer.net
Wed Jun 15 07:29:48 UTC 2016


On 14.06.2016 18:35, Daniel Vetter wrote:
> On Tue, Jun 14, 2016 at 11:09 AM, Michel Dänzer <michel at daenzer.net> wrote:
>> 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.
> 
> Hm, what else?

Off the top of my head, I know specifically about compton and xfwm4.
There's certainly more.

Note that as I mentioned before in the other thread, I absolutely agree
that DRM_IOCTL_WAIT_VBLANK isn't supposed to be used directly. But the
fact of the matter is that it is being used like that (possibly has been
since before the DRM master concept even existed), and presumably it
actually works with simple setups (which might be the majority). So
there might be some backlash if it suddenly stops working.


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


More information about the dri-devel mailing list