viafb: Autoload on OLPC XO 1.5 only
authorBen Hutchings <ben@decadent.org.uk>
Sat, 20 Apr 2013 14:52:02 +0000 (15:52 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 13 Dec 2022 20:46:50 +0000 (20:46 +0000)
Bug-Debian: https://bugs.debian.org/705788
Forwarded: no

It appears that viafb won't work automatically on all the boards for
which it has a PCI device ID match.  Currently, it is blacklisted by
udev along with most other framebuffer drivers, so this doesn't matter
much.

However, this driver is required for console support on the XO 1.5.
We need to allow it to be autoloaded on this model only, and then
un-blacklist it in udev.

Gbp-Pq: Topic bugfix/x86
Gbp-Pq: Name viafb-autoload-on-olpc-xo1.5-only.patch

drivers/video/fbdev/via/via-core.c

index 89d75079b73071be5ddf876be6db07f21c4cfed3..458ef4e104b928d6ad981baa6e08aa00b574c4c0 100644 (file)
@@ -695,7 +695,14 @@ static const struct pci_device_id via_pci_table[] = {
          .driver_data = UNICHROME_VX900 },
        { }
 };
-MODULE_DEVICE_TABLE(pci, via_pci_table);
+
+static const struct pci_device_id via_pci_autoload_table[] __initconst = {
+       /* OLPC XO 1.5 */
+       { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_VX855_DID),
+         .subvendor = 0x152d, .subdevice = 0x0833 },
+       { }
+};
+MODULE_DEVICE_TABLE(pci, via_pci_autoload_table);
 
 static const struct dev_pm_ops via_pm_ops = {
 #ifdef CONFIG_PM_SLEEP