From 2e0ab6237697c9754d92689f77c1792c11be881b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 2 Jul 2013 09:21:06 +0100 Subject: drm: add hotspot cursor interface support. Signed-off-by: Dave Airlie --- xf86drmMode.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xf86drmMode.c') diff --git a/xf86drmMode.c b/xf86drmMode.c index f603ceb2..6b60c35e 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -400,6 +400,21 @@ int drmModeSetCursor(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width return DRM_IOCTL(fd, DRM_IOCTL_MODE_CURSOR, &arg); } +int drmModeSetCursor2(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height, int32_t hot_x, int32_t hot_y) +{ + struct drm_mode_cursor2 arg; + + arg.flags = DRM_MODE_CURSOR_BO; + arg.crtc_id = crtcId; + arg.width = width; + arg.height = height; + arg.handle = bo_handle; + arg.hot_x = hot_x; + arg.hot_y = hot_y; + + return DRM_IOCTL(fd, DRM_IOCTL_MODE_CURSOR2, &arg); +} + int drmModeMoveCursor(int fd, uint32_t crtcId, int x, int y) { struct drm_mode_cursor arg; -- cgit v1.2.3-54-g00ecf