Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2291161rwi; Fri, 28 Oct 2022 05:29:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7WCDBQk3ywuYzj2dpFf7dvANHBj0X6tiZbe3QBRrUbkYPE36Wt+9aUi55aM8j8UF4U31iH X-Received: by 2002:a17:906:4fc3:b0:72e:eab4:d9d7 with SMTP id i3-20020a1709064fc300b0072eeab4d9d7mr46525157ejw.599.1666960190585; Fri, 28 Oct 2022 05:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666960190; cv=none; d=google.com; s=arc-20160816; b=UT9VVtAl6YjHl7sz0sHKkSGpEV6exZAIF6gY21/i7zOQLuNpZIq2zAeUBemYnxWCHA uD+8w8aIxy3J+j9R+SAxUs4V+f3PLVMj87wMMRVoMbCdXmrIgF0jRJfkDb5ihrOSj0+r w0o58hdkms5UsOWgIs3cGWJXOOMwasWiTPy0g+gxiv6GvRvWKeLPC4S87gfeiyTTq2oV sw5xDaGbESV5UlD5G98eOlponp1HEHvkS0afXIoJjO/JZQyzu2djTMdfSjObyfIUeaIw 96eBGu4rZhGY9670dnZx99Op2o5pEe7qR0d8Mbpb48t0uqQeRBLTyjodpbFcqVuwB+QY R18Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S5vxyANAHxmFybqrJKZuEduVl4CFiZBBMmZVpaculrA=; b=UFfjQrszj8HtBv03n891vHF6MtdlM3i3lGLztqblKsswAmftECNcrymfKK5AsUwNUj 0I+ByETv2ZfaSq//Nguu+iRa5q91hEtuBKXuVuQjVtqcf1oYd1mPMNsBmkoIr9NTURKq D5M7CRgt6utLXAx9aiU1SaPsUli1mCj1iHPir4dGvOuXVixdM+XAE2YlWviavatMuCKI Dbvz2+SdcithnEnzwxZXy1JTthIcGV2VFkqrr1SoB7N5mo7xlQz8u5E+k8d/BKAgMCaA wguxV8yR5aSA/BaXzf03p8Nvgw5CfO0Jg4RH2pZqANx4FHxRe+2A9LX9/2Opm2vFJIpe bm0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JhA32RIA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr18-20020a170906d55200b0078e0324ee54si3757802ejc.490.2022.10.28.05.29.24; Fri, 28 Oct 2022 05:29:50 -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 header.i=@intel.com header.s=Intel header.b=JhA32RIA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbiJ1MWQ (ORCPT + 99 others); Fri, 28 Oct 2022 08:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbiJ1MWN (ORCPT ); Fri, 28 Oct 2022 08:22:13 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9E8F42AD7; Fri, 28 Oct 2022 05:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666959730; x=1698495730; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jyi2YPooioLK0F2LEjhYuRsxAS5UfvB2qcGTTVQ+86k=; b=JhA32RIAAlQp0udyLlAYMh2ufytPoUhISB0CIDVzrbeUBKVzQfJDqTvN VPif8ILODITkXMKTS644vKPcrlS0Nw/O4Y1d1r9KokNThFGMXDOWt9aGK f2B9mYNCzqeO6SRiLFGGl0ViXSXH0Tc7jxhu6KrTwtulraePyvwJA+c/7 mZ7wWz5coCakG4SBvmicXXwNQA1C9//aImaF7Pf3H7m7i+VKa4mdqVxh3 ki0lCPsVUNFH4PxADCscq/sjSlFxiUJz5lIszuZnP5dnwx4w7KuLx6kuf sHoHaWk9mv43STFjLN32tBQMh+ztwVi/dWwS/OMGig2jdk8Ssr4bkdkwW w==; X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="335119535" X-IronPort-AV: E=Sophos;i="5.95,221,1661842800"; d="scan'208";a="335119535" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 05:22:10 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10513"; a="758064551" X-IronPort-AV: E=Sophos;i="5.95,221,1661842800"; d="scan'208";a="758064551" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2022 05:22:06 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 0F1C020399; Fri, 28 Oct 2022 15:22:04 +0300 (EEST) Date: Fri, 28 Oct 2022 12:22:04 +0000 From: Sakari Ailus To: "Lad, Prabhakar" Cc: Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Philipp Zabel , Jacopo Mondi , Niklas =?iso-8859-1?Q?S=F6derlund?= , Hans Verkuil , Geert Uytterhoeven , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Lad Prabhakar Subject: Re: [PATCH v4 4/4] media: platform: Add Renesas RZ/G2L CRU driver Message-ID: References: <20221027103104.74576-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221027103104.74576-5-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Hi Prabhakar, On Thu, Oct 27, 2022 at 08:04:40PM +0100, Lad, Prabhakar wrote: ... > > > +static int rzg2l_cru_ip_s_stream(struct v4l2_subdev *sd, int enable) > > > +{ > > > + struct rzg2l_cru_dev *cru; > > > + int ret; > > > + > > > + cru = v4l2_get_subdevdata(sd); > > > + > > > + if (!cru->is_csi) > > > + return -EINVAL; > > > + > > > + ret = v4l2_subdev_call(cru->ip.remote, video, s_stream, enable); > > > > It's up to the driver how call pre_streamon() and post_streamoff(), as long > > as it takes place on both sides of s_stream(). > > > > In other words, as it seems your device doesn't need anything special, you > > could waive implemeting the callbacks yourself and call pre_streamon() and > > post_streamoff() here. > > > Here the cru->ip.remote = CSI, in the rzg2l_cru_set_stream(1) where we > are calling pre_streamon()/post_streamoff() callbacks the subdev is > CRU-IP. So the calls from rzg2l_cru_set_stream() land into > rzg2l_cru_ip_pre_streamon() and rzg2l_cru_ip_post_streamoff() which > are calling pre_streamon/post_streamoff for the CSI subdev. Again, you should call the source sub-device's pre_streamon and post_streamoff from the s_stream handler (not from rzg2l_cru_ip_pre_streamon or rzg2l_cru_ip_post_streamoff). Starting streaming takes place link by link. This allows a driver to omit implementing pre_streamon and post_streamon callbacks if it doesn't need them. -- Kind regards, Sakari Ailus