diff options
author | Owain G. Ainsworth <zerooa@googlemail.com> | 2010-04-19 04:05:36 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-04-21 10:35:32 +1000 |
commit | 761f0de5556e46f166280476185977f720efe586 (patch) | |
tree | d76e2928ccde34aa694720bcdbbb6d521c20959a /src/radeon_cursor.c | |
parent | 2059d628c5fb03222a62502cc1b5724bf296a7b3 (diff) |
Make consistent use of fbOffset and share fb mappings.
What we were doing previously was mapping the framebuffer for zaphod for
only this driver instances chunk, however, fbOffset was (rightly) set to
the offset into the whole framebuffer we were using.
Since in some cases we did operations on the FB virtual address +
fbOffset (for example zeroing the framebuffer on entervt) we were
actually pissing all over ourselves in those cases.
Fix this by implementing shared fb mappings like we do for MMIO already,
and whenever we wish to refer to our area of FB space we always use
fbOffset. Fixes zaphod for some users on r600 chipsets, my 4870 is still
behaving strangely on screen 0, but I suspect that is another bug.
Once calculation (in PreInitAccel) is now wrong because of this, however
dri on zaphod does now happen so this is irrelavent, add a comment to
that effect.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_cursor.c')
-rw-r--r-- | src/radeon_cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c index 4a171ff3..538c8b20 100644 --- a/src/radeon_cursor.c +++ b/src/radeon_cursor.c @@ -343,7 +343,7 @@ radeon_crtc_set_cursor_colors (xf86CrtcPtr crtc, int bg, int fg) ScrnInfoPtr pScrn = crtc->scrn; RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; RADEONInfoPtr info = RADEONPTR(pScrn); - uint32_t *pixels = (uint32_t *)(pointer)(info->FB + radeon_crtc->cursor_offset); + uint32_t *pixels = (uint32_t *)(pointer)(info->FB + pScrn->fbOffset + radeon_crtc->cursor_offset); int pixel, i; CURSOR_SWAPPING_DECL_MMIO @@ -386,7 +386,7 @@ radeon_crtc_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; RADEONInfoPtr info = RADEONPTR(pScrn); CURSOR_SWAPPING_DECL_MMIO - uint32_t *d = (uint32_t *)(pointer)(info->FB + radeon_crtc->cursor_offset); + uint32_t *d = (uint32_t *)(pointer)(info->FB + pScrn->fbOffset + radeon_crtc->cursor_offset); RADEONCTRACE(("RADEONLoadCursorARGB\n")); |