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 Revert "drmkms_pci: use MSI if availab...
details: https://anonhg.NetBSD.org/src/rev/37ba0ded9925
branches: trunk
changeset: 351817:37ba0ded9925
user: nonaka <nonaka%NetBSD.org@localhost>
date: Mon Feb 27 23:52:05 2017 +0000
description:
Revert "drmkms_pci: use MSI if available."
Fix PR/51997.
diffstat:
sys/external/bsd/drm2/dist/include/drm/drmP.h | 1 -
sys/external/bsd/drm2/pci/drm_pci.c | 14 ++++++--------
2 files changed, 6 insertions(+), 9 deletions(-)
diffs (59 lines):
diff -r eac7e27d58f2 -r 37ba0ded9925 sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h Mon Feb 27 23:31:00 2017 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h Mon Feb 27 23:52:05 2017 +0000
@@ -1268,7 +1268,6 @@
bool irq_enabled; /**< True if irq handler is enabled */
#ifdef __NetBSD__
struct drm_bus_irq_cookie *irq_cookie;
- pci_intr_handle_t *intr_handles;
#endif
__volatile__ long context_flag; /**< Context swapping flag */
int last_context; /**< Last current context */
diff -r eac7e27d58f2 -r 37ba0ded9925 sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c Mon Feb 27 23:31:00 2017 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c Mon Feb 27 23:52:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.c,v 1.14 2017/02/21 14:19:40 nonaka Exp $ */
+/* $NetBSD: drm_pci.c,v 1.15 2017/02/27 23:52:05 nonaka Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.14 2017/02/21 14:19:40 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.15 2017/02/27 23:52:05 nonaka Exp $");
#include <sys/types.h>
#include <sys/errno.h>
@@ -232,17 +232,16 @@
struct drm_bus_irq_cookie **cookiep)
{
const struct pci_attach_args *const pa = drm_pci_attach_args(dev);
+ pci_intr_handle_t ih;
const char *intrstr;
void *ih_cookie;
char intrbuf[PCI_INTRSTR_LEN];
- if (pci_intr_alloc(pa, &dev->intr_handles, NULL, 0))
+ if (pci_intr_map(pa, &ih))
return -ENOENT;
- intrstr = pci_intr_string(pa->pa_pc, dev->intr_handles[0], intrbuf,
- sizeof(intrbuf));
- ih_cookie = pci_intr_establish(pa->pa_pc, dev->intr_handles[0],
- IPL_DRM, handler, arg);
+ intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
+ ih_cookie = pci_intr_establish(pa->pa_pc, ih, IPL_DRM, handler, arg);
if (ih_cookie == NULL) {
aprint_error_dev(dev->dev,
"couldn't establish interrupt at %s (%s)\n",
@@ -263,7 +262,6 @@
const struct pci_attach_args *pa = drm_pci_attach_args(dev);
pci_intr_disestablish(pa->pa_pc, (void *)cookie);
- pci_intr_release(pa->pa_pc, dev->intr_handles, 1);
}
static const char *
Home |
Main Index |
Thread Index |
Old Index