summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2015-07-03 15:04:46 +0800
committerFancy Fang <chen.fang@freescale.com>2015-07-07 13:00:30 +0800
commit871dd94da0a7221f13a46dc4e066a87c7b66fdf6 (patch)
tree3eb464a7fbf38b19442edc8f65340050d4bd3464
parent6824cff93d368eafbf96c71fad541f9bc2502e3a (diff)
MLK-10507 video: mxsfb: clear vsync and frame_done irqs immediately in ISR
The vsync and frame_done irqs should be cleared in the ISR. Otherwise, the unrequired irq may be triggered in a wrong moment. Signed-off-by: Fancy Fang <chen.fang@freescale.com>
-rw-r--r--drivers/video/mxsfb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index ec8ebe748315..43f6058d68be 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -405,6 +405,8 @@ static irqreturn_t mxsfb_irq_handler(int irq, void *dev_id)
acked_status = (enable & status) << CTRL1_IRQ_STATUS_SHIFT;
if ((acked_status & CTRL1_VSYNC_EDGE_IRQ) && host->wait4vsync) {
+ writel(CTRL1_VSYNC_EDGE_IRQ,
+ host->base + LCDC_CTRL1 + REG_CLR);
writel(CTRL1_VSYNC_EDGE_IRQ_EN,
host->base + LCDC_CTRL1 + REG_CLR);
host->wait4vsync = 0;
@@ -412,6 +414,8 @@ static irqreturn_t mxsfb_irq_handler(int irq, void *dev_id)
}
if (acked_status & CTRL1_CUR_FRAME_DONE_IRQ) {
+ writel(CTRL1_CUR_FRAME_DONE_IRQ,
+ host->base + LCDC_CTRL1 + REG_CLR);
writel(CTRL1_CUR_FRAME_DONE_IRQ_EN,
host->base + LCDC_CTRL1 + REG_CLR);
up(&host->flip_sem);
@@ -816,8 +820,6 @@ static int mxsfb_wait_for_vsync(struct fb_info *fb_info)
init_completion(&host->vsync_complete);
- writel(CTRL1_VSYNC_EDGE_IRQ,
- host->base + LCDC_CTRL1 + REG_CLR);
host->wait4vsync = 1;
writel(CTRL1_VSYNC_EDGE_IRQ_EN,
host->base + LCDC_CTRL1 + REG_SET);
@@ -915,8 +917,6 @@ static int mxsfb_pan_display(struct fb_var_screeninfo *var,
writel(fb_info->fix.smem_start + offset,
host->base + host->devdata->next_buf);
- writel(CTRL1_CUR_FRAME_DONE_IRQ,
- host->base + LCDC_CTRL1 + REG_CLR);
writel(CTRL1_CUR_FRAME_DONE_IRQ_EN,
host->base + LCDC_CTRL1 + REG_SET);