mirror of
https://github.com/X11Libre/xf86-video-sis.git
synced 2026-03-24 01:25:01 +00:00
drop support for ancient Linux 2.4 framebuffer device
This never seemed having been enabled, so most likely not needed at all. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-sis/-/merge_requests/21>
This commit is contained in:
committed by
Alan Coopersmith
parent
989d909c3f
commit
05dfca3f7d
135
src/init.c
135
src/init.c
@@ -1147,9 +1147,6 @@ SiSInitPCIetc(struct SiS_Private *SiS_Pr)
|
||||
/* HELPER: SetLVDSetc */
|
||||
/*********************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
void
|
||||
SiSSetLVDSetc(struct SiS_Private *SiS_Pr)
|
||||
{
|
||||
@@ -1415,9 +1412,6 @@ SiS_ResetSegmentRegisters(struct SiS_Private *SiS_Pr)
|
||||
/* HELPER: GetVBType */
|
||||
/*********************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
void
|
||||
SiS_GetVBType(struct SiS_Private *SiS_Pr)
|
||||
{
|
||||
@@ -1478,26 +1472,6 @@ SiS_GetVBType(struct SiS_Private *SiS_Pr)
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: Check RAM size */
|
||||
/*********************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static BOOLEAN
|
||||
SiS_CheckMemorySize(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex)
|
||||
{
|
||||
unsigned short AdapterMemSize = SiS_Pr->VideoMemorySize / (1024*1024);
|
||||
unsigned short modeflag = SiS_GetModeFlag(SiS_Pr, ModeNo, ModeIdIndex);
|
||||
unsigned short memorysize = ((modeflag & MemoryInfoFlag) >> MemorySizeShift) + 1;
|
||||
|
||||
if(!AdapterMemSize) return TRUE;
|
||||
|
||||
if(AdapterMemSize < memorysize) return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: Get DRAM type */
|
||||
/*********************************************/
|
||||
@@ -1565,37 +1539,6 @@ SiS_GetMCLK(struct SiS_Private *SiS_Pr)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: ClearBuffer */
|
||||
/*********************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static void
|
||||
SiS_ClearBuffer(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
|
||||
{
|
||||
unsigned char SISIOMEMTYPE *memaddr = SiS_Pr->VideoMemoryAddress;
|
||||
unsigned int memsize = SiS_Pr->VideoMemorySize;
|
||||
unsigned short SISIOMEMTYPE *pBuffer;
|
||||
int i;
|
||||
|
||||
if(!memaddr || !memsize) return;
|
||||
|
||||
if(SiS_Pr->SiS_ModeType >= ModeEGA) {
|
||||
if(ModeNo > 0x13) {
|
||||
SiS_SetMemory(memaddr, memsize, 0);
|
||||
} else {
|
||||
pBuffer = (unsigned short SISIOMEMTYPE *)memaddr;
|
||||
for(i = 0; i < 0x4000; i++) writew(0x0000, &pBuffer[i]);
|
||||
}
|
||||
} else if(SiS_Pr->SiS_ModeType < ModeCGA) {
|
||||
pBuffer = (unsigned short SISIOMEMTYPE *)memaddr;
|
||||
for(i = 0; i < 0x4000; i++) writew(0x0720, &pBuffer[i]);
|
||||
} else {
|
||||
SiS_SetMemory(memaddr, 0x8000, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: SearchModeID */
|
||||
/*********************************************/
|
||||
@@ -2501,11 +2444,7 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x09,0x80,data);
|
||||
|
||||
/* Write foreground and background queue */
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
templ = sisfb_read_nbridge_pci_dword(SiS_Pr, 0x50);
|
||||
#else
|
||||
templ = sis_pci_read_host_bridge_u32(0x50);
|
||||
#endif
|
||||
|
||||
if(SiS_Pr->ChipType == SIS_730) {
|
||||
|
||||
@@ -2525,13 +2464,8 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
sisfb_write_nbridge_pci_dword(SiS_Pr, 0x50, templ);
|
||||
templ = sisfb_read_nbridge_pci_dword(SiS_Pr, 0xA0);
|
||||
#else
|
||||
sis_pci_write_host_bridge_u32(0x50, templ);
|
||||
templ = sis_pci_read_host_bridge_u32(0xA0);
|
||||
#endif
|
||||
|
||||
/* GUI grant timer (PCI config 0xA3) */
|
||||
if(SiS_Pr->ChipType == SIS_730) {
|
||||
@@ -2547,11 +2481,7 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
sisfb_write_nbridge_pci_dword(SiS_Pr, 0xA0, templ);
|
||||
#else
|
||||
sis_pci_write_host_bridge_u32(0xA0, templ);
|
||||
#endif
|
||||
}
|
||||
#endif /* SIS300 */
|
||||
|
||||
@@ -3064,12 +2994,6 @@ SiS_SetCRT1Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sho
|
||||
|
||||
SiS_LoadDAC(SiS_Pr, ModeNo, ModeIdIndex);
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
if(SiS_Pr->SiS_flag_clearbuffer) {
|
||||
SiS_ClearBuffer(SiS_Pr, ModeNo);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!(SiS_Pr->SiS_VBInfo & (SetSimuScanMode | SwitchCRT2 | SetCRT2ToLCDA))) {
|
||||
SiS_WaitRetrace1(SiS_Pr);
|
||||
SiS_DisplayOn(SiS_Pr);
|
||||
@@ -3164,11 +3088,7 @@ SiS_Handle760(struct SiS_Private *SiS_Pr)
|
||||
(!(SiS_Pr->SiS_SysFlags & SF_760UMA)) )
|
||||
return;
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
somebase = sisfb_read_mio_pci_word(SiS_Pr, 0x74);
|
||||
#else
|
||||
somebase = sis_pci_read_device_u32(2, 0x74);
|
||||
#endif
|
||||
somebase &= 0xffff;
|
||||
|
||||
if(somebase == 0) return;
|
||||
@@ -3184,13 +3104,8 @@ SiS_Handle760(struct SiS_Private *SiS_Pr)
|
||||
temp2 = 0x0b;
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
sisfb_write_nbridge_pci_byte(SiS_Pr, 0x7e, temp1);
|
||||
sisfb_write_nbridge_pci_byte(SiS_Pr, 0x8d, temp2);
|
||||
#else
|
||||
sis_pci_write_host_bridge_u8(0x7e, temp1);
|
||||
sis_pci_write_host_bridge_u8(0x8d, temp2);
|
||||
#endif
|
||||
|
||||
SiS_SetRegByte((somebase + 0x85), temp3);
|
||||
#endif
|
||||
@@ -3268,21 +3183,12 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
|
||||
SISIOADDRESS BaseAddr = SiS_Pr->IOAddress;
|
||||
unsigned short RealModeNo, ModeIdIndex;
|
||||
unsigned char backupreg = 0;
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
unsigned short KeepLockReg;
|
||||
|
||||
SiS_Pr->UseCustomMode = FALSE;
|
||||
SiS_Pr->CRT1UsesCustomMode = FALSE;
|
||||
#endif
|
||||
|
||||
SiS_Pr->SiS_flag_clearbuffer = 0;
|
||||
|
||||
if(SiS_Pr->UseCustomMode) {
|
||||
ModeNo = 0xfe;
|
||||
} else {
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
if(!(ModeNo & 0x80)) SiS_Pr->SiS_flag_clearbuffer = 1;
|
||||
#endif
|
||||
ModeNo &= 0x7f;
|
||||
}
|
||||
|
||||
@@ -3299,9 +3205,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
|
||||
if(pScrn) SiS_Pr->SiS_VGAINFO = SiS_GetSetBIOSScratch(pScrn, 0x489, 0xff);
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
KeepLockReg = SiS_GetReg(SiS_Pr->SiS_P3c4,0x05);
|
||||
#endif
|
||||
SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x86);
|
||||
|
||||
SiSInitPCIetc(SiS_Pr);
|
||||
@@ -3338,13 +3241,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
|
||||
SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex);
|
||||
SiS_SetLowModeTest(SiS_Pr, ModeNo);
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
/* Check memory size (kernel framebuffer driver only) */
|
||||
if(!SiS_CheckMemorySize(SiS_Pr, ModeNo, ModeIdIndex)) {
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
SiS_OpenCRTC(SiS_Pr);
|
||||
|
||||
if(SiS_Pr->UseCustomMode) {
|
||||
@@ -3434,11 +3330,6 @@ SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo)
|
||||
|
||||
SiS_Handle760(SiS_Pr);
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
/* We never lock registers in XF86 */
|
||||
if(KeepLockReg != 0xA1) SiS_SetReg(SiS_Pr->SiS_P3c4,0x05,0x00);
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -4075,9 +3966,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
|
||||
#ifdef SIS_XORG_XF86
|
||||
DisplayModePtr current
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
struct fb_var_screeninfo *var, BOOLEAN writeres
|
||||
#endif
|
||||
)
|
||||
{
|
||||
unsigned short HRE, HBE, HRS, HBS, HDE, HT;
|
||||
@@ -4133,12 +4021,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
|
||||
#else
|
||||
(void)VBS; (void)HBS; (void)A;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
if(writeres) var->xres = xres = E * 8;
|
||||
var->left_margin = D * 8;
|
||||
var->right_margin = F * 8;
|
||||
var->hsync_len = C * 8;
|
||||
#endif
|
||||
|
||||
/* Vertical */
|
||||
@@ -4203,12 +4085,6 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
|
||||
"V: A %d B %d C %d D %d E %d F %d VT %d VDE %d VRS %d VBS %d VBE %d VRE %d\n",
|
||||
A, B, C, D, E, F, VT, VDE, VRS, VBS, VBE, VRE);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
if(writeres) var->yres = yres = E;
|
||||
var->upper_margin = D;
|
||||
var->lower_margin = F;
|
||||
var->vsync_len = C;
|
||||
#endif
|
||||
|
||||
if((xres == 320) && ((yres == 200) || (yres == 240))) {
|
||||
@@ -4224,16 +4100,5 @@ SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata,
|
||||
current->HSyncEnd = 376;
|
||||
current->HTotal = 400;
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
var->left_margin = (400 - 376);
|
||||
var->right_margin = (328 - 320);
|
||||
var->hsync_len = (376 - 328);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
44
src/init.h
44
src/init.h
@@ -65,25 +65,6 @@
|
||||
#include "sis_regs.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include "vgatypes.h"
|
||||
#include "vstruct.h"
|
||||
#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/fb.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
||||
#include <video/fbcon.h>
|
||||
#endif
|
||||
#include "sis.h"
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
||||
#include <linux/sisfb.h>
|
||||
#else
|
||||
#include <video/sisfb.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Mode numbers */
|
||||
static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f};
|
||||
static const unsigned short ModeIndex_320x240[] = {0x50, 0x56, 0x00, 0x53};
|
||||
@@ -1542,17 +1523,13 @@ void SiS_SetRegOR(SISIOADDRESS Port,unsigned short Index, unsigned short DataOR
|
||||
void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
|
||||
void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
|
||||
void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiSSetLVDSetc(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
|
||||
void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
|
||||
unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex);
|
||||
BOOLEAN SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_GetVBType(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
|
||||
BOOLEAN SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
|
||||
unsigned short *ModeIdIndex);
|
||||
@@ -1581,9 +1558,6 @@ BOOLEAN SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
|
||||
BOOLEAN SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
|
||||
DisplayModePtr mode, BOOLEAN IsCustom);
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
BOOLEAN SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
|
||||
#endif
|
||||
void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
|
||||
void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex);
|
||||
@@ -1591,10 +1565,6 @@ void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
|
||||
int yres, DisplayModePtr current);
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
|
||||
int yres, struct fb_var_screeninfo *var, BOOLEAN writeres);
|
||||
#endif
|
||||
|
||||
/* From init301.c: */
|
||||
extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
@@ -1629,18 +1599,4 @@ extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode,
|
||||
unsigned int VBFlags);
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#ifdef SIS300
|
||||
extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg,
|
||||
unsigned int val);
|
||||
#endif
|
||||
#ifdef SIS315H
|
||||
extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg,
|
||||
unsigned char val);
|
||||
extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -85,9 +85,6 @@
|
||||
#define SiS_I2CDELAYSHORT 150
|
||||
|
||||
static unsigned short SiS_GetBIOSLCDResInfo(struct SiS_Private *SiS_Pr);
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
|
||||
#endif
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: Lock/Unlock CRT2 */
|
||||
@@ -104,9 +101,6 @@ SiS_UnLockCRT2(struct SiS_Private *SiS_Pr)
|
||||
SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24,0x01);
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
void
|
||||
SiS_LockCRT2(struct SiS_Private *SiS_Pr)
|
||||
{
|
||||
@@ -927,11 +921,7 @@ SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo)
|
||||
|
||||
if(!(SiS_Pr->SiS_ChSW)) return;
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
acpibase = sisfb_read_lpc_pci_dword(SiS_Pr, 0x74);
|
||||
#else
|
||||
acpibase = sis_pci_read_device_u32(1, 0x74);
|
||||
#endif
|
||||
acpibase &= 0xFFFF;
|
||||
if(!acpibase) return;
|
||||
temp = SiS_GetRegShort((acpibase + 0x3c)); /* ACPI register 0x3c: GP Event 1 I/O mode select */
|
||||
@@ -1164,12 +1154,6 @@ SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#if 0
|
||||
printk(KERN_DEBUG "sisfb: (init301: VBInfo= 0x%04x, SetFlag=0x%04x)\n",
|
||||
SiS_Pr->SiS_VBInfo, SiS_Pr->SiS_SetFlag);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS_XORG_XF86
|
||||
#ifdef TWDEBUG
|
||||
xf86DrvMsg(0, X_PROBED, "(init301: VBInfo=0x%04x, SetFlag=0x%04x)\n",
|
||||
@@ -2234,12 +2218,6 @@ SiS_GetLCDResInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned sh
|
||||
SiS_Pr->SiS_SetFlag |= LCDVESATiming;
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#if 0
|
||||
printk(KERN_DEBUG "sisfb: (LCDInfo=0x%04x LCDResInfo=0x%02x LCDTypeInfo=0x%02x)\n",
|
||||
SiS_Pr->SiS_LCDInfo, SiS_Pr->SiS_LCDResInfo, SiS_Pr->SiS_LCDTypeInfo);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS_XORG_XF86
|
||||
xf86DrvMsgVerb(0, X_PROBED, 4,
|
||||
"(init301: LCDInfo=0x%04x LCDResInfo=0x%02x LCDTypeInfo=0x%02x SetFlag=0x%04x)\n",
|
||||
@@ -4362,9 +4340,6 @@ SiS_DisableBridge(struct SiS_Private *SiS_Pr)
|
||||
* from outside the context of a mode switch!
|
||||
* MUST call getVBType before calling this
|
||||
*/
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
void
|
||||
SiS_EnableBridge(struct SiS_Private *SiS_Pr)
|
||||
{
|
||||
@@ -5212,13 +5187,8 @@ SiS_SetCRT2FIFO_300(struct SiS_Private *SiS_Pr,unsigned short ModeNo)
|
||||
|
||||
} else {
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
pci50 = sisfb_read_nbridge_pci_dword(SiS_Pr, 0x50);
|
||||
pciA0 = sisfb_read_nbridge_pci_dword(SiS_Pr, 0xa0);
|
||||
#else
|
||||
pci50 = sis_pci_read_host_bridge_u32(0x50);
|
||||
pciA0 = sis_pci_read_host_bridge_u32(0xA0);
|
||||
#endif
|
||||
|
||||
if(SiS_Pr->ChipType == SIS_730) {
|
||||
|
||||
@@ -9020,9 +8990,6 @@ SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val)
|
||||
SiS_SetChReg(SiS_Pr, reg, val, 0);
|
||||
}
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
void
|
||||
SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val)
|
||||
{
|
||||
@@ -9109,9 +9076,6 @@ SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempbx)
|
||||
|
||||
/* Read from Chrontel 70xx */
|
||||
/* Parameter is [Register no (S7-S0)] */
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
static
|
||||
#endif
|
||||
unsigned short
|
||||
SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempbx)
|
||||
{
|
||||
|
||||
@@ -59,25 +59,6 @@
|
||||
#include "sis_regs.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include "vgatypes.h"
|
||||
#include "vstruct.h"
|
||||
#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/fb.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
||||
#include <video/fbcon.h>
|
||||
#endif
|
||||
#include "sis.h"
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
|
||||
#include <linux/sisfb.h>
|
||||
#else
|
||||
#include <video/sisfb.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const unsigned char SiS_YPbPrTable[5][64] = {
|
||||
{ /* 525i */
|
||||
0x17,0x1d,0x03,0x09,0x05,0x06,0x0c,0x0c,
|
||||
@@ -304,9 +285,7 @@ static unsigned char SiS300_TrumpionData[14][80] = {
|
||||
#endif
|
||||
|
||||
void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_LockCRT2(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
|
||||
unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
|
||||
void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
|
||||
@@ -323,9 +302,7 @@ unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo
|
||||
unsigned short RefreshRateTableIndex);
|
||||
unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
|
||||
void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_EnableBridge(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
BOOLEAN SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
|
||||
void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
|
||||
void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
|
||||
@@ -334,10 +311,8 @@ void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned cha
|
||||
unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
|
||||
unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
|
||||
unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
#endif
|
||||
void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
|
||||
unsigned char orval,unsigned short andval);
|
||||
#ifdef SIS315H
|
||||
@@ -435,10 +410,6 @@ extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned s
|
||||
unsigned short *tempcl);
|
||||
extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
|
||||
extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS315H
|
||||
extern void SiS_SetGroup2_C_ELV(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
|
||||
41
src/osdef.h
41
src/osdef.h
@@ -53,12 +53,8 @@
|
||||
#define _SIS_OSDEF_H_
|
||||
|
||||
/* The choices are: */
|
||||
#undef SIS_LINUX_KERNEL /* Linux kernel framebuffer */
|
||||
#define SIS_XORG_XF86 /* XFree86/X.org */
|
||||
|
||||
#undef SIS_LINUX_KERNEL_24
|
||||
#undef SIS_LINUX_KERNEL_26
|
||||
|
||||
#ifdef OutPortByte
|
||||
#undef OutPortByte
|
||||
#endif
|
||||
@@ -83,43 +79,6 @@
|
||||
#undef InPortLong
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* LINUX KERNEL */
|
||||
/**********************************************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
#define SIS300
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
#define SIS315H
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
|
||||
#define SIS_LINUX_KERNEL_26
|
||||
#else
|
||||
#define SIS_LINUX_KERNEL_24
|
||||
#endif
|
||||
|
||||
#if !defined(SIS300) && !defined(SIS315H)
|
||||
#warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set
|
||||
#warning sisfb will not work!
|
||||
#endif
|
||||
|
||||
#define OutPortByte(p,v) outb((u8)(v),(unsigned long)(p))
|
||||
#define OutPortWord(p,v) outw((u16)(v),(unsigned long)(p))
|
||||
#define OutPortLong(p,v) outl((u32)(v),(unsigned long)(p))
|
||||
#define InPortByte(p) inb((unsigned long)(p))
|
||||
#define InPortWord(p) inw((unsigned long)(p))
|
||||
#define InPortLong(p) inl((unsigned long)(p))
|
||||
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
|
||||
|
||||
#endif /* LINUX_KERNEL */
|
||||
|
||||
/**********************************************************************/
|
||||
/* XFree86/X.org */
|
||||
/**********************************************************************/
|
||||
|
||||
@@ -51,10 +51,6 @@
|
||||
#ifndef _VGATYPES_H_
|
||||
#define _VGATYPES_H_
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include <linux/version.h>
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
@@ -71,14 +67,6 @@ typedef unsigned int BOOLEAN;
|
||||
|
||||
typedef unsigned long SISIOADDRESS;
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
|
||||
#include <linux/types.h> /* Need __iomem */
|
||||
#undef SISIOMEMTYPE
|
||||
#define SISIOMEMTYPE __iomem
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum _SIS_CHIP_TYPE {
|
||||
SIS_VGALegacy = 0,
|
||||
SIS_530,
|
||||
|
||||
@@ -240,22 +240,12 @@ struct SiS_Private
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
PCITAG PciTag;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
void *ivideo;
|
||||
#endif
|
||||
unsigned char *VirtualRomBase;
|
||||
BOOLEAN UseROM;
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
unsigned char SISIOMEMTYPE *VideoMemoryAddress;
|
||||
unsigned int VideoMemorySize;
|
||||
#endif
|
||||
SISIOADDRESS IOAddress;
|
||||
SISIOADDRESS IOAddress2; /* For dual chip XGI volari */
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
SISIOADDRESS RelIO;
|
||||
#endif
|
||||
SISIOADDRESS SiS_P3c4;
|
||||
SISIOADDRESS SiS_P3d4;
|
||||
SISIOADDRESS SiS_P3c0;
|
||||
|
||||
Reference in New Issue
Block a user