summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-09 19:47:13 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-09 19:47:13 +0100
commit1991a90ae90b388c914985d20d6f8c3637856e9a (patch)
tree7b2157d2465bd8149c5f4b9e6a767b169c622ac9 /src
parentaef161853033907c6916337cebe88c8f111dd542 (diff)
Update SAREA pipe sizes in i830_crtc_dpms instead of i830PipeSetBase.
This allows setting the size to 0 when a pipe gets disabled.
Diffstat (limited to 'src')
-rw-r--r--src/i830_display.c26
-rw-r--r--src/i830_exa.c2
2 files changed, 23 insertions, 5 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
diff --git a/src/i830_exa.c b/src/i830_exa.c
index bef8faef..dfc8f998 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -42,7 +42,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define DEBUG_I830FALLBACK 1
#endif
-#define ALWAYS_SYNC 1
+#define ALWAYS_SYNC 0
#ifdef DEBUG_I830FALLBACK
#define I830FALLBACK(s, arg...) \