diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-08 14:26:00 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-08 21:23:34 +0300 |
commit | 0396162ab9c571ee31f01866cbf168066dbf395d (patch) | |
tree | 87801d3e62d88be595714f6ef0612a2f40714f75 /drivers/gpu/drm/omapdrm/omap_irq.c | |
parent | 82d753567f6f3bb5059bd18e8fd8aa7915fcbe05 (diff) | |
download | linux-0396162ab9c571ee31f01866cbf168066dbf395d.tar.xz |
drm/omap: use vblank hooks in struct drm_crtc_funcs
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_irq.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_irq.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c index 9adfa7c99695..59f21add6f19 100644 --- a/drivers/gpu/drm/omapdrm/omap_irq.c +++ b/drivers/gpu/drm/omapdrm/omap_irq.c @@ -101,16 +101,17 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait, * Zero on success, appropriate errno if the given @crtc's vblank * interrupt cannot be enabled. */ -int omap_irq_enable_vblank(struct drm_device *dev, unsigned int pipe) +int omap_irq_enable_vblank(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; struct omap_drm_private *priv = dev->dev_private; - struct drm_crtc *crtc = priv->crtcs[pipe]; unsigned long flags; + enum omap_channel channel = omap_crtc_channel(crtc); - DBG("dev=%p, crtc=%u", dev, pipe); + DBG("dev=%p, crtc=%u", dev, channel); spin_lock_irqsave(&priv->wait_lock, flags); - priv->irq_mask |= dispc_mgr_get_vsync_irq(omap_crtc_channel(crtc)); + priv->irq_mask |= dispc_mgr_get_vsync_irq(channel); omap_irq_update(dev); spin_unlock_irqrestore(&priv->wait_lock, flags); @@ -126,16 +127,17 @@ int omap_irq_enable_vblank(struct drm_device *dev, unsigned int pipe) * a hardware vblank counter, this routine should be a no-op, since * interrupts will have to stay on to keep the count accurate. */ -void omap_irq_disable_vblank(struct drm_device *dev, unsigned int pipe) +void omap_irq_disable_vblank(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; struct omap_drm_private *priv = dev->dev_private; - struct drm_crtc *crtc = priv->crtcs[pipe]; unsigned long flags; + enum omap_channel channel = omap_crtc_channel(crtc); - DBG("dev=%p, crtc=%u", dev, pipe); + DBG("dev=%p, crtc=%u", dev, channel); spin_lock_irqsave(&priv->wait_lock, flags); - priv->irq_mask &= ~dispc_mgr_get_vsync_irq(omap_crtc_channel(crtc)); + priv->irq_mask &= ~dispc_mgr_get_vsync_irq(channel); omap_irq_update(dev); spin_unlock_irqrestore(&priv->wait_lock, flags); } |