summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-07-06 08:19:34 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-07-06 08:19:34 +0000
commit6b75fc00b259a5a729b67fa7e6747deaf5fe7084 (patch)
tree4d3bf10fbeb8a32357305701fd7e847dfebc6818 /sys/dev/pci/drm
parenteac53c5340efc8606d50e288bc0e796e4b0d4582 (diff)
drm/radeon: handle non-VGA class pci devices with ATRM
From Alex Deucher 6a6170926060797bdf25e5d6609a3168466f2e6c in ubuntu 3.8 d8ade3526b2aa0505132c404c05a38b73ea15490 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_bios.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_bios.c b/sys/dev/pci/drm/radeon/radeon_bios.c
index c50004d312f..0a96b4b2360 100644
--- a/sys/dev/pci/drm/radeon/radeon_bios.c
+++ b/sys/dev/pci/drm/radeon/radeon_bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_bios.c,v 1.2 2014/02/09 11:03:31 jsg Exp $ */
+/* $OpenBSD: radeon_bios.c,v 1.3 2014/07/06 08:19:33 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -243,6 +243,20 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
}
}
+ if (!found) {
+ while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
+ dhandle = ACPI_HANDLE(&pdev->dev);
+ if (!dhandle)
+ continue;
+
+ status = acpi_get_handle(dhandle, "ATRM", &atrm_handle);
+ if (!ACPI_FAILURE(status)) {
+ found = true;
+ break;
+ }
+ }
+ }
+
if (!found)
return false;