summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_irq.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-03-24 10:58:49 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-04-03 12:36:40 +0300
commitc9af3ed7311f5fbc4b0e109daddfcc8a47267331 (patch)
tree0b5a437ebd933e642e6a1a488900a3a6521f7371 /drivers/gpu/drm/omapdrm/omap_irq.c
parent8a54aa92850058fd60f07fa2621cab94bf53b5f0 (diff)
downloadlinux-c9af3ed7311f5fbc4b0e109daddfcc8a47267331.tar.xz
drm/omap: fix crash on module unload
When unloading omapdrm we get a NULL pointer deref in omap_drm_irq_uninstall(). This is caused by: 967dd48417874dd25491a4e933648f394a64f70f ("drm: remove drm_vblank_no_hw_counter assignment from driver code") We shut down all the crtcs at unload time before calling omap_drm_irq_uninstall, so the code in omap_drm_irq_uninstall() is unnecessary and can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_irq.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_irq.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index 26a3c06aa14d..115104cdcc59 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -285,25 +285,11 @@ int omap_drm_irq_install(struct drm_device *dev)
void omap_drm_irq_uninstall(struct drm_device *dev)
{
struct omap_drm_private *priv = dev->dev_private;
- unsigned long irqflags;
- int i;
if (!dev->irq_enabled)
return;
dev->irq_enabled = false;
- /* Wake up any waiters so they don't hang. */
- if (dev->num_crtcs) {
- spin_lock_irqsave(&dev->vbl_lock, irqflags);
- for (i = 0; i < dev->num_crtcs; i++) {
- wake_up(&dev->vblank[i].queue);
- dev->vblank[i].enabled = false;
- dev->vblank[i].last =
- dev->driver->get_vblank_counter(dev, i);
- }
- spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
- }
-
priv->dispc_ops->free_irq(dev);
}