upstream: [media] v4l: ti-vpe: Add selection API in VPE driver
authorArchit Taneja <archit@ti.com>
Thu, 13 Mar 2014 11:44:09 +0000 (08:44 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:59:23 +0000 (11:59 +0900)
commiteef55219925b75312642527f3e3e0ac65e49d46a
tree4f870b016d349606a41c5b60072a75c634eac6d6
parent8782502d18af277c3ac5ab01e7ab55184cc6325c
upstream: [media] v4l: ti-vpe: Add selection API in VPE driver

Add selection ioctl ops. For VPE, cropping makes sense only for the input to
VPE(or V4L2_BUF_TYPE_VIDEO_OUTPUT/MPLANE buffers) and composing makes sense
only for the output of VPE(or V4L2_BUF_TYPE_VIDEO_CAPTURE/MPLANE buffers).

For the CAPTURE type, V4L2_SEL_TGT_COMPOSE results in VPE writing the output
in a rectangle within the capture buffer. For the OUTPUT type, V4L2_SEL_TGT_CROP
results in selecting a rectangle region within the source buffer.

Setting the crop/compose rectangles should successfully result in
re-configuration of registers which are affected when either source or
destination dimensions change, set_srcdst_params() is called for this purpose.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/ti-vpe/vpe.c