]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/xgifb/vb_init.c
Merge tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[~andy/linux] / drivers / staging / xgifb / vb_init.c
index 4ccd988ffd7c130458b66c72d59e08dbafbbab6d..3650bbff7686243e54d1d925f5e8de17000eac84 100644 (file)
@@ -3,8 +3,8 @@
 #include <linux/pci.h>
 #include <linux/vmalloc.h>
 
-#include "vgatypes.h"
 #include "XGIfb.h"
+#include "vgatypes.h"
 
 #include "vb_def.h"
 #include "vb_struct.h"
@@ -61,7 +61,7 @@ XGINew_GetXG20DRAMType(struct xgi_hw_device_info *HwDeviceExtension,
                }
                temp = xgifb_reg_get(pVBInfo->P3c4, 0x3B);
                /* SR3B[7][3]MAA15 MAA11 (Power on Trapping) */
-               if ((temp & 0x88) == 0x80)
+               if (((temp & 0x88) == 0x80) || ((temp & 0x88) == 0x08))
                        data = 0; /* DDR */
                else
                        data = 1; /* DDRII */
@@ -1268,7 +1268,7 @@ static void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension,
 
                                if (pVBInfo->IF_DEF_HiVision == 1) {
                                        if ((temp >> 8) & ActiveHiTV)
-                                               tempcl |= SetCRT2ToHiVisionTV;
+                                               tempcl |= SetCRT2ToHiVision;
                                }
 
                                if (pVBInfo->IF_DEF_YPbPr == 1) {
@@ -1287,7 +1287,7 @@ static void XGINew_SetModeScratch(struct xgi_hw_device_info *HwDeviceExtension,
 
                if (pVBInfo->IF_DEF_HiVision == 1) {
                        if ((temp >> 8) & ActiveHiTV)
-                               tempcl |= SetCRT2ToHiVisionTV;
+                               tempcl |= SetCRT2ToHiVision;
                }
 
                if (pVBInfo->IF_DEF_YPbPr == 1) {
@@ -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);
@@ -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 */