Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ps4 5.1.0 #3

Merged
merged 4 commits into from
May 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update drm_irq.c
  • Loading branch information
Razor246 authored May 12, 2019
commit 257df461e05e4f4056b774742d07507738c1d055
7 changes: 7 additions & 0 deletions drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,35 +221,42 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,
{
struct drm_control *ctl = data;
int ret = 0, irq;

/* if we haven't irq we fallback for compatibility reasons -
* this used to be a separate function in drm_dma.h
*/

if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ))
return 0;
if (!drm_core_check_feature(dev, DRIVER_LEGACY))
return 0;
/* UMS was only ever supported on pci devices. */
if (WARN_ON(!dev->pdev))
return -EINVAL;

switch (ctl->func) {
case DRM_INST_HANDLER:
irq = dev->pdev->irq;

if (dev->if_version < DRM_IF_VERSION(1, 2) &&
ctl->irq != irq)
return -EINVAL;
mutex_lock(&dev->struct_mutex);
ret = drm_irq_install(dev, irq);
mutex_unlock(&dev->struct_mutex);

return ret;
case DRM_UNINST_HANDLER:
mutex_lock(&dev->struct_mutex);
ret = drm_irq_uninstall(dev);
mutex_unlock(&dev->struct_mutex);

return ret;
default:
return -EINVAL;
}
}
#endif
/**
* drm_calc_timestamping_constants - calculate vblank timestamp constants
* @crtc: drm_crtc whose timestamp constants should be updated.
Expand Down