diff options
author | Liu Ying <b17645@freescale.com> | 2009-09-30 09:45:18 -0400 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-02-12 17:19:18 +0100 |
commit | 12b0fdeb6d48101ccc707e72456a7f625596d962 (patch) | |
tree | fac7078b7a037004ac40ddea70e00c3c62fd6567 | |
parent | 8917a3421107a7b0f28e1fdba4090189c9bbac5c (diff) |
ENGR00116661 V4L2 output: Support input cropping when no resizing is needed
Use IC channel to do input cropping even when other conditions make the
V4L2 output driver to bypass IC channel.
Signed-off-by: Liu Ying <b17645@freescale.com>
-rw-r--r-- | drivers/media/video/mxc/output/mxc_v4l2_output.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/media/video/mxc/output/mxc_v4l2_output.c b/drivers/media/video/mxc/output/mxc_v4l2_output.c index 4fa4a641ab62..59420597f871 100644 --- a/drivers/media/video/mxc/output/mxc_v4l2_output.c +++ b/drivers/media/video/mxc/output/mxc_v4l2_output.c @@ -1059,14 +1059,13 @@ static int mxc_v4l2out_streamon(vout_data * vout) dev_dbg(dev, "Using SDC channel\n"); - /* Bypass IC if resizing and rotation not needed - Always do CSC in DP - Meanwhile, apply IC bypass to SDC only + /* + * Bypass IC if resizing and rotation are not needed + * Meanwhile, apply IC bypass to SDC only */ if (out_width == vout->v2f.fmt.pix.width && out_height == vout->v2f.fmt.pix.height && ipu_can_rotate_in_place(vout->rotate)) { - pr_debug("Bypassing IC\n"); vout->ic_bypass = 1; ipu_disable_irq(IPU_IRQ_PP_IN_EOF); } else { @@ -1080,6 +1079,16 @@ static int mxc_v4l2out_streamon(vout_data * vout) vout->ic_bypass = 0; #endif + /* We are using IC to do input cropping */ + if (vout->queue_buf_paddr[vout->ipu_buf[0]] != + vout->v4l2_bufs[vout->ipu_buf[0]].m.offset || + vout->queue_buf_paddr[vout->ipu_buf[1]] != + vout->v4l2_bufs[vout->ipu_buf[1]].m.offset) + vout->ic_bypass = 0; + + if (vout->ic_bypass) + pr_debug("Bypassing IC\n"); + fbvar = fbi->var; if (fbi->fbops->fb_ioctl) { |