modesetting: Use atomic modesetting API for pageflip if available

Graphics / X.Org / X.Org Server - Louis-Francis Ratté-Boulianne [collabora.com] - 5 March 2018 18:27 EST

In order to flip between compressed and uncompressed buffers -something drmModePageFlip explicitly bans us from doing - we need to port use the atomic modesetting API. It's only 'fake' atomic though given we still commit for each CRTC separately and CRTC and connector properties are not set with the atomic API.

The helper functions to retrieve DRM properties have been borrowed from Weston.

4023d5373 modesetting: Use atomic modesetting API for pageflip if available
configure.ac | 3 +
hw/xfree86/drivers/modesetting/driver.c | 6 +
hw/xfree86/drivers/modesetting/driver.h | 1 +
hw/xfree86/drivers/modesetting/drmmode_display.c | 374 ++++++++++++++++++++++-
hw/xfree86/drivers/modesetting/drmmode_display.h | 36 +++
hw/xfree86/drivers/modesetting/pageflip.c | 22 +-
include/dix-config.h.in | 3 +
include/meson.build | 2 +
8 files changed, 443 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share