Hello all, These patches change the xserver to support setting up PRIME with double buffering, and implement double buffered PRIME sink and source support in the modesetting driver. In addition to these changes, I've upstreamed a couple of patches to the i915 DRM driver that mesh with these, and have implemented double buffered PRIME source support in the NVIDIA proprietary driver (pending release.)
With this patch set you can test without needing the NVIDIA proprietary driver. I tested with i915 as the sink and Nouveau as the source. Before patches: http://i.imgur.com/favNJcA.jpg After patches: http://i.imgur.com/pUUZ6sE.jpg They also improve performance significantly when using a modesetting source by cutting down the number of copies to one per vblank. Previous cover letters: v3: http://lists.x.org/archives/xorg-devel/2016-February/048677.html v2: http://lists.x.org/archives/xorg-devel/2016-January/048434.html v1: http://lists.x.org/archives/xorg-devel/2015-November/048039.html The biggest change in this patch set from the last one is the implementation of double buffered PRIME source support in the modesetting driver. Note that this is a basic implementation designed to exercise all of the new ABI functions. It lacks some of the more advanced functionality, such as fenced asynchronous presentation, and OpenGL syncing to the sink's vblank. The RRCrtcPtr argument to rrStartFlippingPixmapTracking() is designed to make the source aware of which outputs are on the crtc for use with OpenGL synchronization, but isn't used here. Everything else is exercised. The most notable change other than source support is disabling reverse PRIME for Glamor-accelerated i915 sinks, the rationale for which can be found in "modesetting: Disable Reverse PRIME for i915." Aside from those, it's just a few bug fixes and style changes. The details can be found in their respective changelogs. Thanks, Alex @ NVIDIA Linux Driver Team Alex Goins (13): xf86: Add PRIME flipping functions to Screen modesetting: scanout_pixmap_gpu one call only randr/xf86: Add PRIME Synchronization / Double Buffer randr: Add ability to turn PRIME sync off randr: Cleanup rrSetupPixmapSharing() modesetting: Properly clean up w/ PRIME syncing modesetting: Implement PRIME syncing as a sink modesetting: Fix mmap leak in scanout_pixmap_cpu modesetting: Suspend and resume flipping with DPMS modesetting: Blacklist UDL from PRIME sync modesetting: Disable Reverse PRIME for i915 modesetting: Consistent whitespace in driver.c modesetting: Implement PRIME syncing as a source hw/xfree86/drivers/modesetting/driver.c | 289 ++++++++++++++++++++--- hw/xfree86/drivers/modesetting/drmmode_display.c | 281 ++++++++++++++++++++-- hw/xfree86/drivers/modesetting/drmmode_display.h | 23 +- hw/xfree86/modes/xf86Crtc.h | 4 + hw/xfree86/modes/xf86RandR12.c | 4 +- include/scrnintstr.h | 14 ++ randr/randrstr.h | 17 ++ randr/rrcrtc.c | 164 +++++++++++-- randr/rrprovider.c | 57 +++++ 9 files changed, 782 insertions(+), 71 deletions(-) -- 1.9.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel