Save/restore registers around calls in PreInit with register side-effects.

This commit is contained in:
Eric Anholt 2006-12-06 16:58:24 -08:00
parent d3c21c09e3
commit b23dec37b2
1 changed files with 8 additions and 10 deletions

View File

@ -1401,12 +1401,10 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
pI830->Clone = TRUE;
}
#if 0
SaveHWState (pScrn);
#endif
/* Perform the pipe assignment of outputs. This is a kludge until
* we have better configuration support in the generic RandR code
SaveHWState(pScrn);
/* Do an initial detection of the outputs while none are configured on yet.
* This will give us some likely legitimate response for later if both
* pipes are already allocated and we're asked to do a detect.
*/
for (i = 0; i < pI830->xf86_config.num_output; i++)
{
@ -1414,16 +1412,16 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
output->status = (*output->funcs->detect) (output);
}
#if 0
RestoreHWState (pScrn);
#endif
if (!xf86InitialConfiguration (pScrn))
{
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
RestoreHWState(pScrn);
PreInitCleanup(pScrn);
return FALSE;
}
RestoreHWState(pScrn);
pScrn->displayWidth = (pScrn->virtualX + 63) & ~63;
pI830->rotation = RR_Rotate_0;