All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com, mchehab@osg.samsung.com,
	hverkuil@xs4all.nl, javier@osg.samsung.com
Subject: [PATCH v3 12/23] v4l: vsp1: Use the new media graph walk interface
Date: Wed, 16 Dec 2015 15:32:27 +0200	[thread overview]
Message-ID: <1450272758-29446-13-git-send-email-sakari.ailus@iki.fi> (raw)
In-Reply-To: <1450272758-29446-1-git-send-email-sakari.ailus@iki.fi>

The media graph walk requires initialisation and cleanup soon. Update the
users to perform the soon necessary API calls.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/vsp1/vsp1_video.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
index f741582..ce10d86 100644
--- a/drivers/media/platform/vsp1/vsp1_video.c
+++ b/drivers/media/platform/vsp1/vsp1_video.c
@@ -415,6 +415,12 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
 	mutex_lock(&mdev->graph_mutex);
 
 	/* Walk the graph to locate the entities and video nodes. */
+	ret = media_entity_graph_walk_init(&graph, mdev);
+	if (ret) {
+		mutex_unlock(&mdev->graph_mutex);
+		return ret;
+	}
+
 	media_entity_graph_walk_start(&graph, entity);
 
 	while ((entity = media_entity_graph_walk_next(&graph))) {
@@ -448,6 +454,8 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
 
 	mutex_unlock(&mdev->graph_mutex);
 
+	media_entity_graph_walk_cleanup(&graph);
+
 	/* We need one output and at least one input. */
 	if (pipe->num_inputs == 0 || !pipe->output) {
 		ret = -EPIPE;
-- 
2.1.4


  parent reply	other threads:[~2015-12-16 13:34 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16 13:32 [PATCH v3 00/23] Unrestricted media entity ID range support Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 01/23] media: Enforce single entity->pipe in a pipeline Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 02/23] media: Introduce internal index for media entities Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 03/23] media: Add an API to manage entity enumerations Sakari Ailus
2015-12-16 13:44   ` [PATCH v3.1 " Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 04/23] media: Move struct media_entity_graph definition up Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 05/23] media: Add KernelDoc documentation for struct media_entity_graph Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 06/23] media: Move media graph state for streamon/off to the pipeline Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 07/23] media: Amend media graph walk API by init and cleanup functions Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 08/23] media: Use the new media graph walk interface Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 09/23] v4l: omap3isp: " Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 10/23] v4l: exynos4-is: " Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 11/23] v4l: xilinx: " Sakari Ailus
2015-12-16 13:32 ` Sakari Ailus [this message]
2015-12-16 13:32 ` [PATCH v3 13/23] media: Use entity enums in graph walk Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 14/23] media: Keep using the same graph walk object for a given pipeline Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 15/23] v4l: omap3isp: Use media entity enumeration interface Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 16/23] v4l: vsp1: " Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 17/23] staging: v4l: omap4iss: Fix sub-device power management code Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 18/23] staging: v4l: omap4iss: Use media entity enumeration interface Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 19/23] staging: v4l: omap4iss: Use the new media graph walk interface Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 20/23] staging: v4l: davinci_vpbe: " Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 21/23] media: Remove pre-allocated entity enumeration bitmap Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 22/23] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c Sakari Ailus
2015-12-16 13:32 ` [PATCH v3 23/23] media: Update media graph walk documentation for the changed API Sakari Ailus
2015-12-16 14:03 ` [PATCH v3 00/23] Unrestricted media entity ID range support Sakari Ailus
2015-12-16 17:39   ` Mauro Carvalho Chehab
2015-12-21 14:17     ` Javier Martinez Canillas
2015-12-23 12:32   ` Mauro Carvalho Chehab
2015-12-23 12:32     ` Mauro Carvalho Chehab
2015-12-27 17:11     ` Laurent Pinchart
2015-12-27 17:11       ` Laurent Pinchart
2015-12-28  3:06       ` Javier Martinez Canillas
2015-12-28  3:06         ` Javier Martinez Canillas
2015-12-28 10:05       ` Mauro Carvalho Chehab
2015-12-28 10:05         ` Mauro Carvalho Chehab

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=1450272758-29446-13-git-send-email-sakari.ailus@iki.fi \
    --to=sakari.ailus@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=javier@osg.samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    /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 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.