From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH v2 1/1] media: Print information on failed link validation
Date: Wed, 29 Oct 2014 01:20:06 +0200 [thread overview]
Message-ID: <3033119.78jigqieeC@avalon> (raw)
In-Reply-To: <1414537804-25303-1-git-send-email-sakari.ailus@iki.fi>
Hi Sakari,
Thank you for the patch.
On Wednesday 29 October 2014 01:10:04 Sakari Ailus wrote:
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
>
> The Media controller doesn't tell much to the user in cases such as pipeline
> startup failure. The link validation is the most common media graph (or in
> V4L2's case, format) related reason for the failure. In more complex
> pipelines the reason may not always be obvious to the user, so point them
> to look at the right direction.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> since v1:
> - Fix language in the second message.
>
> drivers/media/media-entity.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
> index 37c334e..a4030c3 100644
> --- a/drivers/media/media-entity.c
> +++ b/drivers/media/media-entity.c
> @@ -279,8 +279,14 @@ __must_check int media_entity_pipeline_start(struct
> media_entity *entity, continue;
>
> ret = entity->ops->link_validate(link);
> - if (ret < 0 && ret != -ENOIOCTLCMD)
> + if (ret < 0 && ret != -ENOIOCTLCMD) {
> + dev_dbg(entity->parent->dev,
> + "link validation failed for \"%s\":%u -> \"%s\":%u, error
%d\n",
> + entity->name, link->source->index,
> + link->sink->entity->name,
> + link->sink->index, ret);
> goto error;
> + }
> }
>
> /* Either no links or validated links are fine. */
> @@ -288,6 +294,11 @@ __must_check int media_entity_pipeline_start(struct
> media_entity *entity,
>
> if (!bitmap_full(active, entity->num_pads)) {
> ret = -EPIPE;
> + dev_dbg(entity->parent->dev,
> + "\"%s\":%u must be connected by an enabled link, error %d\n",
> + entity->name,
> + find_first_zero_bit(active, entity->num_pads),
> + ret);
Given that ret is always set to -EPIPE, I wouldn't print ", error %d".
Apart from that,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> goto error;
> }
> }
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-10-28 23:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 21:40 [PATCH 1/1] media: Print information on failed link validation Sakari Ailus
2014-10-28 23:10 ` [PATCH v2 " Sakari Ailus
2014-10-28 23:20 ` Laurent Pinchart [this message]
2014-10-28 23:33 ` Sakari Ailus
2014-10-28 23:35 ` [PATCH v3 " Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3033119.78jigqieeC@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox