xserver-multidpi/hw/xfree86/ramdac
Michael Thayer c02f6a687c xfree86: Immediately handle failure to set HW cursor, v5
Based on v4 by Alexandre Courbot <acourbot@nvidia.com>

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.

v5: Updated the patch to apply to current git HEAD, split up into two
patches (server and modesetting driver) and adjusted the code slightly
to match surrounding code.  I also removed the new exported function
ShowCursorCheck(), as instead just changing ShowCursor() to return Bool
should not affect its current callers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
2017-02-08 12:04:42 -05:00
..
BT.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
BT.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
BTPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
CURSOR.NOTES Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
IBM.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
IBM.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
IBMPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Makefile.am tests: Avoid libtool message 2017-01-12 13:25:52 -05:00
TI.c debug output format fix in TI.c 2015-08-28 12:06:39 +01:00
TI.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
TIPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86Cursor.h xfree86: Immediately handle failure to set HW cursor, v5 2017-02-08 12:04:42 -05:00
xf86CursorPriv.h xf86Cursor: Add xf86CheckHWCursor() helper function 2016-09-13 10:26:58 +02:00
xf86CursorRD.c tests: Avoid libtool message 2017-01-12 13:25:52 -05:00
xf86HWCurs.c xfree86: Immediately handle failure to set HW cursor, v5 2017-02-08 12:04:42 -05:00
xf86RamDac.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86RamDac.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86RamDacCmap.c xfree86: Remove #include "compiler.h" from places that don't need it 2014-07-28 12:18:03 -07:00
xf86RamDacPriv.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00