[RFC PATCH 1/2] Erase references to SiS 670 and 770 chipsets
Kevin Brace
kevinbrace at gmx.com
Wed Dec 25 18:52:36 UTC 2019
From: Kevin Brace <kevinbrace at bracecomputerlab.com>
SiS 670 and 770 chipsets were never released, and were likely renamed
to something else. The SiS 660 reference in the code refers to SiS
661 / 741 / 760 / 761 chipsets.
Signed-off-by: Kevin Brace <kevinbrace at bracecomputerlab.com>
---
src/init.c | 8 +++-----
src/initdef.h | 7 +++----
src/sis.h | 2 +-
src/sis_dac.c | 2 +-
src/sis_driver.c | 28 +++-------------------------
src/sis_setup.c | 10 +++++-----
src/sis_video.c | 8 ++++----
src/sis_video.h | 6 +++---
src/vgatypes.h | 6 +-----
9 files changed, 24 insertions(+), 53 deletions(-)
diff --git a/src/init.c b/src/init.c
index 4f84b0c..538b662 100644
--- a/src/init.c
+++ b/src/init.c
@@ -1112,7 +1112,6 @@ SiSInitPCIetc(struct SiS_Private *SiS_Pr)
case SIS_330:
case SIS_661:
case SIS_741:
- case SIS_660:
case SIS_760:
case SIS_761:
case SIS_340:
@@ -1194,7 +1193,6 @@ SiSSetLVDSetc(struct SiS_Private *SiS_Pr)
break;
case SIS_661:
case SIS_741:
- case SIS_660:
case SIS_760:
case SIS_761:
case SIS_340:
@@ -1737,7 +1735,7 @@ SiS_OpenCRTC(struct SiS_Private *SiS_Pr)
SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
if(IS_SIS651) SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x51,0x20);
SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
- } else if(IS_SIS661741660760) {
+ } else if(IS_SIS661741760761) {
SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x61,0xf7);
SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x51,0x1f);
SiS_SetRegAND(SiS_Pr->SiS_P3d4,0x56,0xe7);
@@ -1753,7 +1751,7 @@ SiS_CloseCRTC(struct SiS_Private *SiS_Pr)
#if 0 /* This locks some CRTC registers. We don't want that. */
unsigned short temp1 = 0, temp2 = 0;
- if(IS_SIS661741660760) {
+ if(IS_SIS661741760761) {
if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) {
temp1 = 0xa0; temp2 = 0x08;
}
@@ -1954,7 +1952,7 @@ SiS_SetATTRegs(struct SiS_Private *SiS_Pr, unsigned short StandTableIndex)
}
} else if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) {
if(SiS_Pr->ChipType >= SIS_315H) {
- if(IS_SIS550650740660) {
+ if(IS_SIS550650740661741760761) {
/* 315, 330 don't do this */
if(SiS_Pr->SiS_VBType & VB_SIS30xB) {
if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) ARdata = 0;
diff --git a/src/initdef.h b/src/initdef.h
index 62ec836..d078024 100644
--- a/src/initdef.h
+++ b/src/initdef.h
@@ -60,14 +60,13 @@
#define IS_SIS65x (IS_SIS651 || IS_SISM650) /* Only special versions of 65x */
#define IS_SIS661 (SiS_Pr->ChipType == SIS_661)
#define IS_SIS741 (SiS_Pr->ChipType == SIS_741)
-#define IS_SIS660 (SiS_Pr->ChipType == SIS_660)
#define IS_SIS760 (SiS_Pr->ChipType == SIS_760)
#define IS_SIS761 (SiS_Pr->ChipType == SIS_761)
-#define IS_SIS661741660760 (IS_SIS661 || IS_SIS741 || IS_SIS660 || IS_SIS760 || IS_SIS761)
+#define IS_SIS661741760761 (IS_SIS661 || IS_SIS741 || IS_SIS760 || IS_SIS761)
#define IS_SIS650740 ((SiS_Pr->ChipType >= SIS_650) && (SiS_Pr->ChipType < SIS_330))
#define IS_SIS550650740 (IS_SIS550 || IS_SIS650740)
-#define IS_SIS650740660 (IS_SIS650 || IS_SIS740 || IS_SIS661741660760)
-#define IS_SIS550650740660 (IS_SIS550 || IS_SIS650740660)
+#define IS_SIS650740661741760761 (IS_SIS650 || IS_SIS740 || IS_SIS661741760761)
+#define IS_SIS550650740661741760761 (IS_SIS550 || IS_SIS650740661741760761)
#define SISGETROMW(x) (ROMAddr[(x)] | (ROMAddr[(x)+1] << 8))
diff --git a/src/sis.h b/src/sis.h
index 70a961b..bb5ae9c 100644
--- a/src/sis.h
+++ b/src/sis.h
@@ -572,7 +572,7 @@ typedef unsigned char UChar;
#define SIS_530_VGA 1
#define SIS_OLD_VGA 2
#define SIS_300_VGA 3
-#define SIS_315_VGA 4 /* Includes 330/660/661/741/760/340/761 and M versions thereof, XGI */
+#define SIS_315_VGA 4 /* Includes 330/661/741/760/761/340 and M versions thereof, XGI */
/* pSiS->oldChipset */
#define OC_UNKNOWN 0
diff --git a/src/sis_dac.c b/src/sis_dac.c
index 04276b6..fa34976 100644
--- a/src/sis_dac.c
+++ b/src/sis_dac.c
@@ -1519,7 +1519,7 @@ int SiSMemBandWidth(ScrnInfoPtr pScrn, Bool IsForCRT2)
max = 680000;
break;
case PCI_CHIP_SIS660:
- if((pSiS->ChipType >= SIS_660) &&
+ if((pSiS->ChipType >= SIS_661) &&
(pSiS->ChipFlags & SiSCF_760LFB)) {
magic = magicDED[bus/64];
} else {
diff --git a/src/sis_driver.c b/src/sis_driver.c
index 390f887..aa25a99 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -188,7 +188,7 @@ static SymTabRec SISChipsets[] = {
{ PCI_CHIP_SIS550, "SIS550" },
{ PCI_CHIP_SIS650, "SIS650/M650/651/740" },
{ PCI_CHIP_SIS330, "SIS330(Xabre)" },
- { PCI_CHIP_SIS660, "SIS660/[M]661[F|M]X/[M]670/[M]741[GX]/[M]760[GX]/[M]761[GX]/[M]770[GX]" },
+ { PCI_CHIP_SIS660, "SIS[M]661[F|M]X/[M]741[GX]/[M]760[GX]/[M]761[GX]" },
{ PCI_CHIP_SIS340, "SIS340" },
{ -1, NULL }
};
@@ -3422,7 +3422,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_SIS550:
case PCI_CHIP_SIS650: /* 650 + 740 */
case PCI_CHIP_SIS330:
- case PCI_CHIP_SIS660: /* 660, 661, 741, 760, 761, 670(?), 770 */
+ case PCI_CHIP_SIS660: /* 661, 741, 760, 761 */
case PCI_CHIP_SIS340:
case PCI_CHIP_XGIXG20:
case PCI_CHIP_XGIXG40:
@@ -3750,15 +3750,10 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->SiS_SD3_Flags |= SiS_SD3_CRT1SATGAIN; /* FIXME ? */
pSiS->myCR63 = 0x53; /* sic! */
break;
- case PCI_CHIP_SIS660: /* 660, 661, 741, 760, 761, 670(?) */
+ case PCI_CHIP_SIS660: /* 661, 741, 760, 761 */
{
ULong hpciid = sis_pci_read_host_bridge_u32(0x00);
switch(hpciid) {
- case 0x06601039:
- pSiS->ChipType = SIS_660;
- pSiS->ChipFlags |= SiSCF_Ultra256Core;
- pSiS->NeedFlush = TRUE;
- break;
case 0x07601039:
pSiS->ChipType = SIS_760;
pSiS->ChipFlags |= SiSCF_Ultra256Core;
@@ -3769,11 +3764,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->ChipFlags |= SiSCF_Ultra256Core;
pSiS->NeedFlush = TRUE;
break;
- case 0x07701039:
- pSiS->ChipType = SIS_770;
- pSiS->ChipFlags |= SiSCF_Ultra256Core;
- pSiS->NeedFlush = TRUE;
- break;
case 0x07411039:
pSiS->ChipType = SIS_741;
pSiS->ChipFlags |= SiSCF_Real256ECore;
@@ -3783,15 +3773,11 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->ChipType = SIS_661;
pSiS->ChipFlags |= SiSCF_Real256ECore;
break;
- case 0x06701039:
- pSiS->ChipType = SIS_670;
- pSiS->ChipFlags |= SiSCF_Real256ECore;
}
/* Detection could also be done by CR5C & 0xf8:
* 0x10 = 661 (CR5F & 0xc0: 0x00 both A0 and A1)
* 0x80 = 760 (CR5F & 0xc0: 0x00 A0, 0x40 A1)
* 0x90 = 741 (CR5F & 0xc0: 0x00 A0,A1 0x40 A2)
- * other: 660 (CR5F & 0xc0: 0x00 A0 0x40 A1) (DOA?)
*/
pSiS->ChipFlags |= (SiSCF_Integrated | SiSCF_MMIOPalette);
pSiS->SiS_SD_Flags |= SiS_SD_IS330SERIES;
@@ -13006,14 +12992,6 @@ SiSPostSetMode(ScrnInfoPtr pScrn, SISRegPtr sisReg)
}
break;
- case SIS_660:
- clklimit1 = clklimit2 = 200; /* ? */
- if(pSiS->ChipFlags & SiSCF_760LFB) { /* LFB only */
- clklimit1 = clklimit2 = 220;
- }
- clklimitg = 200; /* ? */
- break;
-
case SIS_315H:
case SIS_315:
case SIS_315PRO:
diff --git a/src/sis_setup.c b/src/sis_setup.c
index 562f28d..307e68f 100644
--- a/src/sis_setup.c
+++ b/src/sis_setup.c
@@ -667,7 +667,7 @@ sis315Setup(ScrnInfoPtr pScrn)
pSiS->BusWidth);
}
-/* For 550, 65x, 740, 661, 741, 660, 760, 761 */
+/* For 550, 65x, 740, 661, 741, 760, 761 */
static void
sis550Setup(ScrnInfoPtr pScrn)
{
@@ -685,7 +685,7 @@ sis550Setup(ScrnInfoPtr pScrn)
if(pSiS->Chipset == PCI_CHIP_SIS660) {
- if(pSiS->ChipType >= SIS_660) {
+ if(pSiS->ChipType >= SIS_661) {
/* UMA - shared fb */
pScrn->videoRam = 0;
@@ -833,7 +833,7 @@ sis550Setup(ScrnInfoPtr pScrn)
inSISIDXREG(SISCR, 0x79, config);
pSiS->BusWidth = (config & 0x04) ? 128 : 64;
ramtype = (config & 0x01) ? 8 : 4;
- if(pSiS->ChipType >= SIS_660) {
+ if(pSiS->ChipType >= SIS_661) {
pScrn->videoRam = 0;
if(config & 0xf0) {
pScrn->videoRam = (1 << ((config & 0xf0) >> 4)) * 1024;
@@ -884,7 +884,7 @@ sis550Setup(ScrnInfoPtr pScrn)
* - no DDR * 2 for bandwidth calculation,
* - overlay magic (bandwidth dependent one/two overlay stuff)
*/
- if((pSiS->ChipType >= SIS_760) && (pSiS->ChipType <= SIS_770)) {
+ if((pSiS->ChipType >= SIS_760) && (pSiS->ChipType <= SIS_761)) {
if(!(pSiS->ChipFlags & SiSCF_760LFB)) {
ddrtimes2 = FALSE;
pSiS->SiS_SD2_Flags |= SiS_SD2_SUPPORT760OO;
@@ -936,7 +936,7 @@ SiSSetup(ScrnInfoPtr pScrn)
break;
case PCI_CHIP_SIS550:
case PCI_CHIP_SIS650: /* + 740,M650,651 */
- case PCI_CHIP_SIS660: /* + (M)661,(M)741,(M)760(GX), (M)761(GX), 770? */
+ case PCI_CHIP_SIS660: /* + (M)661,(M)741,(M)760(GX), (M)761(GX) */
sis550Setup(pScrn);
break;
case PCI_CHIP_SIS5597:
diff --git a/src/sis_video.c b/src/sis_video.c
index 3eeda5e..5777ffc 100644
--- a/src/sis_video.c
+++ b/src/sis_video.c
@@ -60,14 +60,14 @@
* DISPMODE is either SINGLE1 or SINGLE2, hence you need to check dualHeadMode flag
* DISPMODE is _never_ MIRROR.
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* Overlay 1 is used on CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
* Overlay is used for either CRT1 or CRT2
* -) merged fb mode:
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* DISPMODE is always MIRROR. Overlay 1 is used for CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
@@ -75,7 +75,7 @@
* CRT1 or CRT2 (automatically, where it is located)
* -) mirror mode (without dualhead or mergedfb)
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* DISPMODE is MIRROR. Overlay 1 is used for CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
@@ -521,7 +521,7 @@ SISResetVideo(ScrnInfoPtr pScrn)
setvideoreg(pSiS, Index_VI_Win_Ver_Disp_Start_Low, 0x00);
setvideoreg(pSiS, Index_VI_Win_Ver_Over, 0x00);
- /* Initialize second overlay (CRT2) - only for 300, 630/730, 550, M650/651, 661/741/660/760 */
+ /* Initialize second overlay (CRT2) - only for 300, 630/730, 550, M650/651, 661/741/760/761 */
if(pSiS->hasTwoOverlays) {
if(pSiS->VGAEngine == SIS_300_VGA) {
diff --git a/src/sis_video.h b/src/sis_video.h
index 903a6c4..c722799 100644
--- a/src/sis_video.h
+++ b/src/sis_video.h
@@ -60,14 +60,14 @@
* DISPMODE is either SINGLE1 or SINGLE2, hence you need to check dualHeadMode flag
* DISPMODE is _never_ MIRROR.
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* Overlay 1 is used on CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
* Overlay is used for either CRT1 or CRT2
* -) merged fb mode:
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* DISPMODE is always MIRROR. Overlay 1 is used for CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
@@ -75,7 +75,7 @@
* CRT1 or CRT2 (automatically, where it is located)
* -) mirror mode (without dualhead or mergedfb)
* a) Chipsets with 2 overlays:
- * 315/330 series: Only half sized overlays available (width 960), 660: 1536
+ * 315/330 series: Only half sized overlays available (width 960), 660 series: 1536
* DISPMODE is MIRROR. Overlay 1 is used for CRT1, overlay 2 for CRT2.
* b) Chipsets with 1 overlay:
* Full size overlays available.
diff --git a/src/vgatypes.h b/src/vgatypes.h
index d6e7b6e..02a012f 100644
--- a/src/vgatypes.h
+++ b/src/vgatypes.h
@@ -96,12 +96,8 @@ typedef enum _SIS_CHIP_TYPE {
SIS_330,
SIS_661,
SIS_741,
- SIS_670,
- SIS_660 = 35,
- SIS_760,
+ SIS_760 = 35,
SIS_761,
- SIS_762,
- SIS_770,
SIS_340 = 55,
SIS_341,
SIS_342,
--
2.17.1
More information about the xorg-devel
mailing list