]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/sunxvr2500.c
Merge branch 'for-linus' of git://neil.brown.name/md
[linux-2.6-omap-h63xx.git] / drivers / video / sunxvr2500.c
index 4010492c692004a379ab64d754646df567a20131..b1dde09e70156d31c8cfcd7a5345b241155875d7 100644 (file)
@@ -9,10 +9,9 @@
 #include <linux/fb.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/of_device.h>
 
 #include <asm/io.h>
-#include <asm/prom.h>
-#include <asm/of_device.h>
 
 struct s3d_info {
        struct fb_info          *info;
@@ -28,7 +27,7 @@ struct s3d_info {
        unsigned int            depth;
        unsigned int            fb_size;
 
-       u32                     pseudo_palette[256];
+       u32                     pseudo_palette[16];
 };
 
 static int __devinit s3d_get_props(struct s3d_info *sp)
@@ -52,15 +51,14 @@ static int s3d_setcolreg(unsigned regno,
 {
        u32 value;
 
-       if (regno >= 256)
-               return 1;
+       if (regno < 16) {
+               red >>= 8;
+               green >>= 8;
+               blue >>= 8;
 
-       red >>= 8;
-       green >>= 8;
-       blue >>= 8;
-
-       value = (blue << 24) | (green << 16) | (red << 8);
-       ((u32 *)info->pseudo_palette)[regno] = value;
+               value = (blue << 24) | (green << 16) | (red << 8);
+               ((u32 *)info->pseudo_palette)[regno] = value;
+       }
 
        return 0;
 }
@@ -237,14 +235,14 @@ static void __devexit s3d_pci_unregister(struct pci_dev *pdev)
 }
 
 static struct pci_device_id s3d_pci_table[] = {
-       {       /* XVR-2500 */
-               PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x0032),
-               .driver_data = 1,
-       },
-       {       /* XVR-500 */
-               PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x07a2),
-               .driver_data = 0,
-       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002c),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002d),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002e),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x002f),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x0030),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x0031),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x0032),       },
+       {       PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x0033),       },
        { 0, }
 };