forked from luck/tmp_suning_uos_patched
media: v4l: Remove support for crop default target in subdev drivers
The V4L2 sub-device API does not support the crop default target. A number of drivers apparently still did support this, likely as it was needed by the SoC camera framework. Drop support for the default crop rectaingle in sub-device drivers, and use the bounds rectangle in SoC camera instead. Reported-by: Helmut Grohne <h.grohne@intenta.de> Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
654be7dde7
commit
af8e15620e
|
@ -136,7 +136,6 @@ static int ak881x_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
sel->r.width = 720;
|
||||
|
|
|
@ -445,7 +445,6 @@ static int mt9m111_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = MT9M111_MIN_DARK_COLS;
|
||||
sel->r.top = MT9M111_MIN_DARK_ROWS;
|
||||
sel->r.width = MT9M111_MAX_WIDTH;
|
||||
|
|
|
@ -888,12 +888,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd,
|
|||
sel->r.width = MAX_WIDTH;
|
||||
sel->r.height = MAX_HEIGHT;
|
||||
return 0;
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
sel->r.width = VGA_WIDTH;
|
||||
sel->r.height = VGA_HEIGHT;
|
||||
return 0;
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r = priv->frame;
|
||||
return 0;
|
||||
|
|
|
@ -1010,7 +1010,6 @@ static int ov2640_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
|
|
|
@ -449,7 +449,6 @@ static int ov6650_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = DEF_HSTRT << 1;
|
||||
sel->r.top = DEF_VSTRT << 1;
|
||||
sel->r.width = W_CIF;
|
||||
|
|
|
@ -1147,7 +1147,6 @@ static int ov772x_get_selection(struct v4l2_subdev *sd,
|
|||
sel->r.top = 0;
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r.width = priv->win->rect.width;
|
||||
sel->r.height = priv->win->rect.height;
|
||||
|
|
|
@ -589,7 +589,6 @@ static int rj54n1_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = RJ54N1_COLUMN_SKIP;
|
||||
sel->r.top = RJ54N1_ROW_SKIP;
|
||||
sel->r.width = RJ54N1_MAX_WIDTH;
|
||||
|
|
|
@ -243,7 +243,6 @@ static int mt9m001_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = MT9M001_COLUMN_SKIP;
|
||||
sel->r.top = MT9M001_ROW_SKIP;
|
||||
sel->r.width = MT9M001_MAX_WIDTH;
|
||||
|
|
|
@ -884,12 +884,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd,
|
|||
sel->r.width = MAX_WIDTH;
|
||||
sel->r.height = MAX_HEIGHT;
|
||||
return 0;
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
sel->r.width = VGA_WIDTH;
|
||||
sel->r.height = VGA_HEIGHT;
|
||||
return 0;
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r = priv->frame;
|
||||
return 0;
|
||||
|
|
|
@ -368,7 +368,6 @@ static int mt9v022_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = MT9V022_COLUMN_SKIP;
|
||||
sel->r.top = MT9V022_ROW_SKIP;
|
||||
sel->r.width = MT9V022_MAX_WIDTH;
|
||||
|
|
|
@ -896,7 +896,6 @@ static int ov5642_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
sel->r.width = OV5642_MAX_WIDTH;
|
||||
|
|
|
@ -862,7 +862,6 @@ static int ov772x_get_selection(struct v4l2_subdev *sd,
|
|||
sel->r.top = 0;
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.width = OV772X_MAX_WIDTH;
|
||||
sel->r.height = OV772X_MAX_HEIGHT;
|
||||
return 0;
|
||||
|
|
|
@ -554,7 +554,6 @@ static int ov9640_get_selection(struct v4l2_subdev *sd,
|
|||
sel->r.top = 0;
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r.width = W_SXGA;
|
||||
sel->r.height = H_SXGA;
|
||||
|
|
|
@ -730,7 +730,6 @@ static int ov9740_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
|
|
|
@ -591,7 +591,6 @@ static int rj54n1_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = RJ54N1_COLUMN_SKIP;
|
||||
sel->r.top = RJ54N1_ROW_SKIP;
|
||||
sel->r.width = RJ54N1_MAX_WIDTH;
|
||||
|
|
|
@ -1082,7 +1082,6 @@ static int tvp5150_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = 0;
|
||||
sel->r.top = 0;
|
||||
sel->r.width = TVP5150_H_MAX;
|
||||
|
|
|
@ -52,7 +52,7 @@ int soc_camera_client_g_rect(struct v4l2_subdev *sd, struct v4l2_rect *rect)
|
|||
return ret;
|
||||
}
|
||||
|
||||
sdsel.target = V4L2_SEL_TGT_CROP_DEFAULT;
|
||||
sdsel.target = V4L2_SEL_TGT_CROP_BOUNDS;
|
||||
ret = v4l2_subdev_call(sd, pad, get_selection, NULL, &sdsel);
|
||||
if (!ret)
|
||||
*rect = sdsel.r;
|
||||
|
|
|
@ -223,7 +223,6 @@ static int imx074_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
case V4L2_SEL_TGT_CROP:
|
||||
return 0;
|
||||
default:
|
||||
|
|
|
@ -330,7 +330,6 @@ static int mt9t031_get_selection(struct v4l2_subdev *sd,
|
|||
|
||||
switch (sel->target) {
|
||||
case V4L2_SEL_TGT_CROP_BOUNDS:
|
||||
case V4L2_SEL_TGT_CROP_DEFAULT:
|
||||
sel->r.left = MT9T031_COLUMN_SKIP;
|
||||
sel->r.top = MT9T031_ROW_SKIP;
|
||||
sel->r.width = MT9T031_MAX_WIDTH;
|
||||
|
|
Loading…
Reference in New Issue
Block a user