From patchwork Tue Nov 30 14:15:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 12647453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D1EDC433F5 for ; Tue, 30 Nov 2021 14:17:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242136AbhK3OUU (ORCPT ); Tue, 30 Nov 2021 09:20:20 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:41006 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242138AbhK3OUG (ORCPT ); Tue, 30 Nov 2021 09:20:06 -0500 Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 93E931447; Tue, 30 Nov 2021 15:16:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1638281804; bh=DRLJ+R0TbbvqigB5q68R6rhX+XyW5CJQPCSMtDNY2hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eem041pz/B7KdRvPN+I4T3FvMvbbzvl4AJNW6sQpvD0Y2FMQJaEwbb5ZEH5XMLJeg blmvnl2Utt6TPFQtvgEkvMoDxWeomAsSn1Y0/eVx8/vPaZb/jo3AXKMblPtZbDwaMy 3Hp4a8890S3W5lLyZDmNVbu0dmWqU+GJEs76TqHI= From: Tomi Valkeinen To: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, Jacopo Mondi , Laurent Pinchart , niklas.soderlund+renesas@ragnatech.se, Mauro Carvalho Chehab , Hans Verkuil , Pratyush Yadav Cc: Tomi Valkeinen , Michal Simek Subject: [PATCH v10 14/38] media: entity: Add has_route entity operation Date: Tue, 30 Nov 2021 16:15:12 +0200 Message-Id: <20211130141536.891878-15-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211130141536.891878-1-tomi.valkeinen@ideasonboard.com> References: <20211130141536.891878-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Laurent Pinchart The optional operation can be used by entities to report whether two pads are internally connected. While at there, fix a Sphinx compiler warning in a comment block a few lines above. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek Signed-off-by: Sakari Ailus Signed-off-by: Jacopo Mondi Signed-off-by: Tomi Valkeinen --- include/media/media-entity.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 516d73a2941e..ad4020b2df65 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -187,6 +187,7 @@ enum media_pad_signal_type { * @flags: Pad flags, as defined in * :ref:`include/uapi/linux/media.h ` * (seek for ``MEDIA_PAD_FL_*``) + * * .. note:: * * @stream_count reference count must never be negative, but is a signed @@ -214,6 +215,10 @@ struct media_pad { * @link_validate: Return whether a link is valid from the entity point of * view. The media_pipeline_start() function * validates all links by calling this operation. Optional. + * @has_route: Return whether a route exists inside the entity between + * two given pads. Pads are passed to the operation ordered + * by index. Optional: If the operation isn't implemented + * all pads will be considered as connected. * * .. note:: * @@ -227,6 +232,8 @@ struct media_entity_operations { const struct media_pad *local, const struct media_pad *remote, u32 flags); int (*link_validate)(struct media_link *link); + bool (*has_route)(struct media_entity *entity, unsigned int pad0, + unsigned int pad1); }; /**