drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
This new kernel capability indicates whether async page-flips are supported via the atomic uAPI. DRM clients can use it to check for support before feeding DRM_MODE_PAGE_FLIP_ASYNC to the kernel. Make it clear that DRM_CAP_ASYNC_PAGE_FLIP is for legacy uAPI only. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: André Almeida <andrealmeid@igalia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: André Almeida <andrealmeid@igalia.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patchwork.freedesktop.org/patch/msgid/20231122161941.320564-4-andrealmeid@igalia.com
This commit is contained in:
parent
4b4af74ab9
commit
e4d983acff
2 changed files with 13 additions and 1 deletions
|
@ -301,6 +301,10 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
|
||||||
case DRM_CAP_CRTC_IN_VBLANK_EVENT:
|
case DRM_CAP_CRTC_IN_VBLANK_EVENT:
|
||||||
req->value = 1;
|
req->value = 1;
|
||||||
break;
|
break;
|
||||||
|
case DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP:
|
||||||
|
req->value = drm_core_check_feature(dev, DRIVER_ATOMIC) &&
|
||||||
|
dev->mode_config.async_page_flip;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -713,7 +713,8 @@ struct drm_gem_open {
|
||||||
/**
|
/**
|
||||||
* DRM_CAP_ASYNC_PAGE_FLIP
|
* DRM_CAP_ASYNC_PAGE_FLIP
|
||||||
*
|
*
|
||||||
* If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC.
|
* If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for legacy
|
||||||
|
* page-flips.
|
||||||
*/
|
*/
|
||||||
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
|
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
|
||||||
/**
|
/**
|
||||||
|
@ -773,6 +774,13 @@ struct drm_gem_open {
|
||||||
* :ref:`drm_sync_objects`.
|
* :ref:`drm_sync_objects`.
|
||||||
*/
|
*/
|
||||||
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
|
#define DRM_CAP_SYNCOBJ_TIMELINE 0x14
|
||||||
|
/**
|
||||||
|
* DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP
|
||||||
|
*
|
||||||
|
* If set to 1, the driver supports &DRM_MODE_PAGE_FLIP_ASYNC for atomic
|
||||||
|
* commits.
|
||||||
|
*/
|
||||||
|
#define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15
|
||||||
|
|
||||||
/* DRM_IOCTL_GET_CAP ioctl argument type */
|
/* DRM_IOCTL_GET_CAP ioctl argument type */
|
||||||
struct drm_get_cap {
|
struct drm_get_cap {
|
||||||
|
|
Loading…
Add table
Reference in a new issue