From patchwork Thu Apr 15 13:04:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 422979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAD68C43600 for ; Thu, 15 Apr 2021 13:05:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5754610CE for ; Thu, 15 Apr 2021 13:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233065AbhDONFm (ORCPT ); Thu, 15 Apr 2021 09:05:42 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:46132 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233018AbhDONFk (ORCPT ); Thu, 15 Apr 2021 09:05:40 -0400 Received: from deskari.lan (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0B0BE89A; Thu, 15 Apr 2021 15:05:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1618491915; bh=dXk1SKU4jVk5zQlDs9r9noTJzxIqLwoqsHa1lF6XP7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KXrgrkaFJxcR8AQySFjwmIpsQU7wsNJGowctIT98cv4AfjfScoL0ZLA8m+mtiIaW9 6Kxir2K/wfu6WGobSkGJfn0LIbX8dnmmkbOeuSiFtm3tWUSJBW4ACX4cZ4FOO1gxHS 5+fN6GDFV3EeFWGYeXCvoOmicf6RsTfN9wRsQ6PU= 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 , Michal Simek Subject: [PATCH v5 08/24] media: entity: Add has_route entity operation Date: Thu, 15 Apr 2021 16:04:34 +0300 Message-Id: <20210415130450.421168-9-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210415130450.421168-1-tomi.valkeinen@ideasonboard.com> References: <20210415130450.421168-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 --- 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 d60ff8bf3f9e..466e4357a082 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); }; /**