diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-10-28 23:35:04 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 14:45:58 (GMT) |
commit | fab9d30b7b4216affd1708f0bcf93c746cc428bd (patch) | |
tree | 70e67338d965c6d8ad6ec8a1e6b8440275195007 | |
parent | f491dbe049cc7d8fb4c1cdc7d9fdfac0d1d99869 (diff) | |
download | linux-fab9d30b7b4216affd1708f0bcf93c746cc428bd.tar.xz |
[media] media: Print information on failed link validation
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>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/media-entity.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 37c334e..4122d7f 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,10 @@ __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\n", + entity->name, + find_first_zero_bit(active, entity->num_pads)); goto error; } } |