From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bin-mail-out-06.binero.net ([195.74.38.229]:57503 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbeKBIiG (ORCPT ); Fri, 2 Nov 2018 04:38:06 -0400 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Sakari Ailus , Benoit Parrot , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Subject: [PATCH v2 11/30] media: entity: Skip link validation for pads to which there is no route to Date: Fri, 2 Nov 2018 00:31:25 +0100 Message-Id: <20181101233144.31507-12-niklas.soderlund+renesas@ragnatech.se> In-Reply-To: <20181101233144.31507-1-niklas.soderlund+renesas@ragnatech.se> References: <20181101233144.31507-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: From: Sakari Ailus Links are validated along the pipeline which is about to start streaming. Not all the pads in entities that are traversed along that pipeline are part of the pipeline, however. Skip the link validation for such pads. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund --- drivers/media/media-entity.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 4d10bc186e1e7a10..cdf3805dec755ec5 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -493,6 +493,11 @@ __must_check int __media_pipeline_start(struct media_pad *pad, struct media_pad *other_pad = link->sink->entity == entity ? link->sink : link->source; + /* Ignore pads to which there is no route. */ + if (!media_entity_has_route(entity, pad->index, + other_pad->index)) + continue; + /* Mark that a pad is connected by a link. */ bitmap_clear(has_no_links, other_pad->index, 1); -- 2.19.1