Re: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns
From: Keith Packard
Date: Thu Jul 06 2017 - 11:11:49 EST
Michel DÃnzer <michel@xxxxxxxxxxx> 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 :-)
Description: PGP signature