mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-18 06:34:27 -04:00
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
This commit is contained in:
committed by
Javier Martinez Canillas
parent
4e3b70da64
commit
8f7179a102
@@ -593,6 +593,22 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
|
||||
} else if (plane->funcs->atomic_set_property) {
|
||||
return plane->funcs->atomic_set_property(plane, state,
|
||||
property, val);
|
||||
} else if (property == plane->hotspot_x_property) {
|
||||
if (plane->type != DRM_PLANE_TYPE_CURSOR) {
|
||||
drm_dbg_atomic(plane->dev,
|
||||
"[PLANE:%d:%s] is not a cursor plane: 0x%llx\n",
|
||||
plane->base.id, plane->name, val);
|
||||
return -EINVAL;
|
||||
}
|
||||
state->hotspot_x = val;
|
||||
} else if (property == plane->hotspot_y_property) {
|
||||
if (plane->type != DRM_PLANE_TYPE_CURSOR) {
|
||||
drm_dbg_atomic(plane->dev,
|
||||
"[PLANE:%d:%s] is not a cursor plane: 0x%llx\n",
|
||||
plane->base.id, plane->name, val);
|
||||
return -EINVAL;
|
||||
}
|
||||
state->hotspot_y = val;
|
||||
} else {
|
||||
drm_dbg_atomic(plane->dev,
|
||||
"[PLANE:%d:%s] unknown property [PROP:%d:%s]\n",
|
||||
@@ -653,6 +669,10 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
|
||||
*val = state->scaling_filter;
|
||||
} else if (plane->funcs->atomic_get_property) {
|
||||
return plane->funcs->atomic_get_property(plane, state, property, val);
|
||||
} else if (property == plane->hotspot_x_property) {
|
||||
*val = state->hotspot_x;
|
||||
} else if (property == plane->hotspot_y_property) {
|
||||
*val = state->hotspot_y;
|
||||
} else {
|
||||
drm_dbg_atomic(dev,
|
||||
"[PLANE:%d:%s] unknown property [PROP:%d:%s]\n",
|
||||
|
||||
Reference in New Issue
Block a user