diff options
author | Jason Chen <b02280@freescale.com> | 2010-01-26 16:55:03 +0800 |
---|---|---|
committer | Jason Chen <b02280@freescale.com> | 2010-01-26 16:59:34 +0800 |
commit | 9a0a53f547d18a9bd0787feb0c633b00e2c92c0e (patch) | |
tree | 0d6f5bcff63c3764c45982308dd724d6c50a8296 /drivers/mxc/ipu3 | |
parent | f76ad8ec4c4fdf8f8f9ba20d969306bba8fe26cd (diff) |
ENGR00120428 v4l2 output: jitter after blank/unblank fb
blank/unblank fb during v4l2 playback, unblank will cause current buffer
of display channel to be 1. This patch make the sequence of select
display buffer correct.
Signed-off-by: Jason Chen <b02280@freescale.com>
Diffstat (limited to 'drivers/mxc/ipu3')
-rw-r--r-- | drivers/mxc/ipu3/ipu_common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c index 5b51fe2942ed..f53a047a186a 100644 --- a/drivers/mxc/ipu3/ipu_common.c +++ b/drivers/mxc/ipu3/ipu_common.c @@ -1788,6 +1788,7 @@ void ipu_clear_buffer_ready(ipu_channel_t channel, ipu_buffer_t type, __raw_writel(0x0, IPU_GPR); /* write one to set */ spin_unlock_irqrestore(&ipu_lock, lock_flags); } +EXPORT_SYMBOL(ipu_clear_buffer_ready); static irqreturn_t disable_chan_irq_handler(int irq, void *dev_id) { @@ -2162,6 +2163,22 @@ void ipu_free_irq(uint32_t irq, void *dev_id) } EXPORT_SYMBOL(ipu_free_irq); +uint32_t ipu_get_cur_buffer_idx(ipu_channel_t channel, ipu_buffer_t type) +{ + uint32_t reg, dma_chan; + + dma_chan = channel_2_dma(channel, type); + if (!idma_is_valid(dma_chan)) + return -EINVAL; + + reg = __raw_readl(IPU_CHA_CUR_BUF(dma_chan/32)); + if (reg & idma_mask(dma_chan)) + return 1; + else + return 0; +} +EXPORT_SYMBOL(ipu_get_cur_buffer_idx); + uint32_t _ipu_channel_status(ipu_channel_t channel) { uint32_t stat = 0; |