mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 22:58:29 +00:00
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>
This commit is contained in:
parent
7c1a38e391
commit
a319c1a478
1 changed files with 4 additions and 2 deletions
|
@ -377,7 +377,7 @@ int drm_control(struct drm_device *dev, void *data,
|
||||||
struct drm_file *file_priv)
|
struct drm_file *file_priv)
|
||||||
{
|
{
|
||||||
struct drm_control *ctl = data;
|
struct drm_control *ctl = data;
|
||||||
int ret = 0;
|
int ret = 0, irq;
|
||||||
|
|
||||||
/* if we haven't irq we fallback for compatibility reasons -
|
/* if we haven't irq we fallback for compatibility reasons -
|
||||||
* this used to be a separate function in drm_dma.h
|
* this used to be a separate function in drm_dma.h
|
||||||
|
@ -393,8 +393,10 @@ int drm_control(struct drm_device *dev, void *data,
|
||||||
|
|
||||||
switch (ctl->func) {
|
switch (ctl->func) {
|
||||||
case DRM_INST_HANDLER:
|
case DRM_INST_HANDLER:
|
||||||
|
irq = dev->pdev->irq;
|
||||||
|
|
||||||
if (dev->if_version < DRM_IF_VERSION(1, 2) &&
|
if (dev->if_version < DRM_IF_VERSION(1, 2) &&
|
||||||
ctl->irq != drm_dev_to_irq(dev))
|
ctl->irq != irq)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
ret = drm_irq_install(dev);
|
ret = drm_irq_install(dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue