[PATCH 0/2] Add support for passing crtc_id to page flip events.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Aug 10 10:46:22 UTC 2016


When generating events for a atomic commit involving multiple crtc's
it's not possible to distinguish which crtc belongs to which page flip event.
Solve this by putting crtc_id in the reserved member of page_flip_event.

I've checked weston, and the following ddx: modesetting (xserver), i915,
nouveau, ati, vmwgfx.

None of them depend in any way on the reserved member, so setting it to
non-zero should be safe. A lot of them use libdrm, which hides the page
flip event struct and only passes its members.

This is why I also changed libdrm to pass crtc_id in page_flip_handler2.
Any compositor that uses drmHandleEvent will be able to get information
about the crtc_id too, if available.

Maarten Lankhorst (2):
  (kernel) drm/core: Reuse the reserved member in drm_event_vblank for crtc_id.
  (libdrm) Add support for crtc_id in page flip events

Kernel:
 drivers/gpu/drm/drm_irq.c | 2 ++
 include/uapi/drm/drm.h    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Libdrm:
 include/drm/drm.h         |  2 +-
 tests/modetest/modetest.c | 20 ++++++++++++++++++--
 xf86drm.h                 | 16 +++++++++++++++-
 xf86drmMode.c             | 23 ++++++++++++++++-------
 4 files changed, 50 insertions(+), 11 deletions(-)
-- 
2.7.4



More information about the dri-devel mailing list