[PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns

Keith Packard keithp at keithp.com
Thu Jul 6 15:11:42 UTC 2017


Michel Dänzer <michel at daenzer.net> writes:

> BTW, this got me thinking that we should probably treat
> _DRM_VBLANK_NEXTONMISS the same way, i.e. clear the flag after updating
> vblwait->request.sequence. Otherwise there could theoretically (though
> unlikely) be an infinite loop:

I was thinking that we should just re-compute the target sequence from
scratch and not modify the request at all. But, now I see your point --
if the wait is interrupted long after it starts, then we don't want to
change the target number.

I wonder if anyone actually waits for vblank anymore, or if everyone
just uses the event interface...

> ioctl with _DRM_VBLANK_NEXTONMISS, target missed => wait for next vblank
> wait interrupted by signal
> lather, rinse, repeat

Yeah, sounds like a latent bug.

Ok, to retract my last email, I'll go ahead and fix things up so that
the request sequence gets set to the correct absolute value and that any
flags which modify it get cleared.

> I'd advise against adding a "next on miss" flag for the new ioctl until
> there is specific demand for that.

Thanks for your advice :-)

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170706/9e9a9813/attachment.sig>


More information about the dri-devel mailing list