drm/tilcdc: cleanup irq handling
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 20 Oct 2015 09:08:03 +0000 (12:08 +0300)
committerJyri Sarha <jsarha@ti.com>
Thu, 25 Feb 2016 14:39:40 +0000 (16:39 +0200)
Cleanup irq handling. Clear the irq status unconditionally and
restructure the status bit conditions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
[Added description to the patch]
Signed-off-by: Jyri Sarha <jsarha@ti.com>
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

index 61aead2ddccb43d4902d732f8bd4b2e9f69c6b95..a6ef737c7d35c4f5f3a09a30a0f3b63ca4a5f069 100644 (file)
@@ -656,11 +656,12 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
        struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
        struct drm_device *dev = crtc->dev;
        struct tilcdc_drm_private *priv = dev->dev_private;
-       uint32_t stat = tilcdc_read_irqstatus(dev);
+       uint32_t stat;
 
-       if (stat & LCDC_PL_LOAD_DONE) {
-               tilcdc_clear_irqstatus(dev, stat);
-       } else {
+       stat = tilcdc_read_irqstatus(dev);
+       tilcdc_clear_irqstatus(dev, stat);
+
+       if ((stat & LCDC_END_OF_FRAME0) || (stat & LCDC_END_OF_FRAME1)) {
                struct drm_pending_vblank_event *event;
                unsigned long flags;
                uint32_t dirty = tilcdc_crtc->dirty & stat;
This page took 0.105007 seconds and 5 git commands to generate.