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/nouveau/core/subdev/mc Non-PC...
details: https://anonhg.NetBSD.org/src/rev/b87ce6f86735
branches: trunk
changeset: 341173:b87ce6f86735
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Oct 22 23:17:08 2015 +0000
description:
Non-PCI IRQ support for Tegra.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c | 24 ++++++++-
1 files changed, 20 insertions(+), 4 deletions(-)
diffs (65 lines):
diff -r f9684167791d -r b87ce6f86735 sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c Thu Oct 22 23:16:23 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/mc/nouveau_subdev_mc_base.c Thu Oct 22 23:17:08 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_subdev_mc_base.c,v 1.4 2015/10/18 14:05:58 jmcneill Exp $ */
+/* $NetBSD: nouveau_subdev_mc_base.c,v 1.5 2015/10/22 23:17:08 jmcneill Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,11 +25,16 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_mc_base.c,v 1.4 2015/10/18 14:05:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_subdev_mc_base.c,v 1.5 2015/10/22 23:17:08 jmcneill Exp $");
#include <subdev/mc.h>
#include <core/option.h>
+#if defined(__NetBSD__) && defined(__arm__)
+/* XXX nouveau platform kludge */
+#include <arm/nvidia/tegra_intr.h>
+#endif
+
static inline u32
nouveau_mc_intr_mask(struct nouveau_mc *pmc)
{
@@ -107,9 +112,13 @@
{
struct nouveau_device *device = nv_device(object);
struct nouveau_mc *pmc = (void *)object;
-#ifdef __NetBSD__ /* XXX nouveau platform */
+#if defined(__NetBSD__)
if (nv_device_is_pci(device)) {
pci_intr_disestablish(device->pdev->pd_pa.pa_pc, pmc->irq_cookie);
+#if defined(__arm__)
+ } else {
+ intr_disestablish(pmc->irq_cookie);
+#endif
}
#else
free_irq(pmc->irq, pmc);
@@ -164,7 +173,7 @@
}
}
-#ifdef __NetBSD__ /* XXX nouveau platform */
+#if defined(__NetBSD__)
if (nv_device_is_pci(device)) {
const pci_chipset_tag_t pc = device->pdev->pd_pa.pa_pc;
pci_intr_handle_t ih;
@@ -176,6 +185,13 @@
&nouveau_mc_intr, pmc);
if (pmc->irq_cookie == NULL)
return -EIO;
+#if defined (__arm__)
+ } else {
+ pmc->irq_cookie = intr_establish(TEGRA_INTR_GPU,
+ IPL_VM, IST_LEVEL, nouveau_mc_intr, pmc);
+ if (pmc->irq_cookie == NULL)
+ return -EIO;
+#endif
}
#else
ret = nv_device_get_irq(device, true);
Home |
Main Index |
Thread Index |
Old Index