Remove vestigial internal rotation which broke KMS DGA/VidMode modesetting.
Pre-2.0, the driver supported rotation internally, rather than relying on the X server rotation support. The last piece of this dealt with rotating the mouse coordinates and also tried to preserve rotation across DGA/VidModeExtension modesetting requests. That latter bit of code broke under KMS as the rotation value was never initialized, and when set to zero would create an invalid configuration. This would confuse xrandr which would bail before making any changes, leaving the user without a way to recover. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
505025053d
commit
4758311842
|
|
@ -395,8 +395,7 @@ typedef struct _I830Rec {
|
|||
#endif
|
||||
|
||||
XF86ModReqInfo shadowReq; /* to test for later libshadow */
|
||||
Rotation rotation;
|
||||
void (*PointerMoved)(int, int, int);
|
||||
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
|
||||
i830_memory *power_context;
|
||||
|
|
|
|||
|
|
@ -1359,9 +1359,6 @@ i830_user_modesetting_init(ScrnInfoPtr pScrn)
|
|||
}
|
||||
RestoreHWState(pScrn);
|
||||
|
||||
/* XXX This should go away, replaced by xf86Crtc.c support for it */
|
||||
pI830->rotation = RR_Rotate_0;
|
||||
|
||||
pI830->stolen_size = I830DetectMemory(pScrn);
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -2133,33 +2130,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
I830PointerMoved(int index, int x, int y)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[index];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
int newX = x, newY = y;
|
||||
|
||||
switch (pI830->rotation) {
|
||||
case RR_Rotate_0:
|
||||
break;
|
||||
case RR_Rotate_90:
|
||||
newX = y;
|
||||
newY = pScrn->pScreen->width - x - 1;
|
||||
break;
|
||||
case RR_Rotate_180:
|
||||
newX = pScrn->pScreen->width - x - 1;
|
||||
newY = pScrn->pScreen->height - y - 1;
|
||||
break;
|
||||
case RR_Rotate_270:
|
||||
newX = pScrn->pScreen->height - y - 1;
|
||||
newY = x;
|
||||
break;
|
||||
}
|
||||
|
||||
(*pI830->PointerMoved)(index, newX, newY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Intialiazes the hardware for the 3D pipeline use in the 2D driver.
|
||||
*
|
||||
|
|
@ -2830,11 +2800,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "direct rendering: Not available\n");
|
||||
#endif
|
||||
|
||||
|
||||
/* Wrap pointer motion to flip touch screen around */
|
||||
pI830->PointerMoved = pScrn->PointerMoved;
|
||||
pScrn->PointerMoved = I830PointerMoved;
|
||||
|
||||
if (serverGeneration == 1)
|
||||
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
|
||||
|
||||
|
|
@ -3086,9 +3051,8 @@ static Bool
|
|||
I830SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
|
||||
return xf86SetSingleMode (pScrn, mode, pI830->rotation);
|
||||
return xf86SetSingleMode (pScrn, mode, RR_Rotate_0);
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
|
@ -3142,7 +3106,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
|
|||
|
||||
xf86GARTCloseScreen(scrnIndex);
|
||||
|
||||
pScrn->PointerMoved = pI830->PointerMoved;
|
||||
pScrn->vtSema = FALSE;
|
||||
pI830->closing = FALSE;
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -2751,10 +2751,6 @@ I830AllocateSurface(ScrnInfoPtr pScrn,
|
|||
return BadAlloc;
|
||||
}
|
||||
|
||||
/* What to do when rotated ?? */
|
||||
if (pI830->rotation != RR_Rotate_0)
|
||||
return BadAlloc;
|
||||
|
||||
if (!(surface->pitches = xalloc(sizeof(int))))
|
||||
return BadAlloc;
|
||||
if (!(surface->offsets = xalloc(sizeof(int)))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue