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/amd/amdgpu amdgpu: Try turnin...
details: https://anonhg.NetBSD.org/src/rev/f3c5ed506fc9
branches: trunk
changeset: 1028985:f3c5ed506fc9
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:38:49 2021 +0000
description:
amdgpu: Try turning on MSI.
diffstat:
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_irq.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 492ff1f331fc -r f3c5ed506fc9 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_irq.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_irq.c Sun Dec 19 12:38:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_irq.c Sun Dec 19 12:38:49 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdgpu_irq.c,v 1.8 2021/12/19 12:31:45 riastradh Exp $ */
+/* $NetBSD: amdgpu_irq.c,v 1.9 2021/12/19 12:38:49 riastradh Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_irq.c,v 1.8 2021/12/19 12:31:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_irq.c,v 1.9 2021/12/19 12:38:49 riastradh Exp $");
#include <linux/irq.h>
#include <linux/pci.h>
@@ -253,7 +253,14 @@
adev->irq.msi_enabled = false;
if (amdgpu_msi_ok(adev)) {
-#ifndef __NetBSD__ /* XXX amdgpu msix */
+#ifdef __NetBSD__ /* XXX amdgpu msix */
+ if (pci_enable_msi(adev->pdev) == 0) {
+ adev->irq.msi_enabled = true;
+ dev_dbg(adev->dev, "amdgpu: using MSI/MSI-X.\n");
+ } else {
+ dev_err(adev->dev, "amdgpu: failed to enable MSI\n");
+ }
+#else
int nvec = pci_msix_vec_count(adev->pdev);
unsigned int flags;
Home |
Main Index |
Thread Index |
Old Index