Commit af8e1562 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHelmut Grohne <h.grohne@intenta.de>
Suggested-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 654be7dd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −6
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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;
Loading