drm: add hotspot cursor interface support.
Signed-off-by: Dave Airlie <airlied@redhat.com>main
parent
378bb47a78
commit
2e0ab62376
|
@ -733,6 +733,7 @@ struct drm_prime_handle {
|
|||
#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
|
||||
#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
|
||||
#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
|
||||
#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
|
||||
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
|
|
|
@ -390,6 +390,19 @@ struct drm_mode_cursor {
|
|||
__u32 handle;
|
||||
};
|
||||
|
||||
struct drm_mode_cursor2 {
|
||||
__u32 flags;
|
||||
__u32 crtc_id;
|
||||
__s32 x;
|
||||
__s32 y;
|
||||
__u32 width;
|
||||
__u32 height;
|
||||
/* driver specific handle */
|
||||
__u32 handle;
|
||||
__s32 hot_x;
|
||||
__s32 hot_y;
|
||||
};
|
||||
|
||||
struct drm_mode_crtc_lut {
|
||||
__u32 crtc_id;
|
||||
__u32 gamma_size;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -378,6 +378,7 @@ int drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId,
|
|||
*/
|
||||
int drmModeSetCursor(int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height);
|
||||
|
||||
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);
|
||||
/**
|
||||
* Move the cursor on crtc
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue