v4l: Remove support for crop default target in subdev drivers
Subsystems (8)
Sakari Ailus
maintainerPATCH 1/1 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 bround in SoC camera instead.
--- drivers/media/i2c/ak881x.c | 1 - drivers/media/i2c/mt9m111.c | 1 - drivers/media/i2c/mt9t112.c | 6 ------ drivers/media/i2c/ov2640.c | 1 - drivers/media/i2c/ov6650.c | 1 - drivers/media/i2c/ov772x.c | 1 - drivers/media/i2c/rj54n1cb0c.c | 1 - drivers/media/i2c/soc_camera/mt9m001.c | 1 - drivers/media/i2c/soc_camera/mt9t112.c | 6 ------ drivers/media/i2c/soc_camera/mt9v022.c | 1 - drivers/media/i2c/soc_camera/ov5642.c | 1 - drivers/media/i2c/soc_camera/ov772x.c | 1 - drivers/media/i2c/soc_camera/ov9640.c | 1 - drivers/media/i2c/soc_camera/ov9740.c | 1 - drivers/media/i2c/soc_camera/rj54n1cb0c.c | 1 - drivers/media/i2c/tvp5150.c | 1 - drivers/media/platform/soc_camera/soc_scale_crop.c | 2 +- drivers/staging/media/imx074/imx074.c | 1 - drivers/staging/media/mt9t031/mt9t031.c | 1 - 19 files changed, 1 insertion(+), 29 deletions(-)
drivers/media/i2c/ak881x.c +0 -1
@@ -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 ;
drivers/media/i2c/mt9m111.c +0 -1
@@ -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 ;
drivers/media/i2c/mt9t112.c +0 -6
@@ -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 ;
drivers/media/i2c/ov2640.c +0 -1
@@ -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 ;
drivers/media/i2c/ov6650.c +0 -1
@@ -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 ;
drivers/media/i2c/ov772x.c +0 -1
@@ -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;
drivers/media/i2c/rj54n1cb0c.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/mt9m001.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/mt9t112.c +0 -6
@@ -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 ;
drivers/media/i2c/soc_camera/mt9v022.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/ov5642.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/ov772x.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/ov9640.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/ov9740.c +0 -1
@@ -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 ;
drivers/media/i2c/soc_camera/rj54n1cb0c.c +0 -1
@@ -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 ;
drivers/media/i2c/tvp5150.c +0 -1
@@ -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 ;
drivers/media/platform/soc_camera/soc_scale_crop.c +1 -1
@@ -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;
drivers/staging/media/imx074/imx074.c +0 -1
@@ -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 :
drivers/staging/media/mt9t031/mt9t031.c +0 -1
@@ -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 ;
Signature · 1 line
2.11.0
Quoted 7 lines · Sakari Ailus
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 bround in SoC camera instead.
Reported-by Helmut Grohne <[email protected]>Suggested-by Hans Verkuil <[email protected]>
Thanks!
Hans
Quoted 263 lines
Signed-off-by Sakari Ailus <[email protected]>--- drivers/media/i2c/ak881x.c | 1 - drivers/media/i2c/mt9m111.c | 1 - drivers/media/i2c/mt9t112.c | 6 ------ drivers/media/i2c/ov2640.c | 1 - drivers/media/i2c/ov6650.c | 1 - drivers/media/i2c/ov772x.c | 1 - drivers/media/i2c/rj54n1cb0c.c | 1 - drivers/media/i2c/soc_camera/mt9m001.c | 1 - drivers/media/i2c/soc_camera/mt9t112.c | 6 ------ drivers/media/i2c/soc_camera/mt9v022.c | 1 - drivers/media/i2c/soc_camera/ov5642.c | 1 - drivers/media/i2c/soc_camera/ov772x.c | 1 - drivers/media/i2c/soc_camera/ov9640.c | 1 - drivers/media/i2c/soc_camera/ov9740.c | 1 - drivers/media/i2c/soc_camera/rj54n1cb0c.c | 1 - drivers/media/i2c/tvp5150.c | 1 - drivers/media/platform/soc_camera/soc_scale_crop.c | 2 +- drivers/staging/media/imx074/imx074.c | 1 - drivers/staging/media/mt9t031/mt9t031.c | 1 - 19 files changed, 1 insertion(+), 29 deletions(-)drivers/media/i2c/ak881x.c +0
-1@@ -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 ;drivers/media/i2c/mt9m111.c +0
-1@@ -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 ;drivers/media/i2c/mt9t112.c +0
-6@@ -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 ;drivers/media/i2c/ov2640.c +0
-1@@ -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 ;drivers/media/i2c/ov6650.c +0
-1@@ -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 ;drivers/media/i2c/ov772x.c +0
-1@@ -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;drivers/media/i2c/rj54n1cb0c.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/mt9m001.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/mt9t112.c +0
-6@@ -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 ;drivers/media/i2c/soc_camera/mt9v022.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/ov5642.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/ov772x.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/ov9640.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/ov9740.c +0
-1@@ -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 ;drivers/media/i2c/soc_camera/rj54n1cb0c.c +0
-1@@ -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 ;drivers/media/i2c/tvp5150.c +0
-1@@ -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 ;drivers/media/platform/soc_camera/soc_scale_crop.c +1
-1@@ -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;drivers/staging/media/imx074/imx074.c +0
-1@@ -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 :drivers/staging/media/mt9t031/mt9t031.c +0
-1@@ -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 ;
Quoted 5 lines · Hans Verkuil
Quoted 4 lines · Sakari Ailus
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 bround in SoC camera instead.
^
This was intended to be "bounds rectangle" instead. I'll fix that to the pull request.
Quoted 5 lines
Quoted 3 lines
Reported-by Helmut Grohne <[email protected]>Suggested-by Hans Verkuil <[email protected]>Acked-by Hans Verkuil <[email protected]>
Thanks!
Signature · 2 lines
Sakari Ailus e-mail: [email protected]
Quoted 5 lines · Sakari Ailus
drivers/media/i2c/mt9t112.c +0
-0@@ -888,12 +888,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd, sel->r.width =MAX_WIDTH ; sel->r.height =MAX_HEIGHT ;
drivers/media/i2c/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 893
Quoted 10 lines
drivers/media/i2c/mt9t112.c +0
-6return 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 ;
Together with the change in soc_scale_crop.c, this constitutes an (unintentional?) behaviour change. It was formerly reporting 640x480 and will now be reporting 2048x1536. I cannot tell whether that is reasonable.
Quoted 5 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-0@@ -884,12 +884,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd, sel->r.width =MAX_WIDTH ; sel->r.height =MAX_HEIGHT ;
drivers/media/i2c/soc_camera/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 889
Quoted 10 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-6return 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 ;
This one looks duplicate. Is there a good reason to have two drivers for mt9t112? This is lilely out of scope for the patch. Cced Jacopo Mondi as he introduced the copy.
Other than your patch looks fine to me.
Helmut
jacopo mondi
maintainerHi Helmut,
Quoted 33 lines · Helmut Grohne
Quoted 5 lines · Sakari Ailus
drivers/media/i2c/mt9t112.c +0
-0@@ -888,12 +888,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd, sel->r.width =MAX_WIDTH ; sel->r.height =MAX_HEIGHT ;drivers/media/i2c/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 893
Quoted 10 lines
drivers/media/i2c/mt9t112.c +0
-6return 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 ;Together with the change in
soc_scale_crop.c, this constitutes an (unintentional?) behaviour change. It was formerly reporting 640x480 and will now be reporting 2048x1536. I cannot tell whether that is reasonable.Quoted 11 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-5@@ -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 ;
Quoted 9 lines
drivers/media/i2c/soc_camera/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 889
Quoted 4 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-1-return 0 ;case V4L2_SEL_TGT_CROP : sel->r = priv->frame;return 0 ;This one looks duplicate. Is there a good reason to have two drivers for mt9t112? This is lilely out of scope for the patch. Cced Jacopo Mondi as he introduced the copy.
This version is the one using te soc_camera framework which is targeted for deprecation. The soc_camera based sensor drivers are being ported to be regular v4l2 sensor drivers, hence the copy in drivers/media/i2c/. The original versions in drivers/media/i2c/soc_camera will be around for a little longer and then possibly moved to staging or later removed.
Hope this clarifies.
Thanks
j
Quoted 3 lines
Other than your patch looks fine to me.
Helmut
Sakari Ailus
maintainerHi Helmut,
Quoted 13 lines · Helmut Grohne
Quoted 12 lines · Sakari Ailus
drivers/media/i2c/mt9t112.c +0
-6@@ -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 ;
Quoted 8 lines
drivers/media/i2c/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 893
Quoted 3 lines
drivers/media/i2c/mt9t112.c +0
-0case V4L2_SEL_TGT_CROP : sel->r = priv->frame;return 0 ;Together with the change in
soc_scale_crop.c, this constitutes an (unintentional?) behaviour change. It was formerly reporting 640x480 and will now be reporting 2048x1536. I cannot tell whether that is reasonable.
I'd say "yes". This is the only sub-device driver that puts a default other than the bounds there. Its source is SoC camera as you see below.
Quoted 24 lines
Quoted 6 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-0@@ -884,12 +884,6 @@ static int mt9t112_get_selection(struct v4l2_subdev *sd, sel->r.width =MAX_WIDTH ; sel->r.height =MAX_HEIGHT ;drivers/media/i2c/soc_camera/mt9t112.c static int mt9t112_get_selection(struct v4l2_subdev *sd, · line 889
Quoted 10 lines
drivers/media/i2c/soc_camera/mt9t112.c +0
-6return 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 ;This one looks duplicate. Is there a good reason to have two drivers for mt9t112? This is lilely out of scope for the patch. Cced Jacopo Mondi as he introduced the copy.
Other than your patch looks fine to me.
Helmut
Signature · 4 lines
Kind regards, Sakari Ailus [email protected]