summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2015-07-03 15:04:46 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:56 -0500
commitb3f0a3e00318c1e2cf9e42a4aa74bd179bb243e9 (patch)
treefbe2ca39bedddbcc2843d6c3ef33327fcdbd6004 /drivers/video
parent11132bdafe151826fc916a74faf7f329f4505266 (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>
Diffstat (limited to 'drivers/video')
-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);