Clean up rotation data when crtc is turned off

The shadow frame buffer and other data used for rotation need to be freed
when the crtc is disabled, not just when rotation is disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1ba4cbb159)
This commit is contained in:
Keith Packard 2008-12-15 11:36:43 -08:00
parent 523aae1fa6
commit 8f17a31aa7
3 changed files with 9 additions and 1 deletions

View File

@ -2684,6 +2684,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn)
{
crtc->funcs->dpms(crtc, DPMSModeOff);
memset(&crtc->mode, 0, sizeof(crtc->mode));
xf86RotateDestroy(crtc);
}
}
if (pScrn->pScreen)

View File

@ -703,6 +703,13 @@ xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y);
Bool
xf86CrtcRotate (xf86CrtcPtr crtc);
/*
* Clean up any rotation data, used when a crtc is turned off
* as well as when rotation is disabled.
*/
void
xf86RotateDestroy (xf86CrtcPtr crtc);
/*
* free shadow memory allocated for all crtcs
*/

View File

@ -294,7 +294,7 @@ xf86RotateBlockHandler(int screenNum, pointer blockData,
}
}
static void
void
xf86RotateDestroy (xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;