drm/tilcdc: Move LCDC_SYNC_LOST handling inside if (ver == 2) statement

Move LCDC_SYNC_LOST handling inside if (ver == 2) statement.
LCDC_SYNC_LOST interrupt status bit is only defined for version 2
silicon.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
This commit is contained in:
Jyri Sarha
2016-06-17 11:54:06 +03:00
parent 8fe5616b20
commit 1abcdac8ed

View File

@@ -731,18 +731,17 @@ irqreturn_t tilcdc_crtc_irq(struct drm_crtc *crtc)
wake_up(&tilcdc_crtc->frame_done_wq); wake_up(&tilcdc_crtc->frame_done_wq);
} }
tilcdc_write(dev, LCDC_END_OF_INT_IND_REG, 0); tilcdc_write(dev, LCDC_END_OF_INT_IND_REG, 0);
}
if (stat & LCDC_SYNC_LOST) { if (stat & LCDC_SYNC_LOST) {
dev_err_ratelimited(dev->dev, "%s(0x%08x): Sync lost", dev_err_ratelimited(dev->dev, "%s(0x%08x): Sync lost",
__func__, stat); __func__, stat);
tilcdc_crtc->frame_intact = false; tilcdc_crtc->frame_intact = false;
if (tilcdc_crtc->sync_lost_count++ > SYNC_LOST_COUNT_LIMIT) { if (tilcdc_crtc->sync_lost_count++ >
dev_err(dev->dev, SYNC_LOST_COUNT_LIMIT) {
"%s(0x%08x): Sync lost flood detected, disabling the interrupt", dev_err(dev->dev, "%s(0x%08x): Sync lost flood detected, disabling the interrupt", __func__, stat);
__func__, stat); tilcdc_write(dev, LCDC_INT_ENABLE_CLR_REG,
tilcdc_write(dev, LCDC_INT_ENABLE_CLR_REG, LCDC_SYNC_LOST);
LCDC_SYNC_LOST); }
} }
} }