summaryrefslogtreecommitdiff
path: root/src/radeon_cursor.c
diff options
context:
space:
mode:
authorairlied <airlied@optimus.localdomain>2006-11-28 17:26:10 +1100
committerairlied <airlied@optimus.localdomain>2006-11-28 17:26:10 +1100
commitba047ae863aac869595a31ea94f102084636fd29 (patch)
treeaf641275e6530d89e3bbddc467069997eedb6ab8 /src/radeon_cursor.c
parent0d42cab2d889070ab6de05990e2b19724595f7af (diff)
radeon: initial move framebuffer away from zero prep.
In theory the driver should be able to handle the front buffer not at VRAM 0 In practice it didn't.. this is cleanup for at least XAA parts of the driver to allow for the frontbuffer to move. It has to re-organise a large part of ScreenInit so things happen in the correct order otherwise some things get setup in-correctly. (not sure EXA with fb not at 0 works yet...)
Diffstat (limited to 'src/radeon_cursor.c')
-rw-r--r--src/radeon_cursor.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index ef07bac..a45198a 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -109,7 +109,7 @@ static CARD32 mono_cursor_color[] = {
static void RADEONSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
- CARD32 *pixels = (CARD32 *)(pointer)(info->FB + info->cursor_offset);
+ CARD32 *pixels = (CARD32 *)(pointer)(info->FB + info->cursor_offset + pScrn->fbOffset);
int pixel, i;
CURSOR_SWAPPING_DECL_MMIO
@@ -180,8 +180,9 @@ static void RADEONSetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
| ((xorigin ? 0 : x) << 16)
| (yorigin ? 0 : y)));
RADEONCTRACE(("cursor_offset: 0x%x, yorigin: %d, stride: %d\n",
- info->cursor_offset, yorigin, stride));
- OUTREG(RADEON_CUR_OFFSET, info->cursor_offset + yorigin * stride);
+ info->cursor_offset + pScrn->fbOffset, yorigin, stride));
+ OUTREG(RADEON_CUR_OFFSET,
+ info->cursor_offset + pScrn->fbOffset + yorigin * stride);
} else {
OUTREG(RADEON_CUR2_HORZ_VERT_OFF, (RADEON_CUR2_LOCK
| (xorigin << 16)
@@ -203,7 +204,7 @@ static void RADEONLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *image)
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
CARD8 *s = (CARD8 *)(pointer)image;
- CARD32 *d = (CARD32 *)(pointer)(info->FB + info->cursor_offset);
+ CARD32 *d = (CARD32 *)(pointer)(info->FB + info->cursor_offset + pScrn->fbOffset);
CARD32 save1 = 0;
CARD32 save2 = 0;
CARD8 chunk;
@@ -311,7 +312,7 @@ static void RADEONLoadCursorARGB (ScrnInfoPtr pScrn, CursorPtr pCurs)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
- CARD32 *d = (CARD32 *)(pointer)(info->FB + info->cursor_offset);
+ CARD32 *d = (CARD32 *)(pointer)(info->FB + info->cursor_offset + pScrn->fbOffset);
int x, y, w, h;
CARD32 save1 = 0;
CARD32 save2 = 0;