summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-03 21:09:27 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-04-23 10:32:50 +0200
commitbb0f1b5c1695b4399cfd2359c114ae63edbb3ad8 (patch)
tree2b5eb0a2b6e44168ab4af4f8393d5fcee8e2beee /drivers/gpu/drm/drm_irq.c
parenta319c1a47855eef2e1789527688b8dfdcf101dba (diff)
downloadlwn-bb0f1b5c1695b4399cfd2359c114ae63edbb3ad8.tar.gz
lwn-bb0f1b5c1695b4399cfd2359c114ae63edbb3ad8.zip
drm: pass the irq explicitly to drm_irq_install
Unfortunately this requires a drm-wide change, and I didn't see a sane way around that. Luckily it's fairly simple, we just need to inline the respective get_irq implementation from either drm_pci.c or drm_platform.c. With that we can now also remove drm_dev_to_irq from drm_irq.c. Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index cbf6f259bfe4..de38bc9b6581 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -233,11 +233,6 @@ static void drm_irq_vgaarb_nokms(void *cookie, bool state)
}
}
-static inline int drm_dev_to_irq(struct drm_device *dev)
-{
- return dev->driver->bus->get_irq(dev);
-}
-
/**
* Install IRQ handler.
*
@@ -247,14 +242,12 @@ static inline int drm_dev_to_irq(struct drm_device *dev)
* \c irq_preinstall() and \c irq_postinstall() functions
* before and after the installation.
*/
-int drm_irq_install(struct drm_device *dev)
+int drm_irq_install(struct drm_device *dev, int irq)
{
- int ret, irq;
+ int ret;
unsigned long sh_flags = 0;
char *irqname;
- irq = drm_dev_to_irq(dev);
-
if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return -EINVAL;
@@ -399,7 +392,7 @@ int drm_control(struct drm_device *dev, void *data,
ctl->irq != irq)
return -EINVAL;
mutex_lock(&dev->struct_mutex);
- ret = drm_irq_install(dev);
+ ret = drm_irq_install(dev, irq);
mutex_unlock(&dev->struct_mutex);
return ret;