[PATCH RESEND xserver v3] xfree86: Immediately handle failure to set HW cursor

Adam Jackson ajax at nwnk.net
Thu May 12 16:04:00 UTC 2016


On Thu, 2016-05-12 at 16:04 +0900, Alexandre Courbot wrote:
> There is currently no reliable way to report failure to set a HW
> cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM
> ioctl fails (which currently happens at least with modesetting on Tegra
> for format incompatibility reasons).
> 
> As failures are currently handled by setting the HW cursor size to
> (0,0), the fallback to SW cursor will not happen until the next time the
> cursor changes and xf86CursorSetCursor() is called again. In the
> meantime, the cursor will be invisible to the user.
> 
> This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and
> _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans.
> This allows to propagate errors up to xf86CursorSetCursor(), which can
> then fall back to using the SW cursor immediately.
> 
> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
> Cc: Michael Thayer <michael.thayer at oracle.com>
> ---
> Hoping to see this patch go through - all issues in the previous versions
> have been addressed, and the logic it introduces seems saner than setting
> the cursor size to (0, 0).

How are external drivers to know whether .set_cursor_check is available
at compile time? ABI_VIDEODRV_VERSION > 21.0 ? (That's a fine answer,
just want to make sure it's explicit.)

- ajax


More information about the xorg-devel mailing list