1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _VB_STRUCT_ 3 #define _VB_STRUCT_ 4 #include "../../video/fbdev/sis/vstruct.h" 5 6 struct XGI_LVDSCRT1HDataStruct { 7 unsigned char Reg[8]; 8 }; 9 10 struct XGI_LVDSCRT1VDataStruct { 11 unsigned char Reg[7]; 12 }; 13 14 struct XGI_ExtStruct { 15 unsigned char Ext_ModeID; 16 unsigned short Ext_ModeFlag; 17 unsigned short Ext_ModeInfo; 18 unsigned char Ext_RESINFO; 19 unsigned char VB_ExtTVYFilterIndex; 20 unsigned char REFindex; 21 }; 22 23 struct XGI_Ext2Struct { 24 unsigned short Ext_InfoFlag; 25 unsigned char Ext_CRT1CRTC; 26 unsigned char Ext_CRTVCLK; 27 unsigned char Ext_CRT2CRTC; 28 unsigned char Ext_CRT2CRTC2; 29 unsigned char ModeID; 30 unsigned short XRes; 31 unsigned short YRes; 32 }; 33 34 struct XGI_ECLKDataStruct { 35 unsigned char SR2E, SR2F, SR30; 36 unsigned short CLOCK; 37 }; 38 39 /*add for new UNIVGABIOS*/ 40 struct XGI_LCDDesStruct { 41 unsigned short LCDHDES; 42 unsigned short LCDHRS; 43 unsigned short LCDVDES; 44 unsigned short LCDVRS; 45 }; 46 47 struct XGI330_LCDDataDesStruct2 { 48 unsigned short LCDHDES; 49 unsigned short LCDHRS; 50 unsigned short LCDVDES; 51 unsigned short LCDVRS; 52 unsigned short LCDHSync; 53 unsigned short LCDVSync; 54 }; 55 56 struct XGI330_LCDDataTablStruct { 57 unsigned char PANELID; 58 unsigned short MASK; 59 unsigned short CAP; 60 void const *DATAPTR; 61 }; 62 63 struct XGI330_TVDataTablStruct { 64 unsigned short MASK; 65 unsigned short CAP; 66 struct SiS_TVData const *DATAPTR; 67 }; 68 69 struct XGI_TimingHStruct { 70 unsigned char data[8]; 71 }; 72 73 struct XGI_TimingVStruct { 74 unsigned char data[7]; 75 }; 76 77 struct XGI_XG21CRT1Struct { 78 unsigned char ModeID, CR02, CR03, CR15, CR16; 79 }; 80 81 struct XGI330_LCDCapStruct { 82 unsigned char LCD_ID; 83 unsigned short LCD_Capability; 84 unsigned char LCD_HSyncWidth; 85 unsigned char LCD_VSyncWidth; 86 unsigned char LCD_VCLK; 87 unsigned char LCDA_VCLKData1; 88 unsigned char LCDA_VCLKData2; 89 unsigned char LCUCHAR_VCLKData1; 90 unsigned char LCUCHAR_VCLKData2; 91 unsigned char Spectrum_31; 92 unsigned char Spectrum_32; 93 unsigned char Spectrum_33; 94 unsigned char Spectrum_34; 95 }; 96 97 struct XGI21_LVDSCapStruct { 98 unsigned short LVDS_Capability; 99 unsigned short LVDSHT; 100 unsigned short LVDSVT; 101 unsigned short LVDSHDE; 102 unsigned short LVDSVDE; 103 unsigned short LVDSHFP; 104 unsigned short LVDSVFP; 105 unsigned short LVDSHSYNC; 106 unsigned short LVDSVSYNC; 107 unsigned char VCLKData1; 108 unsigned char VCLKData2; 109 unsigned char PSC_S1; /* Duration between CPL on and signal on */ 110 unsigned char PSC_S2; /* Duration signal on and Vdd on */ 111 unsigned char PSC_S3; /* Duration between CPL off and signal off */ 112 unsigned char PSC_S4; /* Duration signal off and Vdd off */ 113 unsigned char PSC_S5; 114 }; 115 116 struct XGI_CRT1TableStruct { 117 unsigned char CR[16]; 118 }; 119 120 struct XGI301C_Tap4TimingStruct { 121 unsigned short DE; 122 unsigned char Reg[64]; /* C0-FF */ 123 }; 124 125 struct vb_device_info { 126 unsigned long P3c4, P3d4, P3c0, P3ce, P3c2, P3cc; 127 unsigned long P3ca, P3c6, P3c7, P3c8, P3c9, P3da; 128 unsigned long Part0Port, Part1Port, Part2Port; 129 unsigned long Part3Port, Part4Port, Part5Port; 130 unsigned short RVBHCFACT, RVBHCMAX, RVBHRS; 131 unsigned short VGAVT, VGAHT, VGAVDE, VGAHDE; 132 unsigned short VT, HT, VDE, HDE; 133 unsigned short LCDHRS, LCDVRS, LCDHDES, LCDVDES; 134 135 unsigned short ModeType; 136 unsigned short IF_DEF_LVDS; 137 unsigned short IF_DEF_CRT2Monitor; 138 unsigned short IF_DEF_YPbPr; 139 unsigned short IF_DEF_HiVision; 140 unsigned short LCDResInfo, LCDTypeInfo, VBType;/*301b*/ 141 unsigned short VBInfo, TVInfo, LCDInfo; 142 unsigned short SetFlag; 143 unsigned short NewFlickerMode; 144 unsigned short SelectCRT2Rate; 145 146 void __iomem *FBAddr; 147 148 unsigned char const *SR18; 149 unsigned char const (*CR40)[3]; 150 151 struct SiS_MCLKData const *MCLKData; 152 153 unsigned char XGINew_CR97; 154 155 struct XGI330_LCDCapStruct const *LCDCapList; 156 157 struct XGI_TimingHStruct TimingH; 158 struct XGI_TimingVStruct TimingV; 159 160 int ram_type; 161 int ram_channel; 162 int ram_bus; 163 }; /* _struct vb_device_info */ 164 165 #endif /* _VB_STRUCT_ */ 166