xserver: Branch 'master' - 2 commits
Keith Packard
keithp at kemper.freedesktop.org
Tue Aug 7 12:47:48 PDT 2007
randr/rrinfo.c | 7 ++++---
randr/rroutput.c | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
diff-tree b4193a2eee80895c5641e77488df0e72a73a3d99 (from 2b93cbb5f8bac9b1b75f723baaa728430b5fefff)
Author: Keith Packard <keithp at koto.keithp.com>
Date: Tue Aug 7 12:45:53 2007 -0700
RRScanOldConfig wasn't getting crtcs set correctly
The output crtc is set by RRCrtcNotify, which is called at the end of
RRScanOldConfig. Several uses of output->crtc in this function were wrong.
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index bd5d5b1..8b0c93d 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -98,7 +98,6 @@ RRScanOldConfig (ScreenPtr pScreen, Rota
if (!output)
return;
RROutputSetCrtcs (output, &crtc, 1);
- output->crtc = crtc;
RROutputSetConnection (output, RR_Connected);
#ifdef RENDER
RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen));
@@ -108,7 +107,9 @@ RRScanOldConfig (ScreenPtr pScreen, Rota
output = RRFirstOutput (pScreen);
if (!output)
return;
- crtc = output->crtc;
+ crtc = pScrPriv->crtcs[0];
+ if (!crtc)
+ return;
/* check rotations */
if (rotations != crtc->rotations)
@@ -168,7 +169,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rota
/* notice current mode */
if (newMode)
- RRCrtcNotify (output->crtc, newMode, 0, 0, pScrPriv->rotation,
+ RRCrtcNotify (crtc, newMode, 0, 0, pScrPriv->rotation,
1, &output);
}
#endif
diff-tree 2b93cbb5f8bac9b1b75f723baaa728430b5fefff (from fef4c7a6f1a1ef34233b36137bb66d9a657307fb)
Author: Keith Packard <keithp at koto.keithp.com>
Date: Tue Aug 7 12:44:19 2007 -0700
Decrement mode count when removing RandR output mode.
Removing an output mode without decrementing the mode count scrambles the
output mode array badly.
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 1e1cfa5..a67e493 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -249,6 +249,7 @@ RROutputDeleteUserMode (RROutputPtr outp
memmove (output->userModes + m, output->userModes + m + 1,
(output->numUserModes - m - 1) * sizeof (RRModePtr));
+ output->numUserModes--;
RRModeDestroy (mode);
return Success;
}
More information about the xorg-commit
mailing list