summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-03-04 17:11:40 -0800
committerKeith Packard <keithp@neko.keithp.com>2007-03-04 17:11:40 -0800
commit6aeb855b9d4e03d458773240a9c0c9c1edd3e403 (patch)
tree955daaa6e2b616f324f6742ecd60390db6631524 /src
parent7d08f720a95499e8d00dcd7174f06731de420017 (diff)
Shadow pixmaps use fixed offset of 0.
Shadow pixmap contents are copied from the main frame buffer and contain only the bits displayed by the crtc, not the whole frame buffer. The crtc origin is always interpreted by the shadow copying code, the frame buffer itself doesn't move.
Diffstat (limited to 'src')
-rw-r--r--src/i830_display.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index e9666de0..67744d59 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -359,10 +359,11 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
I830Ptr pI830 = I830PTR(pScrn);
I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
int pipe = intel_crtc->pipe;
- unsigned long Start;
+ unsigned long Start, Offset;
int dspbase = (pipe == 0 ? DSPABASE : DSPBBASE);
int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
+ Offset = ((y * pScrn->displayWidth + x) * pI830->cpp);
if (pI830->front_buffer == NULL) {
/* During startup we may be called as part of monitor detection while
* there is no memory allocation done, so just supply a dummy base
@@ -370,7 +371,9 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
*/
Start = 0;
} else if (crtc->rotatedData != NULL) {
+ /* offset is done by shadow painting code, not here */
Start = (char *)crtc->rotatedData - (char *)pI830->FbBase;
+ Offset = 0;
} else if (I830IsPrimary(pScrn)) {
Start = pI830->front_buffer->offset;
} else {
@@ -379,12 +382,12 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
}
if (IS_I965G(pI830)) {
- OUTREG(dspbase, ((y * pScrn->displayWidth + x) * pI830->cpp));
+ OUTREG(dspbase, Offset);
(void) INREG(dspbase);
OUTREG(dspsurf, Start);
(void) INREG(dspsurf);
} else {
- OUTREG(dspbase, Start + ((y * pScrn->displayWidth + x) * pI830->cpp));
+ OUTREG(dspbase, Start + Offset);
(void) INREG(dspbase);
}
}