Commit 2d51792a authored by Thomas Winischhofer's avatar Thomas Winischhofer

SiS driver:

- MergedFB/Xinerama: Added support for non-rectangular layouts (no panning
    into dead areas, mouse restriced to accessible areas)
- MergedFB/Xinerama: Added support for RandR. Current window managers are
    smart enough to update their Xinerama-info on RandR events. This
    practically allows switching from dual-head operation to single-head
    operation (by switching to a clone mode and simultaniously resizing the
    desktop) and vice versa.
- MergedFB: Improved "physical alignment compensation" Offset by
    disallowing panning and mouse movements into dead areas. (However,
    RandR is disabled if that Offset is used.)
- MergedFB: Made identically looking MetaModes work with RandR. (by
    supplying a fake rate.)
- Added "Reflect" feature: Reflect screen in x, y or x+y direction (Uses
    shadow framebuffer; no accel, no Xv, no HWCursor.)
- Added aspect ratio detection for analog (VGA) devices. Produces different
    default modes for 800x480, 1024x576, 1280x720,
1280x768 and 1280x800 depending on the aspect ratio. Options exist to
    overrule this for each output device.
- Fixed FSTN support on SiS55x (for 320x240 xSTN panels)
- Workaround for SiS76x memory access latency issues if no local
    framebuffer memory is present. Driver now allows only one video overlay
    and assumes a quite restricted memory bandwidth. This chip is really
    crippled. / If in hybrid mode, the driver only uses the LFB memory
    (required changes in the video memory layout)
- Minor fix for machines with Trumpion Zurac LVDS scalers.
- Fixed bug in SaveScreen() causing a sig 11 sometimes.
- Added screen blanking for TV output
- Added two widescreen modes for PAL/NTSC TV output
- Numerous minor fixes and clean-ups.
- Numerous whitespace cleanups. Sorry for the noise.
parent 291fc2d3
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -248,12 +248,12 @@ static const UCHAR SiS_LCDStruct661[] = {
0x00,0x04,0x00,0x03,0x00,0x49,0xCE,0x1E,0x00,0x00,0x00,0x00,0x09,
/* 1680x1050 */
0x0D,0xE0,0x90,0x06,0x1A,0x04,0x6C,0x07,0x2A,0x04,0x1A,0x00,0x4C,
0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06,
0x00,0x03,0x00,0x06,0x00,0x79,0xBE,0x44,0x00,0x00,0x00,0x00,0x06,
};
#endif
#ifdef SIS300
static UCHAR SiS300_TrumpionData[7][80] = {
static UCHAR SiS300_TrumpionData[14][80] = {
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23,
0x00,0x00,0x03,0x28,0x03,0x10,0x05,0x08,0x40,0x10,0x00,0x10,0x04,0x23,0x00,0x23,
......@@ -288,7 +288,43 @@ static UCHAR SiS300_TrumpionData[7][80] = {
0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01,
0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 }
0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x5B,0x01,0xBE,0x01,0x00 },
/* variant 2 */
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05,
0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x15,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x18,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x44,0x03,0x28,0x06,0x08,0x40,0x18,0x00,0x18,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xA6,0x01,0xFF,0x03,0xFF,0x19,0x01,0x00,0x05,0x13,0x04,0x04,0x05,
0x04,0x0C,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x8A,0x00,0xD8,0x02,
0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x72,0x00,0xD8,0x02,
0x84,0x03,0x16,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x1C,0x00,0x20,0x04,0x23,
0x00,0x01,0x03,0x53,0x03,0x28,0x06,0x08,0x40,0x1C,0x00,0x16,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xDA,0x01,0xFF,0x0F,0xF4,0x18,0x07,0x05,0x05,0x13,0x04,0x04,0x05,
0x01,0x0B,0x13,0x0A,0x02,0xB0,0x00,0x00,0x02,0xBA,0xF0,0x55,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x02,0x00,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
0x20,0x03,0x16,0x00,0xE0,0x01,0x0D,0x02,0x60,0x0C,0x30,0x98,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x45,0x03,0x48,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0xF4,0x01,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x05,0x01,0x00,0x05,0x05,
0x04,0x0C,0x08,0x05,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x02,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xBF,0x00,0x20,0x03,
0x20,0x04,0x0D,0x00,0x58,0x02,0x71,0x02,0x80,0x0C,0x30,0x9A,0x00,0xFA,0x03,0x1D,
0x00,0x01,0x03,0x22,0x03,0x28,0x06,0x08,0x40,0x98,0x00,0x98,0x04,0x1D,0x00,0x1D,
0x03,0x11,0x60,0x39,0x03,0x40,0x05,0xF4,0x18,0x07,0x02,0x06,0x04,0x01,0x06,0x0B,
0x02,0x0A,0x20,0x19,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 },
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x11,0x00,0x0D,0x10,0xEF,0x00,0x00,0x04,
0x40,0x05,0x13,0x00,0x00,0x03,0x26,0x03,0x88,0x0C,0x30,0x90,0x00,0x00,0x04,0x23,
0x00,0x01,0x03,0x24,0x03,0x28,0x06,0x08,0x40,0x90,0x00,0x90,0x04,0x23,0x00,0x23,
0x03,0x11,0x60,0x40,0x05,0xFF,0x0F,0xF4,0x18,0x01,0x00,0x08,0x01,0x00,0x08,0x01,
0x00,0x08,0x01,0x01,0x02,0xB0,0x00,0x00,0x02,0xBA,0xEA,0x58,0x01,0xBE,0x01,0x00 }
};
#endif
......@@ -403,9 +439,11 @@ extern void SiS_LoadDAC(SiS_Private *SiS_Pr, PSIS_HW_INFO, USHORT ModeNo,
extern void SiS_CalcLCDACRT1Timing(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
PSIS_HW_INFO HwInfo);
extern void SiS_CalcCRRegisters(SiS_Private *SiS_Pr, int depth);
extern USHORT SiS_GetRefCRTVCLK(SiS_Private *SiS_Pr, USHORT Index, int UseWide);
extern USHORT SiS_GetRefCRT1CRTC(SiS_Private *SiS_Pr, USHORT Index, int UseWide);
#ifdef LINUX_XF86
extern void SiS_MakeClockRegs(ScrnInfoPtr pScrn, int clock, UCHAR *p2b, UCHAR *p2c);
extern int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct,
extern int SiS_FindPanelFromDB(SISPtr pSiS, USHORT panelvendor, USHORT panelproduct,
int *maxx, int *maxy, int *prefx, int *prefy);
#endif
......
......@@ -109,7 +109,7 @@
#define SetNotSimuMode 0x0400
#define SetNotSimuTVMode SetNotSimuMode
#define SetDispDevSwitch 0x0800
#define SetCRT2ToYPbPr525750 0x0800
#define SetCRT2ToYPbPr525750 0x0800
#define LoadDACFlag 0x1000
#define DisableCRT2Display 0x2000
#define DriverMode 0x4000
......@@ -153,7 +153,7 @@
#define SupportCHTV 0x0800
#define Support64048060Hz 0x0800 /* Special for 640x480 LCD */
#define SupportHiVision 0x0010
#define SupportYPbPr750p 0x1000
#define SupportYPbPr750p 0x1000
#define SupportLCD 0x0020
#define SupportRAMDAC2 0x0040 /* All (<= 100Mhz) */
#define SupportRAMDAC2_135 0x0100 /* All except DH (<= 135Mhz) */
......@@ -161,6 +161,7 @@
#define SupportRAMDAC2_202 0x0400 /* C (<= 202Mhz) */
#define InterlaceMode 0x0080
#define SyncPP 0x0000
#define HaveWideTiming 0x2000 /* Have specific wide- and non-wide timing */
#define SyncPN 0x4000
#define SyncNP 0x8000
#define SyncNN 0xc000
......@@ -209,7 +210,8 @@
#define SF_IsM661 0x0020
#define SF_IsM741 0x0040
#define SF_IsM760 0x0080
#define SF_760LFB 0x8000 /* 760: We have LFB */
#define SF_760UMA 0x4000 /* 76x: We have UMA */
#define SF_760LFB 0x8000 /* 76x: We have LFB */
/* CR32 (Newer 630, and 315 series)
......@@ -229,25 +231,19 @@
#define TVOverScanShift 4
/* CR35 (661 series only)
[0] 1 = PAL, 0 = NTSC
[1] 1 = NTSC-J (if D0 = 0)
[2] 1 = PALM (if D0 = 1)
[3] 1 = PALN (if D0 = 1)
[4] 1 = Overscan (Chrontel only)
[7:5] (only if D2 in CR38 is set)
000 525i
001 525p
000 525i
001 525p
010 750p
011 1080i (or HiVision on 301, 301B)
These bits are being translated to TVMode flag.
*/
/*
CR37
/* CR37
[0] Set 24/18 bit (0/1) RGB to LVDS/TMDS transmitter (set by BIOS)
[3:1] External chip
300 series:
......@@ -261,7 +257,7 @@
010 LVDS
011 LVDS + Chrontel 7019
660 series [2:1] only:
reserved (now in CR38)
reserved (chip type now in CR38)
All other combinations reserved
[3] 661 only: Pass 1:1 data
[4] LVDS: 0: Panel Link expands / 1: Panel Link does not expand
......@@ -321,6 +317,7 @@
#define Enable302LV_DualLink 0x04 /* 302LV only; enable dual link */
/* CR39 (661 and later)
D[7] LVDS (SiS or third party)
D[1:0] YPbPr Aspect Ratio
00 4:3 letterbox
01 4:3
......@@ -342,7 +339,7 @@
0101 Set Contrast event
0110 Set Mute event
0111 Set Volume Up/Down event
[4] Enable Backlight Control by BIOS/driver
[4] Enable Backlight Control by BIOS/driver
(set by driver; set means that the BIOS should
not touch the backlight registers because eg.
the driver already switched off the backlight)
......@@ -351,6 +348,26 @@
[7] TV UnderScan/OverScan (set by BIOS)
*/
/* CR7C - 661 and later
[7] DualEdge enabled (or: to be enabled)
[6] CRT2 = TV/LCD/VGA enabled (or: to be enabled)
[5] Init done (set at end of SiS_Init)
{4] LVDS LCD capabilities
[3] LVDS LCD capabilities
[2] LVDS LCD capabilities (PWD)
[1] LVDS LCD capabilities (PWD)
[0] LVDS=1, TMDS=0 (SiS or third party)
*/
/* CR7E - 661 and later
VBType:
[7] LVDS (third party)
[3] 301C
[2] 302LV
[1] 301LV
[0] 301B
*/
/* LCDResInfo */
#define Panel300_800x600 0x01 /* CR36 */
#define Panel300_1024x768 0x02
......@@ -360,7 +377,6 @@
#define Panel300_1024x600 0x06
#define Panel300_1152x768 0x07
#define Panel300_1280x768 0x0a
#define Panel300_320x480 0x0e /* fstn - This is fake, can be any */
#define Panel300_Custom 0x0f
#define Panel300_Barco1366 0x10
......@@ -375,9 +391,9 @@
#define Panel310_1400x1050 0x09
#define Panel310_1280x768 0x0a
#define Panel310_1600x1200 0x0b
#define Panel310_640x480_2 0x0c
#define Panel310_640x480_3 0x0d
#define Panel310_320x480 0x0e /* fstn - TW: This is fake, can be any */
#define Panel310_320x240_2 0x0c /* xSTN */
#define Panel310_320x240_3 0x0d /* xSTN */
#define Panel310_320x240_1 0x0e /* xSTN - This is fake, can be any */
#define Panel310_Custom 0x0f
#define Panel661_800x600 0x01
......@@ -411,11 +427,11 @@
#define Panel_1680x1050 0x0d /* 661etc */
#define Panel_1280x720 0x0e /* 661etc */
#define Panel_Custom 0x0f /* MUST BE 0x0f (for DVI DDC detection) */
#define Panel_320x480 0x10 /* SiS 550 fstn - TW: This is fake, can be any */
#define Panel_320x240_1 0x10 /* SiS 550 xSTN */
#define Panel_Barco1366 0x11
#define Panel_848x480 0x12
#define Panel_640x480_2 0x13 /* SiS 550 */
#define Panel_640x480_3 0x14 /* SiS 550 */
#define Panel_320x240_2 0x13 /* SiS 550 xSTN */
#define Panel_320x240_3 0x14 /* SiS 550 xSTN */
#define Panel_1280x768_2 0x15 /* 30xLV */
#define Panel_1280x768_3 0x16 /* (unused) */
#define Panel_1280x800_2 0x17 /* 30xLV */
......@@ -485,22 +501,22 @@
#define VCLK_CUSTOM_300 0x47
#define VCLK65_315 0x0b /* Indices in (VB)VCLKData table (315) */
#define VCLK108_2_315 0x19
#define VCLK81_315 0x5b
#define VCLK162_315 0x5e
#define VCLK108_3_315 0x45
#define VCLK100_315 0x46
#define VCLK108_2_315 0x19
#define VCLK81_315 0x5b
#define VCLK162_315 0x5e
#define VCLK108_3_315 0x45
#define VCLK100_315 0x46
#define VCLK34_315 0x55
#define VCLK68_315 0x0d
#define VCLK_1280x800_315_2 0x5c
#define VCLK121_315 0x5d
#define VCLK130_315 0x72
#define VCLK_1280x800_315_2 0x5c
#define VCLK121_315 0x5d
#define VCLK130_315 0x72
#define VCLK_1280x720 0x5f
#define VCLK_1280x768_2 0x60
#define VCLK_1280x768_3 0x61 /* (unused?) */
#define VCLK_CUSTOM_315 0x62
#define VCLK_1280x720_2 0x63
#define VCLK_720x480 0x67
#define VCLK_720x480 0x67
#define VCLK_720x576 0x68
#define VCLK_768x576 0x68
#define VCLK_848x480 0x65
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,22 +42,22 @@
#define DRM_SIS_FB_INIT 0x16
typedef struct {
int context;
unsigned long offset;
unsigned long size;
void *free;
int context;
unsigned long offset;
unsigned long size;
void *free;
} drm_sis_mem_t;
typedef struct {
unsigned long offset, size;
unsigned long offset, size;
} drm_sis_agp_t;
typedef struct {
unsigned long offset, size;
unsigned long offset, size;
} drm_sis_fb_t;
typedef struct {
unsigned int left, right;
unsigned int left, right;
} drm_sis_flip_t;
#endif /* _SIS_COMMON_H_ */
......
This diff is collapsed.
This diff is collapsed.
......@@ -43,37 +43,37 @@ int SiSMclk(SISPtr pSiS);
void SiSRestoreBridge(ScrnInfoPtr pScrn, SISRegPtr sisReg);
void SiS_UpdateGammaCRT2(ScrnInfoPtr pScrn);
extern void SiS6326SetTVReg(ScrnInfoPtr pScrn, CARD8 index, CARD8 data);
extern UChar SiS6326GetTVReg(ScrnInfoPtr pScrn, CARD8 index);
extern void SiS6326SetXXReg(ScrnInfoPtr pScrn, CARD8 index, CARD8 data);
extern UChar SiS6326GetXXReg(ScrnInfoPtr pScrn, CARD8 index);
extern void SiS6326SetTVReg(ScrnInfoPtr pScrn, CARD8 index, CARD8 data);
extern UChar SiS6326GetTVReg(ScrnInfoPtr pScrn, CARD8 index);
extern void SiS6326SetXXReg(ScrnInfoPtr pScrn, CARD8 index, CARD8 data);
extern UChar SiS6326GetXXReg(ScrnInfoPtr pScrn, CARD8 index);
extern int SiSCalcVRate(DisplayModePtr mode);
extern float SiSCalcVRate(DisplayModePtr mode);
extern void SISCalculateGammaRampCRT2(ScrnInfoPtr pScrn);
extern void SISCalculateGammaRampCRT2(ScrnInfoPtr pScrn);
/* Functions from init.c and init301.c (use their datatypes!) */
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
extern USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx);
extern USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax, USHORT tempbh);
extern void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
extern USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
extern USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine,
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempbx);
extern USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx);
extern USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
extern void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax, USHORT tempbh);
extern void SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime);
extern USHORT SiS_ReadDDC1Bit(SiS_Private *SiS_Pr);
extern USHORT SiS_HandleDDC(SiS_Private *SiS_Pr, ULONG VBFlags, int VGAEngine,
USHORT adaptnum, USHORT DDCdatatype, UCHAR *buffer);
extern void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
extern void SiS_DisplayOn(SiS_Private *SiS_Pr);
extern void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
extern void SiS_DisplayOn(SiS_Private *SiS_Pr);
extern UCHAR SiS_GetSetModeID(ScrnInfoPtr pScrn, UCHAR id);
extern void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
extern void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
extern void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
extern void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
extern void SiSRegInit(SiS_Private *SiS_Pr, USHORT BaseAddr);
extern void SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension, USHORT ModeNo);
extern void SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO);
extern void SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension, USHORT ModeNo);
extern void SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO);
/* End of init.c/init301.c imports */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -37,7 +37,7 @@
* -) VBE 3.0 on SiS300 and 315 series do not support 24 fpp modes
* -) Only SiS315 series support 1920x1440x32
*/
static const UShort VESAModeIndices[] = {
/* x y 8 16 (24) 32 */
320, 200, 0x138, 0x10e, 0x000, 0x000,
......@@ -52,7 +52,7 @@ static const UShort VESAModeIndices[] = {
1600,1200, 0x130, 0x131, 0x000, 0x13e,
1920,1440, 0x13f, 0x140, 0x000, 0x141,
9999,9999, 0, 0, 0, 0
};
};
/* For calculating refresh rate index (CR33) */
static const struct _sis_vrate {
......@@ -67,15 +67,15 @@ static const struct _sis_vrate {
{1, 400, 300, 60, TRUE},
{1, 512, 384, 60, TRUE},
{1, 640, 400, 60, TRUE}, {1, 640, 400, 72, TRUE},
{1, 640, 480, 60, TRUE}, {2, 640, 480, 72, TRUE}, {3, 640, 480, 75, TRUE},
{4, 640, 480, 85, TRUE}, {5, 640, 480, 100, TRUE}, {6, 640, 480, 120, TRUE},
{1, 640, 480, 60, TRUE}, {2, 640, 480, 72, TRUE}, {3, 640, 480, 75, TRUE},
{4, 640, 480, 85, TRUE}, {5, 640, 480, 100, TRUE}, {6, 640, 480, 120, TRUE},
{7, 640, 480, 160, FALSE}, {8, 640, 480, 200, FALSE},
{1, 720, 480, 60, TRUE},
{1, 720, 576, 60, TRUE},
{1, 768, 576, 60, TRUE},
{1, 800, 480, 60, TRUE}, {2, 800, 480, 75, TRUE}, {3, 800, 480, 85, TRUE},
{1, 800, 600, 56, TRUE}, {2, 800, 600, 60, TRUE}, {3, 800, 600, 72, TRUE},
{4, 800, 600, 75, TRUE}, {5, 800, 600, 85, TRUE}, {6, 800, 600, 105, TRUE},
{1, 800, 600, 56, TRUE}, {2, 800, 600, 60, TRUE}, {3, 800, 600, 72, TRUE},
{4, 800, 600, 75, TRUE}, {5, 800, 600, 85, TRUE}, {6, 800, 600, 105, TRUE},
{7, 800, 600, 120, FALSE}, {8, 800, 600, 160, FALSE},
{1, 848, 480, 39, TRUE}, {2, 848, 480, 60, TRUE},
{1, 856, 480, 39, TRUE}, {2, 856, 480, 60, TRUE},
......@@ -89,8 +89,8 @@ static const struct _sis_vrate {
{1, 1152, 768, 60, TRUE},
{1, 1152, 864, 60, TRUE}, {1, 1152, 864, 75, TRUE}, {2, 1152, 864, 84, FALSE},
{1, 1280, 720, 60, TRUE}, {2, 1280, 720, 75, FALSE}, {3, 1280, 720, 85, TRUE},
{1, 1280, 768, 60, TRUE},
{1, 1280, 800, 60, TRUE},
{1, 1280, 768, 60, TRUE}, {2, 1280, 768, 75, TRUE}, {3, 1280, 768, 85, TRUE},
{1, 1280, 800, 60, TRUE}, {2, 1280, 800, 75, TRUE}, {3, 1280, 800, 85, TRUE},
{1, 1280, 960, 60, TRUE}, {2, 1280, 960, 85, TRUE},
{1, 1280, 1024, 43, FALSE}, {2, 1280, 1024, 60, TRUE}, {3, 1280, 1024, 75, FALSE},
{4, 1280, 1024, 85, TRUE},
......@@ -103,7 +103,7 @@ static const struct _sis_vrate {
{1, 1920, 1080, 30, TRUE},
{1, 1920, 1440, 60, TRUE}, {2, 1920, 1440, 65, TRUE}, {3, 1920, 1440, 70, TRUE},
{4, 1920, 1440, 75, TRUE}, {5, 1920, 1440, 85, TRUE}, {6, 1920, 1440, 100, TRUE},
{1, 2048, 1536, 60, TRUE}, {2, 2048, 1536, 65, TRUE}, {3, 2048, 1536, 70, TRUE},
{1, 2048, 1536, 60, TRUE}, {2, 2048, 1536, 65, TRUE}, {3, 2048, 1536, 70, TRUE},
{4, 2048, 1536, 75, TRUE}, {5, 2048, 1536, 85, TRUE},
{0, 0, 0, 0, FALSE}
};
......@@ -130,7 +130,7 @@ static const chswtable mychswtable[] = {
};
/* These machines require special timing/handling
*/
*/
const customttable mycustomttable[] = {
{ SIS_630, "2.00.07", "09/27/2002-13:38:25",
0x3240A8,
......@@ -244,6 +244,15 @@ const customttable mycustomttable[] = {
0x1043, 0x1612,
"Asus", "A2H (V2)", CUT_ASUSA2H_2, "ASUS_A2H_2"
},
#if 0
{ SIS_550, "1.02.0z", "",
0x317f37, /* 320x240 LCD panel */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0, 0,
"AAEON", "AOP-8060", CUT_AOP8060, "AAEON_AOP_8060"
},
#endif
{ 4321, "", "", /* never autodetected */
0,
{ 0, 0, 0, 0, 0 },
......@@ -656,7 +665,7 @@ static DisplayModeRec SiS6326SIS1600x1200_60Mode = {
};
/* TV filters for SiS video bridges
*/
*/
static const struct _SiSTVFilter301 {
UChar filter[7][4];
} SiSTVFilter301[] = {
......@@ -780,7 +789,7 @@ static const struct _SiSTVFilter301B {
};
/* TV scaling data for SiS video bridges
*/
*/
typedef struct _SiSTVVScale {
UShort ScaleVDE;
int sindex;
......@@ -1281,12 +1290,12 @@ static void SISAdjustFrame(int scrnIndex, int x, int y, int flags);
static Bool SISSaveScreenDH(ScreenPtr pScreen, int mode);
#endif
#ifdef X_XF86MiscPassMessage
static int SISHandleMessage(int scrnIndex, const char *msgtype,
static int SISHandleMessage(int scrnIndex, const char *msgtype,
const char *msgval, char **retmsg);
static int SISCheckModeTimingForCRT2Type(ScrnInfoPtr pScrn, UShort cond, UShort hdisplay,
UShort vdisplay, UShort htotal, UShort vtotal,
static int SISCheckModeTimingForCRT2Type(ScrnInfoPtr pScrn, UShort cond, UShort hdisplay,
UShort vdisplay, UShort htotal, UShort vtotal,
UShort hsyncstart, UShort hsyncend, UShort vsyncstart,
UShort vsyncend, int clock, Bool quiet);
UShort vsyncend, int clock, Bool quiet);
#endif
/* Optional functions */
......@@ -1324,10 +1333,10 @@ static UShort SiS_CheckModeCRT1(ScrnInfoPtr pScrn, DisplayModePtr mode,
ULong VBFlags, Bool hcm);
static UShort SiS_CheckModeCRT2(ScrnInfoPtr pScrn, DisplayModePtr mode,
ULong VBFlags, Bool hcm);
#ifdef SISMERGED
static Bool InRegion(int x, int y, region r);
static void SISMergePointerMoved(int scrnIndex, int x, int y);
static void SISMergedPointerMoved(int scrnIndex, int x, int y);
#endif
Bool SiSBridgeIsInSlaveMode(ScrnInfoPtr pScrn);
UShort SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode, ULong VBFlags);
......@@ -1352,7 +1361,9 @@ extern Bool SiSVGASaveScreen(ScreenPtr pScreen, int mode);
/* shadow */
extern void SISPointerMoved(int index, int x, int y);
extern void SISPointerMovedReflect(int index, int x, int y);
extern void SISRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
extern void SISRefreshAreaReflect(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
extern void SISRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
extern void SISRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
extern void SISRefreshArea24(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
......@@ -1385,9 +1396,9 @@ extern BOOLEAN SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
extern BOOLEAN SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom);
extern BOOLEAN SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension,
ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom);
ScrnInfoPtr pScrn, DisplayModePtr mode, BOOLEAN IsCustom);
extern DisplayModePtr SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN includelcdmodes,
BOOLEAN isfordvi, BOOLEAN fakecrt2modes);
BOOLEAN isfordvi, BOOLEAN fakecrt2modes, BOOLEAN IsForCRT2);
extern void SiS_Chrontel701xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension);
extern void SiS_Chrontel701xBLOff(SiS_Private *SiS_Pr);
extern void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwDeviceExtension);
......
......@@ -369,6 +369,11 @@ vidCopyFunc SiSVidCopyInit(ScreenPtr pScreen, vidCopyFunc *UMemCpy)
return SiS_libc_memcpy;
}
vidCopyFunc SiSVidCopyGetDefault(void)
{
return SiS_libc_memcpy;
}
#else /* ! Everything below is gcc specific ! */
/************************************************************************/
......@@ -1023,7 +1028,8 @@ static unsigned int SiS_GetCpuFeatures(ScrnInfoPtr pScrn)
/**********************************************************************/
#ifdef SiS_canBenchmark
static vidCopyFunc SiSVidCopyInitGen(ScreenPtr pScreen, SISMCFuncData *MCFunctions, vidCopyFunc *UMemCpy)
static vidCopyFunc
SiSVidCopyInitGen(ScreenPtr pScreen, SISMCFuncData *MCFunctions, vidCopyFunc *UMemCpy)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
SISPtr pSiS = SISPTR(pScrn);
......@@ -1085,7 +1091,8 @@ static vidCopyFunc SiSVidCopyInitGen(ScreenPtr pScreen, SISMCFuncData *MCFunctio
/* (called externally) */
/**********************************************************************/
unsigned int SiSGetCPUFlags(ScrnInfoPtr pScrn)
unsigned int
SiSGetCPUFlags(ScrnInfoPtr pScrn)
{
unsigned int myCPUflags = SiS_GetCpuFeatures(pScrn);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment