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 1CA83C3DA6F for ; Thu, 24 Aug 2023 16:06:19 +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=ZRleIsJshrKdTDr8dxWhhF9bYTNfPPvCM2el449k3Ow=; b=iDvDU+wU8vvm3l 6lP2HTSB4F7MX/XxG9XmZKgsznVt11dWozLqUOYG9OnQw8ig58V3Vuc7/UfVQMhD0QS6bvHQENbMC AsXuZyoLHwoiFEse51pPewoJhmNert/nGCaam5ZlBznyglX5DlcBgEZ9Ysov9y8AZeZpQH+KjT41K 7iZP9B3ZSvMqpLcuao2LwWNQ7snueZNkG6d+FZOSPEObyg/1kttw5dIfs9nhBvTXMigG3OQhTNiQW R1UBx0ayXXsnMqe/PIvZFawyE2/9z4BGlR/H28godP8Eenccw7T77/AHtg4UesZ6NhPq/1wNpPed1 8ia0RB5eVmUtVK1TgRaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZCq3-003QI4-2r; Thu, 24 Aug 2023 16:05:39 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZCq0-003QHN-1r for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 16:05:38 +0000 Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 37O9XXte014368; Thu, 24 Aug 2023 18:05:15 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=selector1; bh=eLiR4Yrg36nAV4ckmGB/w PqPu3zC6LLXLH1wrY+CNaU=; b=h2xwuEgTlLpBZLHDUaSTHwZaDlK7vH1OD82I4 JyjnAbVQWc/q2mIgUNm7PT6BUemn7EbWduZ0f+Yg98mtuA/NzvID3P/2gB0M9vAb LBJ1e49L6XMVvzAJM2jiE4B74Yxyq0roj+uv3vKr77KneJf+Xl3AiXDJSzH2Kpeg Aqj14FSIlp6cZq8wwk8gXchg7HSAcL2y6wB1Z8tNr44Ezx+svkYg8yk+LpeWvhkd Pp6NHAQJRZpS265j1t6LSlbMGZzbuqdgZqyhZh3v5Ji5ba8Enyu0p8l+dbPdb2m1 Pl4dU6wgXIiujhQmE7b8WCxFhdF7KuvTUjdI5ixvgi16TS7kg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3sn1y5rhjf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Aug 2023 18:05:15 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DBBAE100059; Thu, 24 Aug 2023 18:05:13 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CA001252239; Thu, 24 Aug 2023 18:05:13 +0200 (CEST) Received: from gnbcxd0016.gnb.st.com (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 24 Aug 2023 18:05:13 +0200 Date: Thu, 24 Aug 2023 18:05:06 +0200 From: Alain Volmat To: Laurent Pinchart CC: Sakari Ailus , , Hugues Fruchet , , Hans Verkuil , Rob Herring , Dan Scally , Mauro Carvalho Chehab , , , Subject: Re: [Linux-stm32] [PATCH v1 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver Message-ID: <20230824160506.GA21560@gnbcxd0016.gnb.st.com> Mail-Followup-To: Laurent Pinchart , Sakari Ailus , devicetree@vger.kernel.org, Hugues Fruchet , linux-kernel@vger.kernel.org, Hans Verkuil , Rob Herring , Dan Scally , Mauro Carvalho Chehab , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org References: <20220910144010.34272-1-hugues.fruchet@foss.st.com> <20220910144010.34272-4-hugues.fruchet@foss.st.com> <20230824110934.GA18226@gnbcxd0016.gnb.st.com> <20230824130432.GB27092@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230824130432.GB27092@pendragon.ideasonboard.com> X-Disclaimer: ce message est personnel / this message is private X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-24_12,2023-08-24_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_090536_930079_D974C256 X-CRM114-Status: GOOD ( 39.33 ) 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 Hi Laurent, On Thu, Aug 24, 2023 at 04:04:32PM +0300, Laurent Pinchart wrote: > 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 ? This is basically to allow reducing the framerate of the captured stream when this is not possible at the producer (sensor) level and we need to lower down the stress on elements down the pipeline. Regards, Alain > > -- > Regards, > > Laurent Pinchart > _______________________________________________ > Linux-stm32 mailing list > Linux-stm32@st-md-mailman.stormreply.com > https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel