]> Pileus Git - ~andy/linux/blobdiff - drivers/video/tgafb.c
Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[~andy/linux] / drivers / video / tgafb.c
index 2a6bfcdc3039806bf1438535581950220e7e1715..b604859b4ddbcd3ed2b4619284b7daa3b562d932 100644 (file)
@@ -71,9 +71,10 @@ static struct fb_ops tgafb_ops = {
  */
 
 static struct pci_device_id const tgafb_pci_table[] = {
-       { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA, PCI_ANY_ID, PCI_ANY_ID,
-         0, 0, 0 }
+       { PCI_DEVICE(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA) },
+       { }
 };
+MODULE_DEVICE_TABLE(pci, tgafb_pci_table);
 
 static struct pci_driver tgafb_driver = {
        .name                   = "tgafb",
@@ -197,7 +198,9 @@ tgafb_set_par(struct fb_info *info)
        while (TGA_READ_REG(par, TGA_CMD_STAT_REG) & 1) /* wait for not busy */
                continue;
        mb();
-       TGA_WRITE_REG(par, deep_presets[tga_type], TGA_DEEP_REG);
+       TGA_WRITE_REG(par, deep_presets[tga_type] |
+                          (par->sync_on_green ? 0x0 : 0x00010000),
+                     TGA_DEEP_REG);
        while (TGA_READ_REG(par, TGA_CMD_STAT_REG) & 1) /* wait for not busy */
                continue;
        mb();
@@ -261,11 +264,11 @@ tgafb_set_par(struct fb_info *info)
 
        } else { /* 24-plane or 24plusZ */
 
-               /* Init BT463 registers.  */
+               /* Init BT463 RAMDAC registers.  */
                BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_0, 0x40);
                BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_1, 0x08);
                BT463_WRITE(par, BT463_REG_ACC, BT463_CMD_REG_2,
-                           (par->sync_on_green ? 0x80 : 0x40));
+                           (par->sync_on_green ? 0xc0 : 0x40));
 
                BT463_WRITE(par, BT463_REG_ACC, BT463_READ_MASK_0, 0xff);
                BT463_WRITE(par, BT463_REG_ACC, BT463_READ_MASK_1, 0xff);