summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2014-11-06 16:54:33 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-04 12:39:35 -0200
commitb518d86609cc066b626120fe6ec6fe3a4ccfcd54 (patch)
tree6f3ffee0373bf6693d87f054ea052f9cd5925a24 /drivers/media/i2c
parent21734b06430a935073ba11e3caa231cbf4fccb13 (diff)
downloadlinux-b518d86609cc066b626120fe6ec6fe3a4ccfcd54.tar.bz2
[media] smiapp: Support V4L2_SEL_TGT_NATIVE_SIZE
Add support for selection target V4L2_SEL_TGT_NATIVE_SIZE. It is equivalent of what V4L2_SEL_TGT_CROP_BOUNDS used to be. Support for V4L2_SEL_TGT_CROP_BOUNDS is still supported by the driver as a compatibility interface. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 022ad44b5e6c..65e4e059216f 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2092,6 +2092,11 @@ static int __smiapp_sel_supported(struct v4l2_subdev *subdev,
== SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP)
return 0;
return -EINVAL;
+ case V4L2_SEL_TGT_NATIVE_SIZE:
+ if (ssd == sensor->pixel_array
+ && sel->pad == SMIAPP_PA_PAD_SRC)
+ return 0;
+ return -EINVAL;
case V4L2_SEL_TGT_COMPOSE:
case V4L2_SEL_TGT_COMPOSE_BOUNDS:
if (sel->pad == ssd->source_pad)
@@ -2190,6 +2195,7 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev,
switch (sel->target) {
case V4L2_SEL_TGT_CROP_BOUNDS:
+ case V4L2_SEL_TGT_NATIVE_SIZE:
if (ssd == sensor->pixel_array) {
sel->r.left = sel->r.top = 0;
sel->r.width =