diff options
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 12 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 3 | ||||
-rw-r--r-- | include/uapi/drm/drm.h | 2 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index dffc836144cc..f4dc9b7a3831 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -296,6 +296,18 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
296 | case DRM_CAP_ASYNC_PAGE_FLIP: | 296 | case DRM_CAP_ASYNC_PAGE_FLIP: |
297 | req->value = dev->mode_config.async_page_flip; | 297 | req->value = dev->mode_config.async_page_flip; |
298 | break; | 298 | break; |
299 | case DRM_CAP_CURSOR_WIDTH: | ||
300 | if (dev->mode_config.cursor_width) | ||
301 | req->value = dev->mode_config.cursor_width; | ||
302 | else | ||
303 | req->value = 64; | ||
304 | break; | ||
305 | case DRM_CAP_CURSOR_HEIGHT: | ||
306 | if (dev->mode_config.cursor_height) | ||
307 | req->value = dev->mode_config.cursor_height; | ||
308 | else | ||
309 | req->value = 64; | ||
310 | break; | ||
299 | default: | 311 | default: |
300 | return -EINVAL; | 312 | return -EINVAL; |
301 | } | 313 | } |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 71727b6210ae..8f3dee097579 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -907,6 +907,9 @@ struct drm_mode_config { | |||
907 | 907 | ||
908 | /* whether async page flip is supported or not */ | 908 | /* whether async page flip is supported or not */ |
909 | bool async_page_flip; | 909 | bool async_page_flip; |
910 | |||
911 | /* cursor size */ | ||
912 | uint32_t cursor_width, cursor_height; | ||
910 | }; | 913 | }; |
911 | 914 | ||
912 | #define obj_to_crtc(x) container_of(x, struct drm_crtc, base) | 915 | #define obj_to_crtc(x) container_of(x, struct drm_crtc, base) |
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 3c9a833992e8..b06c8ed68707 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
@@ -619,6 +619,8 @@ struct drm_gem_open { | |||
619 | #define DRM_PRIME_CAP_EXPORT 0x2 | 619 | #define DRM_PRIME_CAP_EXPORT 0x2 |
620 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 | 620 | #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 |
621 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 | 621 | #define DRM_CAP_ASYNC_PAGE_FLIP 0x7 |
622 | #define DRM_CAP_CURSOR_WIDTH 0x8 | ||
623 | #define DRM_CAP_CURSOR_HEIGHT 0x9 | ||
622 | 624 | ||
623 | /** DRM_IOCTL_GET_CAP ioctl argument type */ | 625 | /** DRM_IOCTL_GET_CAP ioctl argument type */ |
624 | struct drm_get_cap { | 626 | struct drm_get_cap { |