summaryrefslogtreecommitdiff
path: root/src/savage_driver.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2007-09-14 20:13:33 -0400
committerAlex Deucher <alex@botch2.(none)>2007-09-14 20:13:33 -0400
commit846a69f70d189c486448df269a512b8d42fab0c2 (patch)
treef96b1df69d7bc5f0f4b909f619b121c96092fa97 /src/savage_driver.c
parent53a2088c5590bb96ce9a7ad30d908c7ea1d54027 (diff)
fix segfault from pScrn->currentMode
should fix bug 12260
Diffstat (limited to 'src/savage_driver.c')
-rw-r--r--src/savage_driver.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/savage_driver.c b/src/savage_driver.c
index a49f6a9..586fbad 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -119,7 +119,7 @@ static Bool SavageDDC1(int scrnIndex);
static unsigned int SavageDDC1Read(ScrnInfoPtr pScrn);
static void SavageProbeDDC(ScrnInfoPtr pScrn, int index);
static void SavageGetTvMaxSize(SavagePtr psav);
-static Bool SavagePanningCheck(ScrnInfoPtr pScrn);
+static Bool SavagePanningCheck(ScrnInfoPtr pScrn, DisplayModePtr pMode);
#ifdef XF86DRI
static Bool SavageCheckAvailableRamFor3D(ScrnInfoPtr pScrn);
#endif
@@ -3627,7 +3627,7 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen,
}
#endif
- SavagePanningCheck(pScrn);
+ SavagePanningCheck(pScrn, pScrn->currentMode);
#ifdef XvExtension
if( !psav->FBStart2nd && !psav->NoAccel /*&& !SavagePanningCheck(pScrn)*/ ) {
if (psav->IsSecondary)
@@ -4271,7 +4271,7 @@ Bool SavageSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
pSavEnt = pPriv->ptr;
SavageModeInit(pSavEnt->pSecondaryScrn, pSavEnt->pSecondaryScrn->currentMode);
}
- SavagePanningCheck(pScrn);
+ SavagePanningCheck(pScrn, mode);
return success;
}
@@ -4750,12 +4750,9 @@ SavageGetTvMaxSize(SavagePtr psav)
static Bool
-SavagePanningCheck(ScrnInfoPtr pScrn)
+SavagePanningCheck(ScrnInfoPtr pScrn, DisplayModePtr pMode)
{
SavagePtr psav = SAVPTR(pScrn);
- DisplayModePtr pMode;
-
- pMode = pScrn->currentMode;
psav->iResX = pMode->CrtcHDisplay;
psav->iResY = pMode->CrtcVDisplay;