mirror of
https://github.com/X11Libre/xf86-video-sisusb.git
synced 2026-03-24 01:25:03 +00:00
drop ifdef's on UNLOCK_ALWAYS
it's always defined, so no ifdef's needed. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-sisusb/-/merge_requests/6>
This commit is contained in:
@@ -116,8 +116,6 @@
|
||||
|
||||
/* End of configurable stuff --------------------------------- */
|
||||
|
||||
#define UNLOCK_ALWAYS /* Always unlock the registers (should be set!) */
|
||||
|
||||
/* Need that for SiSCtrl */
|
||||
#define EXTENSION_PROC_ARGS void *
|
||||
#include "extnsionst.h" /* required */
|
||||
|
||||
@@ -295,9 +295,7 @@ SiSUSBSave(ScrnInfoPtr pScrn, SISUSBRegPtr sisReg)
|
||||
SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
|
||||
int i;
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
/* Save SR registers */
|
||||
for(i = 0x00; i <= 0x3F; i++) {
|
||||
@@ -348,9 +346,7 @@ SiSUSBRestore(ScrnInfoPtr pScrn, SISUSBRegPtr sisReg)
|
||||
SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
|
||||
int i,temp;
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
/* Wait for accelerator to finish on-going drawing operations. */
|
||||
inSISIDXREG(pSiSUSB, SISSR, 0x1E, temp);
|
||||
@@ -427,9 +423,7 @@ SiSUSBRestoreBridge(ScrnInfoPtr pScrn, SISUSBRegPtr sisReg)
|
||||
SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
|
||||
int i;
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
for(i = 0x30; i <= 0x3b; i++) {
|
||||
if(i == 0x34) continue;
|
||||
|
||||
@@ -485,9 +485,7 @@ SISUSBDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 4,
|
||||
"SISUSBDisplayPowerManagementSet(%d)\n",PowerManagementMode);
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
switch (PowerManagementMode) {
|
||||
|
||||
@@ -1530,9 +1528,7 @@ SISUSBRestore(ScrnInfoPtr pScrn)
|
||||
|
||||
SiSUSBVGAProtect(pScrn, TRUE);
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL,NULL);
|
||||
#endif
|
||||
|
||||
/* First, restore CRT1 on/off and VB connection registers */
|
||||
outSISIDXREG(pSiSUSB,SISCR, 0x32, pSiSUSB->oldCR32);
|
||||
@@ -1658,9 +1654,7 @@ SISUSBScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||
|
||||
SiSUSB_SiSFB_Lock(pScrn, TRUE);
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
/* Save the current state */
|
||||
SISUSBSave(pScrn);
|
||||
@@ -2049,10 +2043,7 @@ SISUSBAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
SISUSBSetStartAddressCRT1(pSiSUSB, base);
|
||||
}
|
||||
|
||||
@@ -2384,9 +2375,7 @@ void SiSUSBPreSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, int viewmode)
|
||||
pSiSUSB->IsCustom = TRUE;
|
||||
}
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL); /* Unlock Registers */
|
||||
#endif
|
||||
|
||||
inSISIDXREG(pSiSUSB,SISCR, 0x33, CR33);
|
||||
|
||||
@@ -2443,9 +2432,7 @@ SiSUSBPostSetMode(ScrnInfoPtr pScrn, SISUSBRegPtr sisReg)
|
||||
|
||||
pSiSUSB->CRT1isoff = pSiSUSB->CRT1off;
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
andSISIDXREG(pSiSUSB, SISCR,pSiSUSB->myCR63,0xBF);
|
||||
andSISIDXREG(pSiSUSB, SISSR,0x1f,0x3f);
|
||||
@@ -2668,8 +2655,6 @@ void
|
||||
sisusbRestoreExtRegisterLock(SISUSBPtr pSiSUSB, UChar reg1, UChar reg2)
|
||||
{
|
||||
/* restore lock */
|
||||
#ifndef UNLOCK_ALWAYS
|
||||
outSISIDXREG(pSiSUSB, SISSR, 0x05, reg1 == 0xA1 ? 0x86 : 0x00);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,7 @@ SISUSB300Init(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||
pSiSUSB->scrnPitch = pSiSUSB->scrnPitch2 = pSiSUSB->scrnOffset;
|
||||
if(realmode->Flags & V_INTERLACE) pSiSUSB->scrnPitch <<= 1;
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
outSISIDXREG(pSiSUSB, SISSR, 0x05, 0x86);
|
||||
#endif
|
||||
|
||||
switch(pSiSUSB->CurrentLayout.bitsPerPixel) {
|
||||
case 8:
|
||||
|
||||
@@ -251,9 +251,7 @@ SISUSBResetVideo(ScrnInfoPtr pScrn)
|
||||
SISUSBPortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
|
||||
|
||||
/* Unlock registers */
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
if(getvideoreg(pSiSUSB, Index_VI_Passwd) != 0xa1) {
|
||||
setvideoreg(pSiSUSB, Index_VI_Passwd, 0x86);
|
||||
if(getvideoreg(pSiSUSB, Index_VI_Passwd) != 0xa1)
|
||||
@@ -323,10 +321,7 @@ set_disptype_regs(ScrnInfoPtr pScrn, SISUSBPortPrivPtr pPriv)
|
||||
{
|
||||
SISUSBPtr pSiSUSB = SISUSBPTR(pScrn);
|
||||
|
||||
#ifdef UNLOCK_ALWAYS
|
||||
sisusbSaveUnlockExtRegisterLock(pSiSUSB, NULL, NULL);
|
||||
#endif
|
||||
|
||||
setsrregmask(pSiSUSB, 0x06, 0x00, 0xc0); /* only overlay -> CRT1 */
|
||||
setsrregmask(pSiSUSB, 0x32, 0x00, 0xc0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user