aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chen <jason.chen@linaro.org>2011-12-05 18:21:09 +0800
committerJason Chen <jason.chen@linaro.org>2011-12-06 12:46:20 +0800
commit45fe0a3bb468fed637bda3368de0b65975d17eea (patch)
treedca469f6b6c1795f6d2c9920c4a011556278dd1e
parent33d80a9c9fb0ab0a6e93bbee3e0e3f25dcd90281 (diff)
downloadlinux-linaro-45fe0a3bb468fed637bda3368de0b65975d17eea.tar.gz
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/Kconfig1
-rw-r--r--drivers/media/video/mxc/output/mxc_vout.c19
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;