Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon radeon: Make radeon_bi...
details: https://anonhg.NetBSD.org/src/rev/466607cb5b40
branches: trunk
changeset: 362443:466607cb5b40
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 27 14:23:16 2022 +0000
description:
radeon: Make radeon_bios.c ACPI stuff build.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r 253222cafe7f -r 466607cb5b40 sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c Sun Feb 27 14:23:08 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c Sun Feb 27 14:23:16 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_bios.c,v 1.8 2021/12/18 23:45:43 riastradh Exp $ */
+/* $NetBSD: radeon_bios.c,v 1.9 2022/02/27 14:23:16 riastradh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.8 2021/12/18 23:45:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_bios.c,v 1.9 2022/02/27 14:23:16 riastradh Exp $");
#include <linux/acpi.h>
#include <linux/pci.h>
@@ -41,6 +41,8 @@
#include "radeon.h"
#include "radeon_reg.h"
+#include <linux/nbsd-namespace-acpi.h>
+
/*
* BIOS.
*/
@@ -183,7 +185,6 @@
#endif
}
-/* XXX radeon acpi */
#ifdef CONFIG_ACPI
/* ATRM is used to get the BIOS on the discrete cards in
* dual-gpu systems.
@@ -247,7 +248,11 @@
return false;
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
+#ifdef __NetBSD__
+ dhandle = (pdev->pd_ad ? pdev->pd_ad->ad_handle : NULL);
+#else
dhandle = ACPI_HANDLE(&pdev->dev);
+#endif
if (!dhandle)
continue;
@@ -260,7 +265,12 @@
if (!found) {
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
+#ifdef __NetBSD__
+ dhandle = (pdev->pd_ad ? pdev->pd_ad->ad_handle
+ : NULL);
+#else
dhandle = ACPI_HANDLE(&pdev->dev);
+#endif
if (!dhandle)
continue;
Home |
Main Index |
Thread Index |
Old Index