diff options
author | Jason Chen <jason.chen@linaro.org> | 2011-12-05 18:21:09 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2012-01-11 21:39:15 +0800 |
commit | 01026a75447a669033410f7af51acb86dbf35936 (patch) | |
tree | 65c3481aeebb1601ee933623c0f43ddb76d60b21 | |
parent | 10953b93796ccbfaa6eb5ca2329ba137e6ef47ce (diff) |
MXC V4L2 output: porting to fsl imx_2.6.38 branch base
to base commit 433c6306fe9455163cff3591b4cf8e2f22bc6cc8
add v4l2 output driver.
Signed-off-by: Jason Chen <jason.chen@linaro.org>
-rw-r--r-- | drivers/media/video/mxc/output/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/mxc/output/mxc_vout.c | 19 |
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/video/mxc/output/Kconfig b/drivers/media/video/mxc/output/Kconfig index 72b32879697..4f747509792 100644 --- a/drivers/media/video/mxc/output/Kconfig +++ b/drivers/media/video/mxc/output/Kconfig @@ -1,6 +1,7 @@ config VIDEO_MXC_IPU_OUTPUT bool "IPU v4l2 support" depends on VIDEO_MXC_OUTPUT && MXC_IPU && FB_MXC + select VIDEOBUF_DMA_CONTIG default y ---help--- This is the video4linux2 driver for IPU post processing video output. diff --git a/drivers/media/video/mxc/output/mxc_vout.c b/drivers/media/video/mxc/output/mxc_vout.c index 08edfb3087e..57e684f9930 100644 --- a/drivers/media/video/mxc/output/mxc_vout.c +++ b/drivers/media/video/mxc/output/mxc_vout.c @@ -772,9 +772,10 @@ static int mxc_vidioc_g_fmt_vid_out(struct file *file, void *fh, return 0; } -static inline int ipu_try_task(struct ipu_task *task) +static inline int ipu_try_task(struct mxc_vout_output *vout) { int ret; + struct ipu_task *task = &vout->task; again: ret = ipu_check_task(task); @@ -789,11 +790,19 @@ again: goto again; } if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER) { - task->output.crop.w -= 8; + if (vout->disp_support_windows) { + task->output.width -= 8; + task->output.crop.w = task->output.width; + } else + task->output.crop.w -= 8; goto again; } if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER) { - task->output.crop.h -= 8; + if (vout->disp_support_windows) { + task->output.height -= 8; + task->output.crop.h = task->output.height; + } else + task->output.crop.h -= 8; goto again; } ret = -EINVAL; @@ -830,7 +839,7 @@ static int mxc_vout_try_task(struct mxc_vout_output *vout) else vout->task.output.format = IPU_PIX_FMT_RGB565; } - ret = ipu_try_task(&vout->task); + ret = ipu_try_task(vout); } return ret; @@ -1575,7 +1584,7 @@ static int __init mxc_vout_setup_output(struct mxc_vout_dev *dev) return ret; } -static int __init mxc_vout_probe(struct platform_device *pdev) +static int mxc_vout_probe(struct platform_device *pdev) { int ret; struct mxc_vout_dev *dev; |