Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5787603rwb; Tue, 1 Aug 2023 07:59:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlHXJOhfTMmfeMTPXG3mOSmRnYFjfSQby6e5ZNg8400+Pc6JecCWFeF2wXGMW0xGjm/y7Fsl X-Received: by 2002:a05:6808:d46:b0:3a3:7aa2:bf0d with SMTP id w6-20020a0568080d4600b003a37aa2bf0dmr15858743oik.38.1690901946444; Tue, 01 Aug 2023 07:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690901946; cv=none; d=google.com; s=arc-20160816; b=i9LnldNqTRn6jObdkQ5kHZZnebaOinJUe03k9D8cIHrflL2KHW+VO5x+JEAn+v5YaT lkVAcNo80STzdVY9DKaY3bkN0KkSSZwN0m8yJjKUMXUNzwvhGafC9m5i0T2jwTOAoMWV 6rPT/5Po1dEO5uIfyMxT2EoCUCpzgAGom5bm2hOdJpZ26KAgpsndHOhbo30r1TBnWyCe VheAniUH4oPjqLOFOevDscoHVb7eGHeqoB/9a39x3P7SRaEPYDZ3SuHSRHsd3hIlITvO WxYy6JGq3QWKMBzm81614/0f1G7l58m5f/TCO68y6NUEqB6BqH9V/Nv09XtGLScaPOwu tvKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=KVFe6t3FKbfVvvVvzU0N4y40iH4HPtoS4cmqWpW6KFk=; fh=LroA/i1EM0DOjWSTFbQc0E4XLyK+5NHY20upRsJ5XaQ=; b=SPkxb+cwzHZaiNRwDDGL4TQFDUlbZbwUkcsGm2MLQtHSAjNff7Fe7htDWstCGWQw7d 5J9uofwkH56uh9uMtc3OnHY2Bm3Gdk3/GWUddBBQesFUxk5HVJfdqwqjyi7nPSelPhoL jXSwixbK0fhX8kD+NlaTls2UK+OIA7XvEq9TOu5z93xXE1iVxP3415MYmwHAJcgnb4+Z k5dnIuyy3SrCXlLRBzzL0+XHkkueRT3MRnlLcFO/E8bt0Jd3cBY5EwiCfAwSBoI29Azn L4sYc4llmrMBP25I8RhypWRHzp5H5J5g835FUaSsM1OTl4JcJtqV12UL6JVWnjsovinF k/5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nFLbk5tU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n127-20020a632785000000b0055e607f1e99si9073724pgn.882.2023.08.01.07.58.27; Tue, 01 Aug 2023 07:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nFLbk5tU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234588AbjHAOTr (ORCPT + 99 others); Tue, 1 Aug 2023 10:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234571AbjHAOTn (ORCPT ); Tue, 1 Aug 2023 10:19:43 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48718BF; Tue, 1 Aug 2023 07:19:42 -0700 (PDT) Received: from [192.168.88.20] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F26E23D4; Tue, 1 Aug 2023 16:18:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1690899518; bh=yYCzuAsWFgam1CbLcV7JEpnOccTdDChFY+iYxr59JXg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nFLbk5tUzdLTp7ATmScpwTyXnsMEHngKzELiC/B9BCVzHd3tuMLsiZcs+gCaDFe0h YdC0h4uwUczXXq1Qk+Fcib1+MX1idKdLlbFREuhxApiZkbsaONjcJ3dcG/JiKNOen7 N0nAUPTHPvkEYDb0V1K88US2f/QLhFD9g+y0KXIs= Message-ID: <66bb2250-4834-13e8-30cf-7ca651799b43@ideasonboard.com> Date: Tue, 1 Aug 2023 17:19:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v8 13/16] media: cadence: csi2rx: Add link validation Content-Language: en-US To: Jai Luthra , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sakari Ailus , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , Maxime Ripard , niklas.soderlund+renesas@ragnatech.se, Benoit Parrot , Vaishnav Achath , Vignesh Raghavendra , nm@ti.com, devarsht@ti.com References: <20230731-upstream_csi-v8-0-fb7d3661c2c9@ti.com> <20230731-upstream_csi-v8-13-fb7d3661c2c9@ti.com> From: Tomi Valkeinen In-Reply-To: <20230731-upstream_csi-v8-13-fb7d3661c2c9@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/07/2023 11:29, Jai Luthra wrote: > From: Pratyush Yadav > > Add media link validation to make sure incorrectly configured pipelines > are caught. > > Signed-off-by: Pratyush Yadav > Signed-off-by: Jai Luthra > Reviewed-by: Laurent Pinchart > --- > v7->v8: No change > > drivers/media/platform/cadence/cdns-csi2rx.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c > index d82a8938932f..aec33d28a66f 100644 > --- a/drivers/media/platform/cadence/cdns-csi2rx.c > +++ b/drivers/media/platform/cadence/cdns-csi2rx.c > @@ -463,6 +463,10 @@ static const struct v4l2_subdev_ops csi2rx_subdev_ops = { > .pad = &csi2rx_pad_ops, > }; > > +static const struct media_entity_operations csi2rx_media_ops = { > + .link_validate = v4l2_subdev_link_validate, > +}; > + > static int csi2rx_async_bound(struct v4l2_async_notifier *notifier, > struct v4l2_subdev *s_subdev, > struct v4l2_async_connection *asd) > @@ -679,6 +683,7 @@ static int csi2rx_probe(struct platform_device *pdev) > for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++) > csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE; > csi2rx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; > + csi2rx->subdev.entity.ops = &csi2rx_media_ops; > > ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX, > csi2rx->pads); > Reviewed-by: Tomi Valkeinen Tomi