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 ifdef out pcie_get_spe...



details:   https://anonhg.NetBSD.org/src/rev/069a69fb0796
branches:  trunk
changeset: 1028239:069a69fb0796
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:54:48 2021 +0000

description:
ifdef out pcie_get_speed_cap for now


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 9f8450b5bb24 -r 069a69fb0796 sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c     Sun Dec 19 09:54:38 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c     Sun Dec 19 09:54:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_ci_dpm.c,v 1.4 2021/12/18 23:45:43 riastradh Exp $      */
+/*     $NetBSD: radeon_ci_dpm.c,v 1.5 2021/12/19 09:54:48 riastradh Exp $      */
 
 /*
  * Copyright 2013 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_ci_dpm.c,v 1.4 2021/12/18 23:45:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_ci_dpm.c,v 1.5 2021/12/19 09:54:48 riastradh Exp $");
 
 #include <linux/firmware.h>
 #include <linux/pci.h>
@@ -5687,7 +5687,9 @@
        u8 frev, crev;
        struct ci_power_info *pi;
        enum pci_bus_speed speed_cap = PCI_SPEED_UNKNOWN;
+#ifdef __linux__
        struct pci_dev *root = rdev->pdev->bus->self;
+#endif
        int ret;
 
        pi = kzalloc(sizeof(struct ci_power_info), GFP_KERNEL);
@@ -5695,8 +5697,10 @@
                return -ENOMEM;
        rdev->pm.dpm.priv = pi;
 
+#ifdef __linux__
        if (!pci_is_root_bus(rdev->pdev->bus))
                speed_cap = pcie_get_speed_cap(root);
+#endif
        if (speed_cap == PCI_SPEED_UNKNOWN) {
                pi->sys_pcie_mask = 0;
        } else {



Home | Main Index | Thread Index | Old Index