summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/modes/xf86Crtc.c11
-rw-r--r--hw/xfree86/modes/xf86Rotate.c8
2 files changed, 2 insertions, 17 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 4f8cbb5fa..ef2ecb7bd 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -244,8 +244,6 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
RRTransformPtr transform, int x, int y)
{
ScrnInfoPtr scrn = crtc->scrn;
- /* During ScreenInit() scrn->pScreen is still NULL */
- ScreenPtr pScreen = screenInfo.screens[scrn->scrnIndex];
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int i;
Bool ret = FALSE;
@@ -295,15 +293,6 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
} else
crtc->transformPresent = FALSE;
- /* We may hit this path during PreInit during load-detcect, at
- * which point no pScreens exist yet, so avoid this step. */
- if (pScreen) {
- /* xf86CrtcFitsScreen() relies on these values being correct. */
- /* This should ensure the values are always set at modeset time. */
- pScreen->width = scrn->virtualX;
- pScreen->height = scrn->virtualY;
- }
-
/* Shift offsets that move us out of virtual size */
if (x + mode->HDisplay > xf86_config->maxWidth ||
y + mode->VDisplay > xf86_config->maxHeight)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 793b1a99b..348b793d0 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -364,12 +364,8 @@ static Bool
xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
{
ScrnInfoPtr pScrn = crtc->scrn;
- /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
BoxRec b;
- if (!pScreen)
- return TRUE;
b.x1 = 0;
b.y1 = 0;
b.x2 = crtc->mode.HDisplay;
@@ -383,8 +379,8 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb)
b.y2 += crtc->y;
}
- return (0 <= b.x1 && b.x2 <= pScreen->width &&
- 0 <= b.y1 && b.y2 <= pScreen->height);
+ return (0 <= b.x1 && b.x2 <= pScrn->virtualX &&
+ 0 <= b.y1 && b.y2 <= pScrn->virtualY);
}
Bool