[PATCH v4 2/8] drm/atomic: Add support for mouse hotspots

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 29 08:16:45 UTC 2023


On Wed, 28 Jun 2023 16:26:37 +0000
Zack Rusin <zackr at vmware.com> wrote:

> On Wed, 2023-06-28 at 14:15 +0000, Simon Ser wrote:
> > I think we should drop the CRTC_X/CRTC_Y properties for hotspot-aware cursor
> > planes.
> > The drivers aren't going to do anything with these, and exposing them to user-
> > space
> > makes it sound like user-space controls the position of the plane, but it really
> > doesn't.  
> 
> I think we talked about this before. The CRTC_X/CRTC_Y properties are absolutely
> being used and they're respected when the rendering is done guest-side - the system
> will be pretty broken if the client sets the crtc x/y properties to somewhere where
> the mouse isn't though.

Right, but it would be useful to hear more about the "why".

> An argument could be made that crtc x/y properties should be removed on the cursor
> plane in drivers for para-virtualized hardware and instead replaced with
> mouse_position x/y properties that do exactly what crtc x/y properties do but make
> it explicit what they really are on a cursor plane.

I suppose this is needed to support the guest OS warping the cursor position
while the viewer has a relative-motion pointer locked to it?

When the pointer is not locked to the VM viewer window, the pointer
sends absolute motion events? Which is necessary for the roundtrip
elision that the hotspot is needed for in the first place.

Btw. this is somewhat conflicting with what you wrote as the first UAPI
doc draft. I don't see how the viewer/host could independently position
the cursor image if the related pointer device is not also delivering
absolute motion events in the guest. Delivering relative motion events
would cause the guest and host opinion of pointer position to drift
apart primarily due to different acceleration curves.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230629/579c3d1d/attachment-0001.sig>


More information about the dri-devel mailing list