media: ti-vpe: vpe: Add cropping ioctl support
authorArchit Taneja <archit@ti.com>
Thu, 19 Dec 2013 09:35:31 +0000 (15:05 +0530)
committerAnand Balagopalakrishnan <anandb@ti.com>
Mon, 15 Jun 2015 08:06:05 +0000 (13:36 +0530)
commit201cdc2a96fba9e427e3505582d768fc0b3ac8b8
tree8c475c150e9210d015bec28179857021eb06e390
parent61234504564dc88feb3c46b1057e82d5665d879b
media: ti-vpe: vpe: Add cropping ioctl support

Add crop ioctl ops. For VPE, cropping only makes sense with the input to VPE, or
the V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE buffer type.

For the CAPTURE type, a S_CROP ioctl results in setting the crop region as the
whole image itself, hence making crop dimensions same as the pix dimensions.

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

Some standard crop parameter checks are done in __vpe_try_crop().

Change-Id: I9329dee27db526bde54000552b1184e8f061244f
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
drivers/media/platform/ti-vpe/vpe.c