summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_plane.h
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2023-10-23 09:46:06 +0200
committerJavier Martinez Canillas <javierm@redhat.com>2023-11-24 11:57:56 +0100
commit8f7179a1027d89bf949b0b80c388a544a5e096f2 (patch)
tree0e821421cc049b62045ce675ec376dd130be9be8 /include/drm/drm_plane.h
parentdrm: Disable the cursor plane on atomic contexts with virtualized drivers (diff)
downloadlinux-8f7179a1027d89bf949b0b80c388a544a5e096f2.tar.xz
linux-8f7179a1027d89bf949b0b80c388a544a5e096f2.zip
drm/atomic: Add support for mouse hotspots
Atomic modesetting code lacked support for specifying mouse cursor hotspots. The legacy kms DRM_IOCTL_MODE_CURSOR2 had support for setting the hotspot but the functionality was not implemented in the new atomic paths. Due to the lack of hotspots in the atomic paths userspace compositors completely disable atomic modesetting for drivers that require it (i.e. all paravirtualized drivers). This change adds hotspot properties to the atomic codepaths throughtout the DRM core and will allow enabling atomic modesetting for virtualized drivers in the userspace. Signed-off-by: Zack Rusin <zackr@vmware.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-3-aesteve@redhat.com
Diffstat (limited to 'include/drm/drm_plane.h')
-rw-r--r--include/drm/drm_plane.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 79d62856defb..e2c671585775 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -116,6 +116,10 @@ struct drm_plane_state {
/** @src_h: height of visible portion of plane (in 16.16) */
uint32_t src_h, src_w;
+ /** @hotspot_x: x offset to mouse cursor hotspot */
+ /** @hotspot_y: y offset to mouse cursor hotspot */
+ int32_t hotspot_x, hotspot_y;
+
/**
* @alpha:
* Opacity of the plane with 0 as completely transparent and 0xffff as
@@ -748,6 +752,16 @@ struct drm_plane {
* scaling.
*/
struct drm_property *scaling_filter_property;
+
+ /**
+ * @hotspot_x_property: property to set mouse hotspot x offset.
+ */
+ struct drm_property *hotspot_x_property;
+
+ /**
+ * @hotspot_y_property: property to set mouse hotspot y offset.
+ */
+ struct drm_property *hotspot_y_property;
};
#define obj_to_plane(x) container_of(x, struct drm_plane, base)