On 01.04.2016 22:12, Michael Thayer wrote:
I have just been adjusting the cursor handling code in the VirtualBox
kernel driver and realised that the modesetting user space driver is
still adjusting the reported cursor position to take the hot-spot into
account, even though it also reports the hot-spot using
drmModeSetCursor2().  In theory this would be easy to fix, but that
would create a new problem: kernel space would have no easy way to tell
whether it was dealing with the old or with the new driver.  Other
drivers do not have this bug though, and I seem to be the first person
to want to use both position and hot-spot information in modesetting.
Does anyone have a good idea about how to deal with this?  My best so
far is for my driver to intercept DRM_IOCTL_MODE_CURSOR2 and just
-EINVAL it to force fall-back.

Ah, it gets more fun - the kernel code clearly also makes the same assumption: if a driver does not provide cursor_set2(), it falls back to calling cursor_set() with the same parameters, minus the hot-spot location. Reported cursor position does not take this into account. So this is clearly already a part of the kernel API, though probably as yet with no one actually depending on it.

Regards,

Michael

--
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to