Skip to content

Commit

Permalink
staging/xgifb: Rename remaining sis initdef.h defines and remove dupl…
Browse files Browse the repository at this point in the history
…icates

This patch renames the remaining duplicate defines and their usage to
the naming convention of the sis initdef.h and removes the now duplicated
defines.

Renames:
CRT2DisplayFlag -> DisableCRT2Display
ModeInfoFlag -> ModeTypeMask

Support16Bpp -> Mode16Bpp
Support32Bpp -> Mode32Bpp

SupportHiVisionTV -> SupportHiVision
SupportYPbPr -> SupportYPbPr750p
SwitchToCRT2 -> SwitchCRT2

VB_XGI301 -> VB_SIS301
VB_XGI301B -> VB_SIS301B
VB_XGI301LV -> VB_SIS301LV
VB_XGI302B -> VB_SIS302B
VB_XGI302LV -> VB_SIS302LV
VB_YPbPr525p -> YPbPr525p
VB_YPbPr750p -> YPbPr750p

VCLK108_2 -> VCLK108_2_315
VCLK65 -> VCLK65_315

XGI_CRT2_PORT_04 -> SIS_CRT2_PORT_04
XGI_CRT2_PORT_10 -> SIS_CRT2_PORT_10
XGI_CRT2_PORT_12 -> SIS_CRT2_PORT_12
XGI_CRT2_PORT_14 -> SIS_CRT2_PORT_14

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peter Huewe authored and Greg Kroah-Hartman committed Feb 10, 2012
1 parent 599801f commit 6896b94
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 276 deletions.
10 changes: 5 additions & 5 deletions drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,15 @@ static void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)
XGI_Pr->P3c9 = BaseAddr + 0x19;
XGI_Pr->P3da = BaseAddr + 0x2A;
/* Digital video interface registers (LCD) */
XGI_Pr->Part1Port = BaseAddr + XGI_CRT2_PORT_04;
XGI_Pr->Part1Port = BaseAddr + SIS_CRT2_PORT_04;
/* 301 TV Encoder registers */
XGI_Pr->Part2Port = BaseAddr + XGI_CRT2_PORT_10;
XGI_Pr->Part2Port = BaseAddr + SIS_CRT2_PORT_10;
/* 301 Macrovision registers */
XGI_Pr->Part3Port = BaseAddr + XGI_CRT2_PORT_12;
XGI_Pr->Part3Port = BaseAddr + SIS_CRT2_PORT_12;
/* 301 VGA2 (and LCD) registers */
XGI_Pr->Part4Port = BaseAddr + XGI_CRT2_PORT_14;
XGI_Pr->Part4Port = BaseAddr + SIS_CRT2_PORT_14;
/* 301 palette address port registers */
XGI_Pr->Part5Port = BaseAddr + XGI_CRT2_PORT_14 + 2;
XGI_Pr->Part5Port = BaseAddr + SIS_CRT2_PORT_14 + 2;

}

Expand Down
25 changes: 0 additions & 25 deletions drivers/staging/xgifb/vb_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
#include "../../video/sis/initdef.h"

#define VB_XGI301C 0x0020 /* for 301C */
/*end 301b*/

#define VB_YPbPr525p 0x01
#define VB_YPbPr750p 0x02
#define VB_YPbPr1080i 0x03

#define LVDSCRT1Len 15
Expand All @@ -28,16 +24,10 @@
#define PanelRef60Hz 0x00
#define PanelRef75Hz 0x20

#define CRT2DisplayFlag 0x2000

#define YPbPr525iVCLK 0x03B
#define YPbPr525iVCLK_2 0x03A

#define XGI_CRT2_PORT_00 (0x00 - 0x030)
#define XGI_CRT2_PORT_04 (0x04 - 0x030)
#define XGI_CRT2_PORT_10 (0x10 - 0x30)
#define XGI_CRT2_PORT_12 (0x12 - 0x30)
#define XGI_CRT2_PORT_14 (0x14 - 0x30)

#define _PanelType00 0x00
#define _PanelType01 0x08
Expand Down Expand Up @@ -77,15 +67,9 @@
#define VCLKLen 4
#define VGA_XGI340 0x0001 /* 340 series */

#define VB_XGI301 0x0001 /* VB Type Info */
#define VB_XGI301B 0x0002 /* 301 series */
#define VB_XGI302B 0x0004
#define VB_NoLCD 0x8000
#define VB_XGI301LV 0x0008
#define VB_XGI302LV 0x0010
#define VB_LVDS_NS 0x0001 /* 3rd party chip */

#define ModeInfoFlag 0x0007
#define ModeText 0x0000
#define ModeEGA 0x0002 /* 16 colors mode */
#define ModeVGA 0x0003 /* 256 colors mode */
Expand All @@ -103,19 +87,14 @@
#define DoubleScanMode 0x8000

/* -------------- Ext_InfoFlag */
#define Support16Bpp 0x0005
#define Support32Bpp 0x0007

#define SupportAllCRT2 0x0078
#define SupportTV 0x0008
#define SupportHiVisionTV 0x0010
#define SupportLCD 0x0020
#define SupportRAMDAC2 0x0040
#define NoSupportTV 0x0070
#define NoSupportHiVisionTV 0x0060
#define NoSupportLCD 0x0058
#define SupportTV1024 0x0800 /* 301btest */
#define SupportYPbPr 0x1000 /* 301lv */
#define InterlaceMode 0x0080
#define SyncPP 0x0000
#define SyncPN 0x4000
Expand All @@ -124,7 +103,6 @@

/* -------------- SetMode Stack/Scratch */
#define SetSimuScanMode 0x0001 /* VBInfo/CR30 & CR31 */
#define SwitchToCRT2 0x0002
#define SetCRT2ToTV 0x089C
#define SetCRT2ToAVIDEO 0x0004
#define SetCRT2ToSVIDEO 0x0008
Expand All @@ -135,7 +113,6 @@
#define SetInSlaveMode 0x0200
#define SetNotSimuMode 0x0400
#define LoadDACFlag 0x1000
#define DisableCRT2Display 0x2000
#define DriverMode 0x4000
#define SetCRT2ToDualEdge 0x8000

Expand Down Expand Up @@ -275,7 +252,6 @@
#define VCLK50 0x08
#define VCLK52_406 0x09
#define VCLK56_25 0x0A
#define VCLK65 0x0B
#define VCLK68_179 0x0D
#define VCLK72_852 0x0E
#define VCLK75 0x0F
Expand All @@ -284,7 +260,6 @@
#define VCLK83_95 0x13
#define VCLK86_6 0x15
#define VCLK94_5 0x16
#define VCLK108_2 0x19
#define VCLK113_309 0x1B
#define VCLK116_406 0x1C
#define VCLK135_5 0x1E
Expand Down
14 changes: 7 additions & 7 deletions drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,9 +1299,9 @@ static void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension,
tempcl |= SetSimuScanMode;
if ((!(temp & ActiveCRT1)) && ((temp & ActiveLCD) || (temp & ActiveTV)
|| (temp & ActiveCRT2)))
tempcl ^= (SetSimuScanMode | SwitchToCRT2);
tempcl ^= (SetSimuScanMode | SwitchCRT2);
if ((temp & ActiveLCD) && (temp & ActiveTV))
tempcl ^= (SetSimuScanMode | SwitchToCRT2);
tempcl ^= (SetSimuScanMode | SwitchCRT2);
xgifb_reg_set(pVBInfo->P3d4, 0x30, tempcl);

CR31Data = xgifb_reg_get(pVBInfo->P3d4, 0x31);
Expand Down Expand Up @@ -1516,11 +1516,11 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
pVBInfo->P3c9 = pVBInfo->BaseAddr + 0x19;
pVBInfo->P3da = pVBInfo->BaseAddr + 0x2A;
pVBInfo->Part0Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_00;
pVBInfo->Part1Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_04;
pVBInfo->Part2Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_10;
pVBInfo->Part3Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_12;
pVBInfo->Part4Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14;
pVBInfo->Part5Port = pVBInfo->BaseAddr + XGI_CRT2_PORT_14 + 2;
pVBInfo->Part1Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_04;
pVBInfo->Part2Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_10;
pVBInfo->Part3Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_12;
pVBInfo->Part4Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_14;
pVBInfo->Part5Port = pVBInfo->BaseAddr + SIS_CRT2_PORT_14 + 2;
printk("5");

if (HwDeviceExtension->jChipType < XG20) /* kuku 2004/06/25 */
Expand Down
Loading

0 comments on commit 6896b94

Please sign in to comment.