[PATCH 5/5] modesetting: Implement page flipping support for Present.

Kenneth Graunke kenneth at whitecape.org
Mon Apr 27 21:31:53 PDT 2015


On Tuesday, April 21, 2015 05:58:44 PM Kenneth Graunke wrote:
> Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand.
> 
> v2:
> - Fix double free and flip_count underrun (caught by Mario Kleiner).
> - Don't leak flip_vblank_event on the error_out path (Mario).
> - Use the updated ms_flush_drm_events API (Mario, Ken).
> 
> v3: Hack around DPMS shenanigans.  If all monitors are DPMS off, then
>     there is no active framebuffer; attempting to pageflip will hit the
>     error_undo paths, causing us to drmModeRmFB with no framebuffer,
>     which confuses the kernel into doing full modesets and generally
>     breaks things.  To avoid this, make ms_present_check_flip check that
>     some CRTCs are enabled and DPMS on.  This is an ugly hack that would
>     get better with atomic modesetting, or some core Present work.
> 
> v4:
> - Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand).
> - Make pageflipping optional (Option "PageFlip" in xorg.conf.d), but
>   enabled by default.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>

Upon further testing, there are still nasty DPMS bugs affecting this
patch.  We no longer crash the X server, but clients appear to
occasionally get stuck.

I guess we just need to bite the bullet and unflip on DPMS off.
Or switch to atomic modesetting...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.x.org/archives/xorg-devel/attachments/20150427/a4a1eea5/attachment.sig>


More information about the xorg-devel mailing list