summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwain G. Ainsworth <oga@openbsd.org>2011-09-08 22:00:59 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2011-09-08 22:00:59 +0100
commitab7ed4c8f101aea8feba6f24d4d30706ffc61c6c (patch)
tree9498a40b716ad9338c9523a6aa007eb499891a85
parent02c4275215deb4154e39c2fcffee15d928f839b0 (diff)
program intel->front_pitch as the stride for the hardware, not the screen width.
This prevents us from programming the hardware with the wrong value since the shadow buffer stuff messes with scrn->displayWidth. From kettenis@. (oga; i think i've seen bugs in relation to this with multihead and tiling framebuffers, too)
-rw-r--r--src/i830_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index febcf5a4..f8335775 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -946,8 +946,8 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
int dsptileoff = (plane == 0 ? DSPATILEOFF : DSPBTILEOFF);
int dspstride = (plane == 0) ? DSPASTRIDE : DSPBSTRIDE;
- Offset = ((y * scrn->displayWidth + x) * intel->cpp);
- Stride = scrn->displayWidth * intel->cpp;
+ Offset = y * intel->front_pitch + x * intel->cpp;
+ Stride = intel->front_pitch;
if (intel->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