diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-03 15:09:15 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-04-23 04:32:49 -0400 |
commit | a319c1a47855eef2e1789527688b8dfdcf101dba (patch) | |
tree | 734d9f328df1090b5d6b72288a324687e1ebf109 /drivers | |
parent | 7c1a38e391745cca72627979e5e02924bed5b43d (diff) |
drm/irq: Look up the pci irq directly in the drm_control ioctl
It's only ever called for legacy drivers, which are all pci.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 7cf407bbfed5..cbf6f259bfe4 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -377,7 +377,7 @@ int drm_control(struct drm_device *dev, void *data, | |||
377 | struct drm_file *file_priv) | 377 | struct drm_file *file_priv) |
378 | { | 378 | { |
379 | struct drm_control *ctl = data; | 379 | struct drm_control *ctl = data; |
380 | int ret = 0; | 380 | int ret = 0, irq; |
381 | 381 | ||
382 | /* if we haven't irq we fallback for compatibility reasons - | 382 | /* if we haven't irq we fallback for compatibility reasons - |
383 | * this used to be a separate function in drm_dma.h | 383 | * this used to be a separate function in drm_dma.h |
@@ -393,8 +393,10 @@ int drm_control(struct drm_device *dev, void *data, | |||
393 | 393 | ||
394 | switch (ctl->func) { | 394 | switch (ctl->func) { |
395 | case DRM_INST_HANDLER: | 395 | case DRM_INST_HANDLER: |
396 | irq = dev->pdev->irq; | ||
397 | |||
396 | if (dev->if_version < DRM_IF_VERSION(1, 2) && | 398 | if (dev->if_version < DRM_IF_VERSION(1, 2) && |
397 | ctl->irq != drm_dev_to_irq(dev)) | 399 | ctl->irq != irq) |
398 | return -EINVAL; | 400 | return -EINVAL; |
399 | mutex_lock(&dev->struct_mutex); | 401 | mutex_lock(&dev->struct_mutex); |
400 | ret = drm_irq_install(dev); | 402 | ret = drm_irq_install(dev); |