summaryrefslogtreecommitdiff
path: root/src/i830_randr.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-09-21 01:47:27 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-09-21 01:47:27 -0700
commit4820caf46e050761d9b347b8a440381e1b1f4727 (patch)
tree6a7260e2b870c8558d7af31ec040f13fdf2bc517 /src/i830_randr.c
parentc11c445bdeac34253b48192a5d406b55ff8b2be7 (diff)
Make planeEnabled track pipes controlled by randr.
Also add code to deal with disabling pipes.
Diffstat (limited to 'src/i830_randr.c')
-rw-r--r--src/i830_randr.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/i830_randr.c b/src/i830_randr.c
index 4132eb2e..7c67aea2 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -548,7 +548,7 @@ I830RandRCrtcSet (ScreenPtr pScreen,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
int pipe = (int) (crtc->devPrivate);
- DisplayModePtr display_mode = mode->devPrivate;
+ DisplayModePtr display_mode = mode ? mode->devPrivate : NULL;
/* Sync the engine before adjust mode */
if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) {
@@ -558,8 +558,24 @@ I830RandRCrtcSet (ScreenPtr pScreen,
if (display_mode != randrp->modes[pipe])
{
- if (!i830PipeSetMode (pScrn, display_mode, pipe))
- return FALSE;
+ pI830->planeEnabled[pipe] = mode != NULL;
+ if (display_mode)
+ {
+ if (!i830PipeSetMode (pScrn, display_mode, pipe))
+ return FALSE;
+ /* XXX need I830SDVOPostSetMode here */
+ }
+ else
+ {
+ CARD32 operatingDevices = pI830->operatingDevices;
+
+ if (pipe == 0)
+ pI830->operatingDevices &= ~0xff;
+ else
+ pI830->operatingDevices &= ~0xff00;
+ i830DisableUnusedFunctions (pScrn);
+ pI830->operatingDevices = operatingDevices;
+ }
randrp->modes[pipe] = display_mode;
}
i830PipeSetBase(pScrn, pipe, x, y);