[PATCH xserver] present: Only requeue for next MSC after flip failure

Keith Packard keithp at keithp.com
Thu Mar 24 13:22:47 UTC 2016


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

> From: Michel Dänzer <michel.daenzer at amd.com>
>
> This code was added to deal with the driver present hook failing, in
> which case we need to wait for the next MSC before executing the
> presentation.
>
> However, it could also take effect in cases where the driver incorrectly
> thinks the current MSC matches the target one (e.g. due to the kernel
> interface only supporting 32-bit MSC values), in which case it could
> result in the presentation getting requeued over and over.
>
> To prevent such issues, check specifically for the target MSC
> immediately following the current MSC.

Yeah, I think this is reasonable. I wondered if we should use a broader
range than == 1, but really that's the only case that's interesting;
either the flip vblank is getting executed in the MSC it was supposed
to, in which case vblank->target_msc will be exactly crtc_msc+1, or it's
being done late, in which case that will have passed and we'll copy it
immediately.

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160324/964462d1/attachment.sig>


More information about the xorg-devel mailing list