diff options
author | Fancy Fang <chen.fang@nxp.com> | 2017-09-21 11:44:38 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 2f682306ff8dba335fd250622bb3aa8015f9bd78 (patch) | |
tree | 9c5a3d8326a166f296580f4d534b0ff91ab6195b /drivers/video | |
parent | f68b5233c82ab1d59e35383ad5b1f2f76ddf3005 (diff) |
MLK-16536-7 video: fbdev: dcss: abstract cfifo wq flush operation
Abstract the cfifo workqueue flush operation to a separate
interface 'finish_cfifo()'.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/mxc/imx_dcss.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/fbdev/mxc/imx_dcss.c b/drivers/video/fbdev/mxc/imx_dcss.c index 756076d80cfa..0b600143797c 100644 --- a/drivers/video/fbdev/mxc/imx_dcss.c +++ b/drivers/video/fbdev/mxc/imx_dcss.c @@ -2342,6 +2342,13 @@ static void flush_cfifo(struct ctxld_fifo *cfifo, WARN(!ret, "work has already been queued\n"); } +static int finish_cfifo(struct ctxld_fifo *cfifo) +{ + flush_workqueue(cfifo->ctxld_wq); + + return 0; +} + static int commit_cfifo(uint32_t channel, struct dcss_info *info, struct ctxld_commit *cc) @@ -2380,7 +2387,7 @@ restart: atomic_set(&info->flush, 1); spin_unlock(&cfifo->cqueue.lock); /* Wait fifo flush empty to avoid fifo wrap */ - flush_workqueue(cfifo->ctxld_wq); + finish_cfifo(cfifo); spin_lock(&cfifo->cqueue.lock); atomic_set(&info->flush, 0); kfifo_reset(&cfifo->fifo); @@ -2788,7 +2795,7 @@ static int dcss_pan_display(struct fb_var_screeninfo *var, /* TODO: blocking mode */ if (likely(!var->reserved[2])) /* make pan display synchronously */ - flush_workqueue(info->cfifo.ctxld_wq); + finish_cfifo(&info->cfifo); goto out; |