summaryrefslogtreecommitdiff
path: root/src/radeon_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-07-03 00:03:22 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-07-03 00:03:22 +0200
commitea5105230c7c3519730b8d3c250e9ba9a4e4374a (patch)
tree82d48a72830f10c749b7b5af58ca33f17d80e03c /src/radeon_exa.c
parent66586f905857ea5bf37cb5d34949cd450a9ed067 (diff)
Reserve HW cursor memory statically instead of from EXA offscreen.
As a result, quite a bit of code can be removed that attempted to deal with the EXA offscreen memory disappearing, with varying success. Because the HW cursor memory is now always immediately after the front buffer and before the back buffer, this also fixes bug #6808. As the HW cursor memory is now reserved statically with EXA and XAA, change RADEONUseHWCursor() to check info->cursor instead of info->cursor_offset, for which 0 might become valid with HW cursor enabled in the future. Change info->cursor_offset from unsigned long to CARD32 as the corresponding register is 32 bits wide, and to avoid issues with printf.
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r--src/radeon_exa.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 5bbce877..0d72005d 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -398,6 +398,19 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
"Will use %d kb for front buffer at offset 0x%08x\n",
screen_size / 1024, 0);
+ /* Reserve static area for hardware cursor */
+ if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) {
+ int cursor_size = 64 * 4 * 64;
+
+ info->cursor_offset = info->exa->offScreenBase;
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Will use %d kb for hardware cursor at offset 0x%08x\n",
+ cursor_size / 1024, (unsigned int)info->cursor_offset);
+
+ info->exa->offScreenBase += cursor_size;
+ }
+
#if defined(XF86DRI)
if (info->directRenderingEnabled) {
int depthCpp = (info->depthBits - 8) / 4, l, next, depth_size;