[PATCH v5 00/13] PRIME Synchronization

Alex Goins agoins at nvidia.com
Wed Apr 13 04:17:47 UTC 2016

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.)

Previous cover letters:
    v4: https://lists.x.org/archives/xorg-devel/2016-March/048944.html
    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

I wasn't able to get any of my questions answered in the last thread, so I
addressed the issues how I saw fit. Aside from some small tweaks, the biggest
changes in this patch set involve resolving the ambiguity with
rrSetScanoutPixmap(). Instead of using multiple calls to rrSetScanoutPixmap() to
setup scanout pixmaps for flipping, the scanout pixmap setting is done
implicitly in rrEnableSharedPixmapFlipping().

There are two new patches that fix outstanding bugs with
drmmode_set_scanout_pixmap(), with details in their respective commit messages:
    modesetting: Internal storage of scanout pixmaps
    modesetting: Always tear down scanout pixmap

Getting RRReplaceScanoutPixmap() working with synchronization would require an
ABI change to pass in two pixmaps instead of one, so I just made it fail
gracefully in the synchronized case. None of the drivers that I implemented
PRIME synchronization for seem to use RRReplaceScanoutPixmap(). In fact, I
believe it is currently broken with the modesetting driver without the above 2

Alex @ NVIDIA Linux Driver Team

Alex Goins (13):
  xf86: Add PRIME flipping functions to Screen
  randr/xf86: Add PRIME Synchronization / Double Buffer
  randr: Add ability to turn PRIME sync off
  modesetting: Internal storage of scanout pixmaps
  modesetting: Always tear down scanout pixmap
  modesetting: Always load ms->drmmode.pageflip
  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          | 299 +++++++++++++++++---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 331 ++++++++++++++++++++---
 hw/xfree86/drivers/modesetting/drmmode_display.h |  28 +-
 hw/xfree86/modes/xf86Crtc.h                      |   4 +
 hw/xfree86/modes/xf86RandR12.c                   |   4 +-
 include/scrnintstr.h                             |  14 +
 randr/randrstr.h                                 |  19 ++
 randr/rrcrtc.c                                   | 195 +++++++++++--
 randr/rrprovider.c                               |  57 ++++
 9 files changed, 848 insertions(+), 103 deletions(-)


More information about the xorg-devel mailing list