History

drm: Pass CRTC ID in userspace vblank events

With the atomic API, it is possible that a single commit affects multiple crtcs. If the user requests an event with that commit, one event will be sent for each CRTC, but it is not possible to distinguish which crtc an event is for in user space. To solve this, the reserved field in struct drm_vblank_event is repurposed to include the crtc_id which the event is for. The DRM_CAP_CRTC_IN_VBLANK_EVENT is added to allow userspace to query if the crtc field will be set properly. [daniels: Rebased, using Maarten's forward-port.]

Ander Conselvan de Oliveira committed 9 years ago

Commit 5db06a81 parent 1bbfe9d3 files · +7 −1Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/drm/drm.h+2−1
@@ -647,6 +647,7 @@ struct drm_gem_open { · 646 unmodified lines
647#define DRM_CAP_CURSOR_HEIGHT 0x9647#define DRM_CAP_CURSOR_HEIGHT 0x9
648#define DRM_CAP_ADDFB2_MODIFIERS 0x10648#define DRM_CAP_ADDFB2_MODIFIERS 0x10
649#define DRM_CAP_PAGE_FLIP_TARGET 0x11649#define DRM_CAP_PAGE_FLIP_TARGET 0x11
650#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
650 651
651/** DRM_IOCTL_GET_CAP ioctl argument type */652/** DRM_IOCTL_GET_CAP ioctl argument type */
652struct drm_get_cap {653struct drm_get_cap {
@@ -851,7 +852,7 @@ struct drm_event_vblank { · 198 unmodified lines
851 __u32 tv_sec;852 __u32 tv_sec;
852 __u32 tv_usec;853 __u32 tv_usec;
853 __u32 sequence;854 __u32 sequence;
854 __u32 reserved;855 __u32 crtc_id; /* 0 on older kernels that do not support this */
855};856};
856 857
857/* typedef area */858/* typedef area */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t