]> git.neil.brown.name Git - history.git/commitdiff
Fix RAMDAC detection on some IMS TwinTurbo video cards ("Mac" cards only),
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sat, 11 Oct 2003 18:01:43 +0000 (20:01 +0200)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sat, 11 Oct 2003 18:01:43 +0000 (20:01 +0200)
without this, you get no display on machines with those cards

drivers/video/imsttfb.c

index a66a3664a9cb5d952c7b4790fe19816edb6b43a2..3c7c42213f89890499dfd70b4f74614078041625 100644 (file)
@@ -1461,6 +1461,15 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        unsigned long addr, size;
        struct imstt_par *par;
        struct fb_info *info;
+#ifdef CONFIG_PPC_OF
+       struct device_node *dp;
+       
+       dp = pci_device_to_OF_node(pdev);
+       if(dp)
+               printk(KERN_INFO "%s: OF name %s\n",__FUNCTION__, dp->name);
+       else
+               printk(KERN_ERR "imsttfb: no OF node for pci device\n");
+#endif /* CONFIG_PPC_OF */
 
        size = sizeof(struct fb_info) + sizeof(struct imstt_par) +
                sizeof(u32) * 16;
@@ -1488,6 +1497,11 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        switch (pdev->device) {
                case PCI_DEVICE_ID_IMS_TT128: /* IMS,tt128mbA */
                        par->ramdac = IBM;
+#ifdef CONFIG_PPC_OF
+                       if (dp && ((strcmp(dp->name, "IMS,tt128mb8") == 0) ||
+                                  (strcmp(dp->name, "IMS,tt128mb8A") == 0)))
+                               par->ramdac = TVP;
+#endif /* CONFIG_PPC_OF */
                        break;
                case PCI_DEVICE_ID_IMS_TT3D:  /* IMS,tt3d */
                        par->ramdac = TVP;