From 0fcc405001c8b85f6cadb863784848366afd8278 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Sun, 20 May 2012 19:56:02 +0200 Subject: fixup: move SavageUpdateDevices to savage_vbe.c --- src/savage_driver.h | 2 +- src/savage_vbe.c | 15 ++++++++++++++- src/savage_video.c | 14 -------------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/savage_driver.h b/src/savage_driver.h index f64d606..aa05b9d 100644 --- a/src/savage_driver.h +++ b/src/savage_driver.h @@ -619,8 +619,8 @@ void SavageSetTextMode( SavagePtr psav ); void SavageSetVESAMode( SavagePtr psav, int n, int Refresh ); void SavageSetPanelEnabled( SavagePtr psav, Bool active ); void SavageFreeBIOSModeTable( SavagePtr psav, SavageModeTablePtr* ppTable ); -int SavageGetDevice( SavagePtr psav ); int SavageGetTV( SavagePtr psav ); +void SavageUpdateDevices(ScrnInfoPtr pScrn); int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate, Bool bEnableDeactivate); SavageModeTablePtr SavageGetBIOSModeTable( SavagePtr psav, int iDepth ); ModeStatus SavageMatchBiosMode(ScrnInfoPtr pScrn,int width,int height,int refresh, diff --git a/src/savage_vbe.c b/src/savage_vbe.c index 90127e6..1528896 100644 --- a/src/savage_vbe.c +++ b/src/savage_vbe.c @@ -18,6 +18,7 @@ #endif #define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00) +static int SavageGetDevice( SavagePtr psav ); /*static int SavageGetTVType( SavagePtr psav );*/ void SavageSetVESAModeCrtc1( SavagePtr psav, int n, int Refresh ); void SavageSetVESAModeCrtc2( SavagePtr psav, int n, int Refresh ); @@ -282,7 +283,7 @@ SavageSetPanelEnabled( SavagePtr psav, Bool active ) /* Function to get supported device list. */ -int SavageGetDevice( SavagePtr psav ) +static int SavageGetDevice( SavagePtr psav ) { SavageClearVM86Regs( psav->pVbe->pInt10 ); psav->pVbe->pInt10->ax = 0x4f14; /* S3 extensions */ @@ -306,6 +307,18 @@ int SavageGetTV( SavagePtr psav ) return ((psav->pVbe->pInt10->cx) & 0xc); /* TV mode bits are bits 2 and 3 */ } +/* function for online update of current devices and TV format */ +void SavageUpdateDevices(ScrnInfoPtr pScrn) +{ + SavagePtr psav; + + psav = SAVPTR(pScrn); + psav->iDevInfo = SavageGetDevice(psav); + psav->PAL = ((SavageGetTV(psav) & BIOS_TV_PAL) != 0); + psav->TvOn = ((psav->iDevInfo & TV_ACTIVE) != 0); + psav->CrtOnly = ((psav->iDevInfo & (unsigned char) ~CRT_ACTIVE) == 0); +} + /* Function to correct the DuoView flag in the case of a single display */ int SavageCorrectDuoViewFlag(int iDevInfo, Bool bEnableActivate, diff --git a/src/savage_video.c b/src/savage_video.c index f473e1c..d7546d2 100644 --- a/src/savage_video.c +++ b/src/savage_video.c @@ -65,8 +65,6 @@ static int SavagePutImage( ScrnInfoPtr, static int SavageQueryImageAttributes(ScrnInfoPtr, int, unsigned short *, unsigned short *, int *, int *); static void SavageFreeMemory(ScrnInfoPtr pScrn, void *mem_struct); -/* function for online update of current devices and TV format */ -static void SavageUpdateDevices(ScrnInfoPtr pScrn); void SavageResetVideo(ScrnInfoPtr pScrn); @@ -1430,18 +1428,6 @@ SavageFreeMemory( } } -/* function for online update of current devices and TV format */ -static void SavageUpdateDevices(ScrnInfoPtr pScrn) -{ - SavagePtr psav; - - psav = SAVPTR(pScrn); - psav->iDevInfo = SavageGetDevice(psav); - psav->PAL = ((SavageGetTV(psav) & BIOS_TV_PAL) != 0); - psav->TvOn = ((psav->iDevInfo & TV_ACTIVE) != 0); - psav->CrtOnly = ((psav->iDevInfo & (unsigned char) ~CRT_ACTIVE) == 0); -} - static void SavageSetBlend(ScrnInfoPtr pScrn, int id) { -- cgit v1.2.3