diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2014-11-06 14:54:33 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-04 09:39:35 -0500 |
commit | b518d86609cc066b626120fe6ec6fe3a4ccfcd54 (patch) | |
tree | 6f3ffee0373bf6693d87f054ea052f9cd5925a24 | |
parent | 21734b06430a935073ba11e3caa231cbf4fccb13 (diff) |
[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>
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 6 |
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, | |||
2092 | == SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP) | 2092 | == SMIAPP_DIGITAL_CROP_CAPABILITY_INPUT_CROP) |
2093 | return 0; | 2093 | return 0; |
2094 | return -EINVAL; | 2094 | return -EINVAL; |
2095 | case V4L2_SEL_TGT_NATIVE_SIZE: | ||
2096 | if (ssd == sensor->pixel_array | ||
2097 | && sel->pad == SMIAPP_PA_PAD_SRC) | ||
2098 | return 0; | ||
2099 | return -EINVAL; | ||
2095 | case V4L2_SEL_TGT_COMPOSE: | 2100 | case V4L2_SEL_TGT_COMPOSE: |
2096 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: | 2101 | case V4L2_SEL_TGT_COMPOSE_BOUNDS: |
2097 | if (sel->pad == ssd->source_pad) | 2102 | if (sel->pad == ssd->source_pad) |
@@ -2190,6 +2195,7 @@ static int __smiapp_get_selection(struct v4l2_subdev *subdev, | |||
2190 | 2195 | ||
2191 | switch (sel->target) { | 2196 | switch (sel->target) { |
2192 | case V4L2_SEL_TGT_CROP_BOUNDS: | 2197 | case V4L2_SEL_TGT_CROP_BOUNDS: |
2198 | case V4L2_SEL_TGT_NATIVE_SIZE: | ||
2193 | if (ssd == sensor->pixel_array) { | 2199 | if (ssd == sensor->pixel_array) { |
2194 | sel->r.left = sel->r.top = 0; | 2200 | sel->r.left = sel->r.top = 0; |
2195 | sel->r.width = | 2201 | sel->r.width = |