summaryrefslogtreecommitdiff
path: root/hw/xfree86/ramdac/TI.c
diff options
context:
space:
mode:
authorMichael Thayer <michael.thayer@oracle.com>2014-03-31 11:21:42 +0200
committerKeith Packard <keithp@keithp.com>2014-04-03 16:46:55 -0700
commit901fbfbbbd71c0d82080957f8ba09eebbc786f2b (patch)
tree968b7a427ae568c8d364b8f4239df9d1185f59f1 /hw/xfree86/ramdac/TI.c
parent62ab4102260fd3342a0e5ae3a4f77b430af64f4e (diff)
Add a return value to load_cursor_argb() to allow it to report failure
load_cursor_argb() may need to be able to fail and have the server fall back to a software cursor in at least the following circumstances. 1) The hardware can only support some ARGB cursors and this does not just depend on cursor size. 2) Virtual hardware may not wish to pass through a cursor to the host at a particular time but may wish to accept the same cursor at another time. This patch adds a return value to the API and makes the server do the software fall-back on failure. Signed-off-by: Michael Thayer <michael.thayer@oracle.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/ramdac/TI.c')
-rw-r--r--hw/xfree86/ramdac/TI.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/ramdac/TI.c b/hw/xfree86/ramdac/TI.c
index 393b774d4..7d4e0d796 100644
--- a/hw/xfree86/ramdac/TI.c
+++ b/hw/xfree86/ramdac/TI.c
@@ -642,7 +642,7 @@ TIramdacSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
(*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0, (fg & 0x000000ff));
}
-static void
+static Bool
TIramdacLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
{
RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn);
@@ -657,6 +657,7 @@ TIramdacLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
/* NOT_DONE: might need a delay here */
(*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_RAM_DATA, 0, *(src++));
}
+ return TRUE;
}
static Bool