* [PATCH 1/6] v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 19:06 ` [PATCH 2/6] v4l: s5k4ecgx: " Laurent Pinchart
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil
The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/i2c/noon010pc30.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/noon010pc30.c b/drivers/media/i2c/noon010pc30.c
index 271d0b7..7eae487 100644
--- a/drivers/media/i2c/noon010pc30.c
+++ b/drivers/media/i2c/noon010pc30.c
@@ -554,6 +554,7 @@ static int noon010_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
nf = noon010_try_fmt(sd, &fmt->format);
noon010_try_frame_size(&fmt->format, &size);
fmt->format.colorspace = V4L2_COLORSPACE_JPEG;
+ fmt->format.field = V4L2_FIELD_NONE;
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
if (fh) {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/6] v4l: s5k4ecgx: Return V4L2_FIELD_NONE from pad-level set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
2014-05-26 19:06 ` [PATCH 1/6] v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 19:06 ` [PATCH 3/6] v4l: s5k5baf: " Laurent Pinchart
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil, Sangwook Lee
The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.
Cc: Sangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/i2c/s5k4ecgx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/s5k4ecgx.c b/drivers/media/i2c/s5k4ecgx.c
index 2750de6..1fcc76f 100644
--- a/drivers/media/i2c/s5k4ecgx.c
+++ b/drivers/media/i2c/s5k4ecgx.c
@@ -594,6 +594,7 @@ static int s5k4ecgx_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
pf = s5k4ecgx_try_fmt(sd, &fmt->format);
s5k4ecgx_try_frame_size(&fmt->format, &fsize);
fmt->format.colorspace = V4L2_COLORSPACE_JPEG;
+ fmt->format.field = V4L2_FIELD_NONE;
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
if (fh) {
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/6] v4l: s5k5baf: Return V4L2_FIELD_NONE from pad-level set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
2014-05-26 19:06 ` [PATCH 1/6] v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format Laurent Pinchart
2014-05-26 19:06 ` [PATCH 2/6] v4l: s5k4ecgx: " Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 19:06 ` [PATCH 4/6] v4l: s5k6a3: " Laurent Pinchart
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil, Andrzej Hajda
The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.
Cc: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/i2c/s5k5baf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 2d768ef..564f05f 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -1313,6 +1313,8 @@ static int s5k5baf_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
const struct s5k5baf_pixfmt *pixfmt;
int ret = 0;
+ mf->field = V4L2_FIELD_NONE;
+
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
*v4l2_subdev_get_try_format(fh, fmt->pad) = *mf;
return 0;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/6] v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
` (2 preceding siblings ...)
2014-05-26 19:06 ` [PATCH 3/6] v4l: s5k5baf: " Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 19:06 ` [PATCH 5/6] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format Laurent Pinchart
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil
The sensor is progressive, always return the field order set to
V4L2_FIELD_NONE.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/i2c/s5k6a3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c
index 7bc2271..c11a408 100644
--- a/drivers/media/i2c/s5k6a3.c
+++ b/drivers/media/i2c/s5k6a3.c
@@ -115,6 +115,7 @@ static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf)
fmt = find_sensor_format(mf);
mf->code = fmt->code;
+ mf->field = V4L2_FIELD_NONE;
v4l_bound_align_image(&mf->width, S5K6A3_SENSOR_MIN_WIDTH,
S5K6A3_SENSOR_MAX_WIDTH, 0,
&mf->height, S5K6A3_SENSOR_MIN_HEIGHT,
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/6] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
` (3 preceding siblings ...)
2014-05-26 19:06 ` [PATCH 4/6] v4l: s5k6a3: " Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 20:56 ` Sakari Ailus
2014-05-26 19:06 ` [PATCH 6/6] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format Laurent Pinchart
2014-05-26 19:27 ` [PATCH 0/6] Fix the format field order value for progressive subdevs Sylwester Nawrocki
6 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil, Sakari Ailus
The SMIA++ sensors are progressive, always return the field order set to
V4L2_FIELD_NONE.
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 06fb032..c741546 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -1554,6 +1554,7 @@ static int __smiapp_get_format(struct v4l2_subdev *subdev,
fmt->format.code = __smiapp_get_mbus_code(subdev, fmt->pad);
fmt->format.width = r->width;
fmt->format.height = r->height;
+ fmt->format.field = V4L2_FIELD_NONE;
}
return 0;
@@ -1687,6 +1688,7 @@ static int smiapp_set_format(struct v4l2_subdev *subdev,
fmt->format.code = __smiapp_get_mbus_code(subdev, fmt->pad);
fmt->format.width &= ~1;
fmt->format.height &= ~1;
+ fmt->format.field = V4L2_FIELD_NONE;
fmt->format.width =
clamp(fmt->format.width,
@@ -2674,6 +2676,7 @@ static int smiapp_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
try_fmt->width = sensor->limits[SMIAPP_LIMIT_X_ADDR_MAX] + 1;
try_fmt->height = sensor->limits[SMIAPP_LIMIT_Y_ADDR_MAX] + 1;
try_fmt->code = mbus_code;
+ try_fmt->field = V4L2_FIELD_NONE;
try_crop->top = 0;
try_crop->left = 0;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 6/6] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
` (4 preceding siblings ...)
2014-05-26 19:06 ` [PATCH 5/6] v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format Laurent Pinchart
@ 2014-05-26 19:06 ` Laurent Pinchart
2014-05-26 19:27 ` [PATCH 0/6] Fix the format field order value for progressive subdevs Sylwester Nawrocki
6 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2014-05-26 19:06 UTC (permalink / raw)
To: linux-media; +Cc: Sylwester Nawrocki, Hans Verkuil
The bridge driver doesn't support interlaced formats, always return the
field order set to V4L2_FIELD_NONE.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/media/platform/s3c-camif/camif-capture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/s3c-camif/camif-capture.c b/drivers/media/platform/s3c-camif/camif-capture.c
index deba425..cc89133 100644
--- a/drivers/media/platform/s3c-camif/camif-capture.c
+++ b/drivers/media/platform/s3c-camif/camif-capture.c
@@ -1271,6 +1271,7 @@ static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd,
}
mutex_unlock(&camif->lock);
+ mf->field = V4L2_FIELD_NONE;
mf->colorspace = V4L2_COLORSPACE_JPEG;
return 0;
}
@@ -1319,6 +1320,7 @@ static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd,
v4l2_dbg(1, debug, sd, "pad%d: code: 0x%x, %ux%u\n",
fmt->pad, mf->code, mf->width, mf->height);
+ mf->field = V4L2_FIELD_NONE;
mf->colorspace = V4L2_COLORSPACE_JPEG;
mutex_lock(&camif->lock);
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 0/6] Fix the format field order value for progressive subdevs
2014-05-26 19:05 [PATCH 0/6] Fix the format field order value for progressive subdevs Laurent Pinchart
` (5 preceding siblings ...)
2014-05-26 19:06 ` [PATCH 6/6] v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format Laurent Pinchart
@ 2014-05-26 19:27 ` Sylwester Nawrocki
6 siblings, 0 replies; 9+ messages in thread
From: Sylwester Nawrocki @ 2014-05-26 19:27 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-media, Hans Verkuil, Andrzej Hajda, Sakari Ailus,
Sangwook Lee
Hi Laurent,
On 05/26/2014 09:05 PM, Laurent Pinchart wrote:
> Hello,
>
> This patch set fixes five sensor drivers and one camera interface driver to
> return a format field order value set to V4L2_FIELD_NONE instead of
> V4L2_FIELD_ANY.
>
> V4L2_FIELD_ANY is used by applications to notify the driver that they don't
> care about the interlaced video field order. The value must never be returned
> by drivers, they must instead select a default field order they support.
>
> The six drivers fixed by this patch all forgot to initialize the field order,
> resulting in V4L2_FIELD_ANY (=0) being returned. As all those drivers support
> progressive video only, make them return V4L2_FIELD_NONE instead.
>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Sakari Ailus <sakari.ailus@iki.fi>
> Cc: Sangwook Lee <sangwook.lee@linaro.org>
>
> Laurent Pinchart (6):
> v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format
> v4l: s5k4ecgx: Return V4L2_FIELD_NONE from pad-level set format
> v4l: s5k5baf: Return V4L2_FIELD_NONE from pad-level set format
> v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format
> v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format
> v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format
For patches 1...4, 6:
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> drivers/media/i2c/noon010pc30.c | 1 +
> drivers/media/i2c/s5k4ecgx.c | 1 +
> drivers/media/i2c/s5k5baf.c | 2 ++
> drivers/media/i2c/s5k6a3.c | 1 +
> drivers/media/i2c/smiapp/smiapp-core.c | 3 +++
> drivers/media/platform/s3c-camif/camif-capture.c | 2 ++
> 6 files changed, 10 insertions(+)
--
Regards,
Sylwester
^ permalink raw reply [flat|nested] 9+ messages in thread