summaryrefslogtreecommitdiff
path: root/src/i830_randr.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@guitar.keithp.com>2006-11-20 17:25:00 -0800
committerKeith Packard <keithp@guitar.keithp.com>2006-11-20 17:25:00 -0800
commita0a9d1ea2ac9a0c665e5a1de5b8b8358dee3b9b4 (patch)
treee63249ba2b2a1b880b492a16b529c77f7de10bfb /src/i830_randr.c
parentd6a0f917e601ea36643c6ad857756e19d24ecd73 (diff)
Set configured values for screen virtual size and initial frame.
Computation for virtual size and initial frame origin is quite broken in xf86 common code.
Diffstat (limited to 'src/i830_randr.c')
-rw-r--r--src/i830_randr.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/i830_randr.c b/src/i830_randr.c
index d27125f4..d8e2261f 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -1172,17 +1172,16 @@ I830RRDefaultScreenLimits (RROutputPtr *outputs, int num_outputs,
for (s = 0; s < output->numCrtcs; s++)
if (output->crtcs[s] == crtc)
- break;
- if (s == output->numCrtcs)
- continue;
- for (m = 0; m < output->numModes; m++)
- {
- RRModePtr mode = output->modes[m];
- if (mode->mode.width > crtc_width)
- crtc_width = mode->mode.width;
- if (mode->mode.height > crtc_width)
- crtc_height = mode->mode.height;
- }
+ {
+ for (m = 0; m < output->numModes; m++)
+ {
+ RRModePtr mode = output->modes[m];
+ if (mode->mode.width > crtc_width)
+ crtc_width = mode->mode.width;
+ if (mode->mode.height > crtc_width)
+ crtc_height = mode->mode.height;
+ }
+ }
}
width += crtc_width;
if (crtc_height > height)
@@ -1241,9 +1240,16 @@ I830RandRPreInit (ScrnInfoPtr pScrn)
if (width > pScrn->virtualX)
pScrn->virtualX = width;
+ if (width > pScrn->display->virtualX)
+ pScrn->display->virtualX = width;
if (height > pScrn->virtualY)
pScrn->virtualY = height;
+ if (height > pScrn->display->virtualY)
+ pScrn->display->virtualY = height;
+ /* XXX override xf86 common frame computation code */
+ pScrn->display->frameX0 = 0;
+ pScrn->display->frameY0 = 0;
for (o = 0; o < pI830->num_outputs; o++)
{
RRModePtr randr_mode = output_modes[o];