summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powermac/atibl.c
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2015-02-18 07:34:32 +0000
committerjhibbits <jhibbits@FreeBSD.org>2015-02-18 07:34:32 +0000
commit8f7883a87967eff00b5db7212f0627ea5e686370 (patch)
treecebb9b25ec82ad6e4d3f11f96545bf16e62e08e9 /sys/powerpc/powermac/atibl.c
parent0748f8dde961a516f2d0215d309e06b1e310fa15 (diff)
downloadFreeBSD-src-8f7883a87967eff00b5db7212f0627ea5e686370.zip
FreeBSD-src-8f7883a87967eff00b5db7212f0627ea5e686370.tar.gz
Match the right backlight driver.
Some ATI-based PowerBooks use the string 'mnca' in the backlight controller device tree entry, so account for this and don't use nVidia when it's not an nVidia device. MFC after: 3 weeks
Diffstat (limited to 'sys/powerpc/powermac/atibl.c')
-rw-r--r--sys/powerpc/powermac/atibl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/powerpc/powermac/atibl.c b/sys/powerpc/powermac/atibl.c
index 5d44111..3982bdf 100644
--- a/sys/powerpc/powermac/atibl.c
+++ b/sys/powerpc/powermac/atibl.c
@@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$");
#include <machine/bus.h>
#include <dev/ofw/openfirm.h>
+#include <dev/pci/pcivar.h>
+
+#ifndef PCI_VENDOR_ID_ATI
+#define PCI_VENDOR_ID_ATI 0x1002
+#endif
/* From the xf86-video-ati driver's radeon_reg.h */
#define RADEON_LVDS_GEN_CNTL 0x02d0
@@ -121,7 +126,9 @@ atibl_probe(device_t dev)
if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0)
return (ENXIO);
- if (strcmp(control, "ati") != 0)
+ if (strcmp(control, "ati") != 0 &&
+ (strcmp(control, "mnca") != 0 ||
+ pci_get_vendor(device_get_parent(dev)) != 0x1002))
return (ENXIO);
device_set_desc(dev, "PowerBook backlight for ATI graphics");
OpenPOWER on IntegriCloud