From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3256C433FE for ; Tue, 5 Oct 2021 08:58:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91BD66120F for ; Tue, 5 Oct 2021 08:58:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233543AbhJEJAU (ORCPT ); Tue, 5 Oct 2021 05:00:20 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:60730 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233434AbhJEJAR (ORCPT ); Tue, 5 Oct 2021 05:00:17 -0400 Received: from deskari.lan (91-158-153-130.elisa-laajakaista.fi [91.158.153.130]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1AF731447; Tue, 5 Oct 2021 10:58:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1633424306; bh=DRLJ+R0TbbvqigB5q68R6rhX+XyW5CJQPCSMtDNY2hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UZr9dZ1vLepZNR9i3fKp1O6J3tUMzM2lS9w35NcrpIiV7pJyKoz/LhBqbQJwxgDww oaHdVvbNcuADwAtS2KJZ6Q+LEB1TapVUcJbcQalcxaYJHvljCiGFkKd6WmbB9AHcX+ MbBdrnS8WQWnxZ6MY5PU0+huA2UVnMzIwB0TVMUM= From: Tomi Valkeinen To: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com, Jacopo Mondi , Laurent Pinchart , niklas.soderlund+renesas@ragnatech.se Cc: Mauro Carvalho Chehab , Hans Verkuil , Tomi Valkeinen , Pratyush Yadav , Michal Simek Subject: [PATCH v9 14/36] media: entity: Add has_route entity operation Date: Tue, 5 Oct 2021 11:57:28 +0300 Message-Id: <20211005085750.138151-15-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211005085750.138151-1-tomi.valkeinen@ideasonboard.com> References: <20211005085750.138151-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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); }; /** -- 2.25.1