mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
FROMLIST: 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.] Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> (am from https://patchwork.kernel.org/patch/9662099/) Change-Id: Ibe6949782e5df5363d4eaa3e98b3ff413239cf26 Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
This commit is contained in:
parent
e469f94ad8
commit
398e38d802
|
|
@ -312,6 +312,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
|
|||
case DRM_CAP_ADDFB2_MODIFIERS:
|
||||
req->value = dev->mode_config.allow_fb_modifiers;
|
||||
break;
|
||||
case DRM_CAP_CRTC_IN_VBLANK_EVENT:
|
||||
req->value = 1;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -631,6 +631,7 @@ struct drm_gem_open {
|
|||
#define DRM_CAP_CURSOR_WIDTH 0x8
|
||||
#define DRM_CAP_CURSOR_HEIGHT 0x9
|
||||
#define DRM_CAP_ADDFB2_MODIFIERS 0x10
|
||||
#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
|
||||
|
||||
/** DRM_IOCTL_GET_CAP ioctl argument type */
|
||||
struct drm_get_cap {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user