diff options
author | Keith Packard <keithp@keithp.com> | 2013-07-23 03:50:00 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-08-30 01:25:13 +0200 |
commit | 62f2104f3fc11c4cfd1307429cb955bfa48dcb37 (patch) | |
tree | f5a4e80d68e100cc6818a6810d07f28135ddd8c5 /drivers/gpu/drm/drm_crtc.c | |
parent | drm: Add DRM_MODE_PAGE_FLIP_ASYNC flag definition (diff) | |
download | linux-62f2104f3fc11c4cfd1307429cb955bfa48dcb37.tar.xz linux-62f2104f3fc11c4cfd1307429cb955bfa48dcb37.zip |
drm: Advertise async page flip ability through GETCAP ioctl
Let applications know whether the kernel supports asynchronous page
flipping.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 4f35be732b83..452591b67996 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3508,6 +3508,9 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, page_flip->reserved != 0) return -EINVAL; + if ((page_flip->flags & DRM_MODE_PAGE_FLIP_ASYNC) && !dev->mode_config.async_page_flip) + return -EINVAL; + obj = drm_mode_object_find(dev, page_flip->crtc_id, DRM_MODE_OBJECT_CRTC); if (!obj) return -EINVAL; |