aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_irq.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-05-28 00:21:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-12-19 11:24:56 +0200
commite0519af75d6eabf1876cf6af0c60704f97ab82b3 (patch)
tree7b505e85aacb087dc386c8133ba591713dae924e /drivers/gpu/drm/omapdrm/omap_irq.c
parentdrm: omapdrm: Handle FIFO underflow IRQs internally (diff)
downloadlinux-dev-e0519af75d6eabf1876cf6af0c60704f97ab82b3.tar.xz
linux-dev-e0519af75d6eabf1876cf6af0c60704f97ab82b3.zip
drm: omapdrm: Handle CRTC error IRQs directly
Instead of going through a complicated registration mechanism, just expose the CRTC error IRQ function and call it directly from the main IRQ handler. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_irq.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_irq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index 57a2de7e0d7b..58c5efb26766 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -241,9 +241,13 @@ static irqreturn_t omap_irq_handler(int irq, void *arg)
for (id = 0; id < priv->num_crtcs; id++) {
struct drm_crtc *crtc = priv->crtcs[id];
+ enum omap_channel channel = omap_crtc_channel(crtc);
if (irqstatus & pipe2vbl(crtc))
drm_handle_vblank(dev, id);
+
+ if (irqstatus & dispc_mgr_get_sync_lost_irq(channel))
+ omap_crtc_error_irq(crtc, irqstatus);
}
omap_irq_fifo_underflow(priv, irqstatus);
@@ -279,6 +283,7 @@ int omap_drm_irq_install(struct drm_device *dev)
{
struct omap_drm_private *priv = dev->dev_private;
struct omap_drm_irq *error_handler = &priv->error_handler;
+ unsigned int num_mgrs = dss_feat_get_num_mgrs();
unsigned int max_planes;
unsigned int i;
int ret;
@@ -294,6 +299,9 @@ int omap_drm_irq_install(struct drm_device *dev)
priv->irq_mask |= omap_underflow_irqs[i];
}
+ for (i = 0; i < num_mgrs; ++i)
+ priv->irq_mask |= dispc_mgr_get_sync_lost_irq(i);
+
dispc_runtime_get();
dispc_clear_irqstatus(0xffffffff);
dispc_runtime_put();