summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-11-21 15:23:45 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-11-21 15:23:45 +0000
commiteedbd6a46f0a07cc17a7854995f1d81a5e20a255 (patch)
tree300cd2a89d16f93bc479dab0c6735dfc7ffc5f05 /sys/dev/pci
parente8d14eb09d29cad6a59818b7be379efa1fde2348 (diff)
The drm irq stuff isn't actually used on OpenBSD. Using the PCI device
interrupt line register as the irq number doesn't really work as the contents of that register might be 0, and the code has checks for non-zero irq numbers in places. Insteadmake drm_dev_to_irq() return -1, which is an obviously bogus, but non-zero value. This should fix inteldrm(4) on recent Apple hardware.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/drmP.h6
-rw-r--r--sys/dev/pci/drm/drm_drv.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index 4e9cfbe1c52..57c9dc8df10 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: drmP.h,v 1.198 2015/09/26 19:52:16 kettenis Exp $ */
+/* $OpenBSD: drmP.h,v 1.199 2015/11/21 15:23:44 kettenis Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*/
@@ -644,7 +644,6 @@ struct drm_device {
struct drm_device_dma *dma; /* Optional pointer for DMA support */
/* Context support */
- int irq; /* Interrupt used by board */
int irq_enabled; /* True if the irq handler is enabled */
/** \name VBLANK IRQ support */
@@ -707,7 +706,6 @@ struct drm_attach_args {
bus_space_tag_t bst;
size_t busid_len;
int is_agp;
- u_int8_t irq;
u_int16_t pci_vendor;
u_int16_t pci_device;
u_int16_t pci_subvendor;
@@ -904,7 +902,7 @@ static __inline__ int drm_core_check_feature(struct drm_device *dev,
static inline int drm_dev_to_irq(struct drm_device *dev)
{
- return dev->irq;
+ return -1;
}
#define DRM_PCIE_SPEED_25 1
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index a5c0b71ae56..17674c67cd6 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: drm_drv.c,v 1.138 2015/09/26 19:52:16 kettenis Exp $ */
+/* $OpenBSD: drm_drv.c,v 1.139 2015/11/21 15:23:44 kettenis Exp $ */
/*-
* Copyright 2007-2009 Owain G. Ainsworth <oga@openbsd.org>
* Copyright © 2008 Intel Corporation
@@ -280,7 +280,6 @@ drm_attach_pci(struct drm_driver_info *driver, struct pci_attach_args *pa,
arg.driver = driver;
arg.dmat = pa->pa_dmat;
arg.bst = pa->pa_memt;
- arg.irq = pa->pa_intrline;
arg.is_agp = is_agp;
arg.console = console;
@@ -372,7 +371,6 @@ drm_attach(struct device *parent, struct device *self, void *aux)
dev->dmat = da->dmat;
dev->bst = da->bst;
- dev->irq = da->irq;
dev->unique = da->busid;
dev->unique_len = da->busid_len;
dev->pdev = &dev->drm_pci;