summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYuxi Sun <b36102@freescale.com>2011-05-16 14:25:41 +0800
committerYangYonggang <b31664@freescale.com>2012-03-14 16:02:57 +0800
commitf50650c670e9eccafd40c518f00daa22d017a33e (patch)
treee54a225ec9225f8edc08974ebe825f7ffdc137ad /drivers
parent5f5f4440c0bcdf4ef74553f12166db41727df1b6 (diff)
ENGR00143324-1 v4l2_capture: add camera rotate function
add four kinds of camera rotate function: rotate_none, rotate_vert rotate_horiz, rotate_180 Signed-off-by: Yuxi Sun <b36102@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mxc/capture/ipu_csi_enc.c2
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/media/video/mxc/capture/ipu_csi_enc.c b/drivers/media/video/mxc/capture/ipu_csi_enc.c
index f7c3799400ae..7b43616a8514 100644
--- a/drivers/media/video/mxc/capture/ipu_csi_enc.c
+++ b/drivers/media/video/mxc/capture/ipu_csi_enc.c
@@ -171,7 +171,7 @@ static int csi_enc_setup(cam_data *cam)
err = ipu_init_channel_buffer(cam->ipu, CSI_MEM, IPU_OUTPUT_BUFFER,
pixel_fmt, cam->v2f.fmt.pix.width,
cam->v2f.fmt.pix.height,
- cam->v2f.fmt.pix.width, IPU_ROTATE_NONE,
+ cam->v2f.fmt.pix.width, cam->rotation,
dummy, dummy, 0,
cam->offset.u_offset,
cam->offset.v_offset);
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 75d35b116fe2..59a718957d1c 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1100,6 +1100,26 @@ static int mxc_v4l2_s_ctrl(cam_data *cam, struct v4l2_control *c)
case V4L2_MXC_ROTATE_90_LEFT:
tmp_rotation = IPU_ROTATE_90_LEFT;
break;
+ case V4L2_MXC_CAM_ROTATE_NONE:
+ if (vidioc_int_s_ctrl(cam->sensor, c)) {
+ ret = -EINVAL;
+ }
+ break;
+ case V4L2_MXC_CAM_ROTATE_VERT_FLIP:
+ if (vidioc_int_s_ctrl(cam->sensor, c)) {
+ ret = -EINVAL;
+ }
+ break;
+ case V4L2_MXC_CAM_ROTATE_HORIZ_FLIP:
+ if (vidioc_int_s_ctrl(cam->sensor, c)) {
+ ret = -EINVAL;
+ }
+ break;
+ case V4L2_MXC_CAM_ROTATE_180:
+ if (vidioc_int_s_ctrl(cam->sensor, c)) {
+ ret = -EINVAL;
+ }
+ break;
default:
ret = -EINVAL;
}