mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
[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>
This commit is contained in:
parent
21734b0643
commit
b518d86609
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user