[PATCH 0/3] drm: Add CRTC-id based ioctls for vblank query/event

From: Keith Packard
Date: Wed Jul 05 2017 - 18:17:44 EST


This patch series provides a new interface which fixes three issues
with the current VBLANK_WAIT ioctl:

1) CRTC indices to select a target.
2) 32-bits of count resolution.
3) Microsecond time resolution.

The first makes it quite difficult to use this interface from a leased
DRM device; without the ability to see all of the crtcs for a DRM
device, it's not possible to compute the right index into the array of
them for this interface.

2) and 3) prevent the API from matching the requirements for Vulkan,
which asks for 64-bits of counter and nano-second time resolution.

I've split this series into three pieces, the first two adjust the
internal APIs without exposing new functionality, the third adds the
new IOCTLs.

[PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time

This changes all DRM-level internal interfaces to 64-bit vblank
counters and nano-second time resolution. Changing the driver
interface to 64-bits seems like the right plan, but as no drivers
currently support anything wider than 32-bits, it may be that we don't
want to bother at this point.

[PATCH 2/3] drm: Reorganize drm_pending_event to support future event

This sticks the vblank event in a union inside of the pending event
structure so that I can add another parallel event in the next
patch. Importantly, this required that I move the assignment of the
event crtc_id field from event deliver to event allocation. That
"shouldn't" matter, but it should also be looked at with some care.

[PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls

With the internal APIs ready, this patch is pretty simple.

-keith