diff options
author | Keith Packard <keithp@keithp.com> | 2009-09-18 20:59:52 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-09-21 17:24:11 -0700 |
commit | 4758311842a16600287c8f9f77ce0af1a31b9264 (patch) | |
tree | a2eda7b3619bc771d8908ace31853ba1ad9c9eba | |
parent | 505025053d66d415e1c23ac858b9238fa8541d37 (diff) |
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>
-rw-r--r-- | src/i830.h | 3 | ||||
-rw-r--r-- | src/i830_driver.c | 39 | ||||
-rw-r--r-- | src/i830_video.c | 4 |
3 files changed, 2 insertions, 44 deletions
@@ -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; diff --git a/src/i830_driver.c b/src/i830_driver.c index 2863e458..4eb02551 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -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; diff --git a/src/i830_video.c b/src/i830_video.c index 9fb0b56e..47c026df 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -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)))) { |