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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62A56C7EE43 for ; Thu, 24 Aug 2023 13:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TR4Owf4aEVk6uDswz9TMQUpbIZe4V+v28dqSqT4+pls=; b=DCutmS0bOUWfQv eWi1Ox8Q4UxMcUVwfPsp7A5830DDC0hgFzhrxA+LFdyW27ExPROQMD4KCDFGi3EjR+KP16RsZtHeP hm8RTSRI9iiGvB805t30iXs87GV9aiuVL41y88O28ROdd9Lb4Zw/EKGs0Dp3E/fveFiHIVxX5Udo2 3gz/2SoYbIMIkOenwo+9rla5zmNQyCpxi3mg7j9pWWZTepH1sWx7JVy4p1fR6fLbhVz7KKPiCPS6P pwMcMSQpNZdGaljgA9OGAK3l1Hi2qFgbsg4PuBlKXfQfFYABZtNfCpWuVhqxupOMIcZik8Sq0NAJo lefZPnT8j/KW6Pv6iXtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZA0q-0036tv-1S; Thu, 24 Aug 2023 13:04:36 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZA0n-0036sT-0g for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 13:04:34 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C4E7B87F3; Thu, 24 Aug 2023 15:03:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1692882188; bh=lmURSCwOgg+aQoQ721pMBdHJuBeAn08oT40y6zo6TFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nhLxMlpiJQnligF7VzMZbyIZ479Gf5a9oQPN1MQ1JhV7umyyImZPnqz2phU5NPO6R zPFdbE6PSH0i6vBC1G24MqZa+ymQNZMdAMc/IXS6mHXp8w7TpO0SQ962ReglrRTc5n xRQ3eqs5mNSqKwlsunRR8VMGN+Nt67RSOXOW6ML4= Date: Thu, 24 Aug 2023 16:04:32 +0300 From: Laurent Pinchart To: Sakari Ailus Cc: Hugues Fruchet , Alexandre Torgue , Mauro Carvalho Chehab , Hans Verkuil , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Philippe CORNU , Dan Scally Subject: Re: [PATCH v1 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver Message-ID: <20230824130432.GB27092@pendragon.ideasonboard.com> References: <20220910144010.34272-1-hugues.fruchet@foss.st.com> <20220910144010.34272-4-hugues.fruchet@foss.st.com> <20230824110934.GA18226@gnbcxd0016.gnb.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_060433_428511_365DA571 X-CRM114-Status: GOOD ( 31.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 24, 2023 at 12:26:42PM +0000, Sakari Ailus wrote: > On Thu, Aug 24, 2023 at 01:09:34PM +0200, Alain Volmat wrote: > > Hi Sakari, > > > > thanks a lot for the review. I've already taken care of the comments I got > > from Dan and will also add fixes for your comments as well before > > pushing the v2. Before going into that I thought I'd better clarify the > > framerate part which seems the most tricky part. > > > > On Mon, Aug 07, 2023 at 09:29:55AM +0000, Sakari Ailus wrote: > > ... > > > > > +static int dcmipp_byteproc_g_frame_interval(struct v4l2_subdev *sd, > > > > + struct v4l2_subdev_frame_interval *fi) > > > > +{ > > > > + struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd); > > > > + > > > > + if (IS_SINK(fi->pad)) > > > > + fi->interval = byteproc->sink_interval; > > > > + else > > > > + fi->interval = byteproc->src_interval; > > > > + > > > > + return 0; > > > > +} > > > > + > > > > +static int dcmipp_byteproc_s_frame_interval(struct v4l2_subdev *sd, > > > > + struct v4l2_subdev_frame_interval *fi) > > > > +{ > > > > + struct dcmipp_byteproc_device *byteproc = v4l2_get_subdevdata(sd); > > > > + > > > > + mutex_lock(&byteproc->lock); > > > > + > > > > + if (byteproc->streaming) { > > > > + mutex_unlock(&byteproc->lock); > > > > + return -EBUSY; > > > > + } > > > > + > > > > + if (fi->interval.numerator == 0 || fi->interval.denominator == 0) > > > > + fi->interval = byteproc->sink_interval; > > > > + > > > > + if (IS_SINK(fi->pad)) { > > > > + /* > > > > + * Setting sink frame interval resets frame skipping. > > > > + * Sink frame interval is propagated to src. > > > > + */ > > > > + byteproc->frate = 0; > > > > + byteproc->sink_interval = fi->interval; > > > > + byteproc->src_interval = byteproc->sink_interval; > > > > > > Is this used for anything else than configure skipping? > > > > > > I think I'd just have a control for it in that case. > > > > > > I don't think exposing frame interval configuration is necessarily even > > > meaningful for a device that just processes data but does not produce it. > > > > The DCMIPP is able to perform frame drop, 1/2, 1/4, 1/8 basically. > > As Dan pointed me out, indeed setting frame interval as we did on both > > sink and source pad isn't a defined behavior. I first thought that > > using the frame interval was the proper way to do that but that is > > indeed only used on producers such as sensors .... > > Which ctrl would you propose in such case ? > > We don't have one, AFAIK, and I think it may be unlikely this will be > needed elsewhere. So I'd use a private control. > > I wonder what others think. Cc Laurent as well. What are the use cases for this feature ? -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel