aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_irq.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-05-27 17:21:29 -0400
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-12-19 04:24:56 -0500
commite0519af75d6eabf1876cf6af0c60704f97ab82b3 (patch)
tree7b505e85aacb087dc386c8133ba591713dae924e /drivers/gpu/drm/omapdrm/omap_irq.c
parent728ae8dd696a483355b593487eba73f4c64f1152 (diff)
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)
241 241
242 for (id = 0; id < priv->num_crtcs; id++) { 242 for (id = 0; id < priv->num_crtcs; id++) {
243 struct drm_crtc *crtc = priv->crtcs[id]; 243 struct drm_crtc *crtc = priv->crtcs[id];
244 enum omap_channel channel = omap_crtc_channel(crtc);
244 245
245 if (irqstatus & pipe2vbl(crtc)) 246 if (irqstatus & pipe2vbl(crtc))
246 drm_handle_vblank(dev, id); 247 drm_handle_vblank(dev, id);
248
249 if (irqstatus & dispc_mgr_get_sync_lost_irq(channel))
250 omap_crtc_error_irq(crtc, irqstatus);
247 } 251 }
248 252
249 omap_irq_fifo_underflow(priv, irqstatus); 253 omap_irq_fifo_underflow(priv, irqstatus);
@@ -279,6 +283,7 @@ int omap_drm_irq_install(struct drm_device *dev)
279{ 283{
280 struct omap_drm_private *priv = dev->dev_private; 284 struct omap_drm_private *priv = dev->dev_private;
281 struct omap_drm_irq *error_handler = &priv->error_handler; 285 struct omap_drm_irq *error_handler = &priv->error_handler;
286 unsigned int num_mgrs = dss_feat_get_num_mgrs();
282 unsigned int max_planes; 287 unsigned int max_planes;
283 unsigned int i; 288 unsigned int i;
284 int ret; 289 int ret;
@@ -294,6 +299,9 @@ int omap_drm_irq_install(struct drm_device *dev)
294 priv->irq_mask |= omap_underflow_irqs[i]; 299 priv->irq_mask |= omap_underflow_irqs[i];
295 } 300 }
296 301
302 for (i = 0; i < num_mgrs; ++i)
303 priv->irq_mask |= dispc_mgr_get_sync_lost_irq(i);
304
297 dispc_runtime_get(); 305 dispc_runtime_get();
298 dispc_clear_irqstatus(0xffffffff); 306 dispc_clear_irqstatus(0xffffffff);
299 dispc_runtime_put(); 307 dispc_runtime_put();