The new capability conveys the user that failure reporting on error in atomic_ioctl() is supported.
Signed-off-by: Arun R Murthy <[email protected]> --- drivers/gpu/drm/drm_ioctl.c | 3 +++ include/uapi/drm/drm.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index ff193155129e7e863888d8958458978566b144f8..59f2b5b53830fd3aadc6e18cf49f0660a99e9c96 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -304,6 +304,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ req->value = drm_core_check_feature(dev, DRIVER_ATOMIC) && dev->mode_config.async_page_flip; break; + case DRM_CAP_ATOMIC_ERROR_REPORTING: + req->value = drm_core_check_feature(dev, DRIVER_ATOMIC) && 1; + break; default: return -EINVAL; } diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 27cc159c1d275c7a7fe057840ef792f30a582bb7..6082410bcabfb4aa37b85e5f03d3611e5aed4aa5 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -812,6 +812,13 @@ struct drm_gem_change_handle { * commits. */ #define DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP 0x15 +/** + * DRM_CAP_ATOMIC_ERROR_REPORTING + * + * If set to 1, the driver supports reporting of failure codes on error in + * atomic ioctl(). + */ +#define DRM_CAP_ATOMIC_ERROR_REPORTING 0x16 /* DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap { -- 2.25.1
