* [PATCH v3 0/2] media: updating error codes on streamon
@ 2016-03-30 19:06 Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 1/2] [media] media: change pipeline validation return error Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon Helen Mae Koike Fornazier
0 siblings, 2 replies; 4+ messages in thread
From: Helen Mae Koike Fornazier @ 2016-03-30 19:06 UTC (permalink / raw)
To: linux-media, laurent.pinchart, sakari.ailus, hverkuil,
sakari.ailus, mchehab, hans.verkuil, s.nawrocki
Cc: Helen Mae Koike Fornazier
Fix error code on streamon
The patch set is based on 'media/master' branch and available at
https://github.com/helen-fornazier/opw-staging media/devel
Changes since v2:
[media] media: change pipeline validation return error
* Added Ack by Sakari
Updated the DocBook in the commit:
[media] DocBook: update error code in videoc-streamon
Helen Mae Koike Fornazier (2):
[media] media: change pipeline validation return error
[media] DocBook: update error code in videoc-streamon
Documentation/DocBook/media/v4l/vidioc-streamon.xml | 8 ++++++++
drivers/media/media-entity.c | 2 +-
drivers/media/v4l2-core/v4l2-subdev.c | 4 ++--
3 files changed, 11 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] [media] media: change pipeline validation return error
2016-03-30 19:06 [PATCH v3 0/2] media: updating error codes on streamon Helen Mae Koike Fornazier
@ 2016-03-30 19:06 ` Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon Helen Mae Koike Fornazier
1 sibling, 0 replies; 4+ messages in thread
From: Helen Mae Koike Fornazier @ 2016-03-30 19:06 UTC (permalink / raw)
To: linux-media, laurent.pinchart, sakari.ailus, hverkuil,
sakari.ailus, mchehab, hans.verkuil, s.nawrocki
Cc: Helen Mae Koike Fornazier
According to the V4L2 API, the VIDIOC_STREAMON ioctl should return EPIPE
if there is a format mismatch in the pipeline configuration.
As the .vidioc_streamon in the v4l2_ioctl_ops usually forwards the error
caused by the v4l2_subdev_link_validate_default (if it is in use), it
should return -EPIPE when it detect the mismatch.
When an entity is connected to a non enabled link,
media_entity_pipeline_start should return -ENOLINK, as the link does not
exist.
Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
The patch is based on 'media/master' branch and available at
https://github.com/helen-fornazier/opw-staging media/devel
Changes since v2:
* Added Ack by Sakari
drivers/media/media-entity.c | 2 +-
drivers/media/v4l2-core/v4l2-subdev.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index c53c1d5..d8a2299 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -445,7 +445,7 @@ __must_check int __media_entity_pipeline_start(struct media_entity *entity,
bitmap_or(active, active, has_no_links, entity->num_pads);
if (!bitmap_full(active, entity->num_pads)) {
- ret = -EPIPE;
+ ret = -ENOLINK;
dev_dbg(entity->graph_obj.mdev->dev,
"\"%s\":%u must be connected by an enabled link\n",
entity->name,
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index d630838..918e79d 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -508,7 +508,7 @@ int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
if (source_fmt->format.width != sink_fmt->format.width
|| source_fmt->format.height != sink_fmt->format.height
|| source_fmt->format.code != sink_fmt->format.code)
- return -EINVAL;
+ return -EPIPE;
/* The field order must match, or the sink field order must be NONE
* to support interlaced hardware connected to bridges that support
@@ -516,7 +516,7 @@ int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
*/
if (source_fmt->format.field != sink_fmt->format.field &&
sink_fmt->format.field != V4L2_FIELD_NONE)
- return -EINVAL;
+ return -EPIPE;
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon
2016-03-30 19:06 [PATCH v3 0/2] media: updating error codes on streamon Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 1/2] [media] media: change pipeline validation return error Helen Mae Koike Fornazier
@ 2016-03-30 19:06 ` Helen Mae Koike Fornazier
2016-03-30 19:13 ` Sakari Ailus
1 sibling, 1 reply; 4+ messages in thread
From: Helen Mae Koike Fornazier @ 2016-03-30 19:06 UTC (permalink / raw)
To: linux-media, laurent.pinchart, sakari.ailus, hverkuil,
sakari.ailus, mchehab, hans.verkuil, s.nawrocki
Cc: Helen Mae Koike Fornazier
Add description of ENOLINK error
Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk>
---
The patch set is based on 'media/master' branch and available at
https://github.com/helen-fornazier/opw-staging media/devel
Changes since v2:
* this is a new commit in the set
Documentation/DocBook/media/v4l/vidioc-streamon.xml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/DocBook/media/v4l/vidioc-streamon.xml b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
index df2c63d..c4b88b0 100644
--- a/Documentation/DocBook/media/v4l/vidioc-streamon.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
@@ -123,6 +123,14 @@ synchronize with other events.</para>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><errorcode>ENOLINK</errorcode></term>
+ <listitem>
+ <para>The driver implements Media Controller interface and
+ the pipeline configuration is invalid.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
</refentry>
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon
2016-03-30 19:06 ` [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon Helen Mae Koike Fornazier
@ 2016-03-30 19:13 ` Sakari Ailus
0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2016-03-30 19:13 UTC (permalink / raw)
To: Helen Mae Koike Fornazier, linux-media, laurent.pinchart,
sakari.ailus, hverkuil, mchehab, hans.verkuil, s.nawrocki
Hi Helen,
Helen Mae Koike Fornazier wrote:
> Add description of ENOLINK error
>
> Signed-off-by: Helen Mae Koike Fornazier <helen.koike@collabora.co.uk>
> ---
>
> The patch set is based on 'media/master' branch and available at
> https://github.com/helen-fornazier/opw-staging media/devel
>
> Changes since v2:
> * this is a new commit in the set
>
> Documentation/DocBook/media/v4l/vidioc-streamon.xml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-streamon.xml b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
> index df2c63d..c4b88b0 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-streamon.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-streamon.xml
> @@ -123,6 +123,14 @@ synchronize with other events.</para>
> </para>
> </listitem>
> </varlistentry>
> + <varlistentry>
> + <term><errorcode>ENOLINK</errorcode></term>
> + <listitem>
> + <para>The driver implements Media Controller interface and
> + the pipeline configuration is invalid.
...pipeline link configuration...
Then it's apparent this is really about links (and not e.g. about formats).
With that,
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> + </para>
> + </listitem>
> + </varlistentry>
> </variablelist>
> </refsect1>
> </refentry>
>
--
Kind regards,
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-30 19:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 19:06 [PATCH v3 0/2] media: updating error codes on streamon Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 1/2] [media] media: change pipeline validation return error Helen Mae Koike Fornazier
2016-03-30 19:06 ` [PATCH v3 2/2] [media] DocBook: update error code in videoc-streamon Helen Mae Koike Fornazier
2016-03-30 19:13 ` Sakari Ailus
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.