summaryrefslogtreecommitdiff
path: root/src/i830_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_display.c')
-rw-r--r--src/i830_display.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index 8a2494fe..78557126 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -399,14 +399,10 @@ i830PipeSetBase(xf86CrtcPtr crtc, int x, int y)
case 0:
sPriv->pipeA_x = x;
sPriv->pipeA_y = y;
- sPriv->pipeA_w = crtc->mode.HDisplay;
- sPriv->pipeA_h = crtc->mode.VDisplay;
break;
case 1:
sPriv->pipeB_x = x;
sPriv->pipeB_y = y;
- sPriv->pipeB_w = crtc->mode.HDisplay;
- sPriv->pipeB_h = crtc->mode.VDisplay;
break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -514,6 +510,28 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
usleep(150);
break;
}
+
+#ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScrn->pScreen);
+ Bool enabled = crtc->enabled && mode != DPMSModeOff;
+
+ switch (pipe) {
+ case 0:
+ sPriv->pipeA_w = enabled ? crtc->mode.HDisplay : 0;
+ sPriv->pipeA_h = enabled ? crtc->mode.VDisplay : 0;
+ break;
+ case 1:
+ sPriv->pipeB_w = enabled ? crtc->mode.HDisplay : 0;
+ sPriv->pipeB_h = enabled ? crtc->mode.VDisplay : 0;
+ break;
+ default:
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Can't update pipe %d in SAREA\n", pipe);
+ break;
+ }
+ }
+#endif
}
static Bool