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 3DBE4C27C40 for ; Thu, 24 Aug 2023 12:37:03 +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:To:From:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V1DgJeIF9fOs86OAOoUYB6VD8pl/BtX9CZUFPjeRAf4=; b=x2BFtDz5tW0kwK VBHrxdAP8TS0x77T9ma/IsNz6zAWcX/Ex8DKpKcQrBTLih8ASjv4TTRzFLKE9cQTdZSR6SXyZgo+E oMh6waA8ZsRtk8MPgLCCGHOfTClT6gtB8NjEFWAxFAlqrTEiYEG9+niV8LEHssRiY5B9rR5EkAYBQ O44e/x0UJs/JmYoUOseZuCKd09QW+FC671/efgi9Hhm0L3Kp5El7drYajz0FlnvNHAHH4zEKkyYj5 kkwsuXQczzA+aFtauAh6JO+43qPuF0jh98EKHlKV55M7D4dabcbK1EAEPwCok7bynKo3o7XlYrJB3 Bfxu16UB4+4ITbgiZpCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZ9Ze-0034TB-16; Thu, 24 Aug 2023 12:36:30 +0000 Received: from mgamail.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZ9Za-0034Qv-0a for linux-arm-kernel@lists.infradead.org; Thu, 24 Aug 2023 12:36:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1692880586; x=1724416586; h=date:from:to:subject:message-id:references:mime-version: in-reply-to; bh=h2/3qkQJA1p3QI2y816NduJfSiyRPzj4RaZqFsPLusM=; b=Tz6r4s+v+WXz7ODBeiks9cHFxxj6cATSpH1VTi7QAWxWyn7JE0S97BeJ 216woReCTp0R7PeYx8kxuafEPOSoR9hyV9y/g1629zZQ7j3YOwsJxRCOZ hhyV+Hr8JfM48l3FHg+eRyIOzbBnBGuIPxM1NtLembH3Q87Ly+6rSoxcF 5QNlRGqbuY1fE1VUOxXCe1lmPh4SF+nClSNv7PhonYewKZA7Z0tOTMhPb 1M5Vi5X1GGEaJlixb6Jp5nE1FwPyNeElnJEVkh4sH1c/SzzpgexDBhOAb FcDqlzf2J7+KNOG6Nfc74Fc7+4OPOiX9O+U9mCuQHV6UH6tb0R8aJ6SA5 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10811"; a="378181001" X-IronPort-AV: E=Sophos;i="6.02,195,1688454000"; d="scan'208";a="378181001" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 05:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="880788602" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2023 05:36:24 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 2AA1011FAB1; Thu, 24 Aug 2023 15:26:42 +0300 (EEST) Date: Thu, 24 Aug 2023 12:26:42 +0000 From: Sakari Ailus To: 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 , laurent.pinchart@ideasonboard.com Subject: Re: [PATCH v1 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver Message-ID: 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: <20230824110934.GA18226@gnbcxd0016.gnb.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230824_053626_300775_87101E58 X-CRM114-Status: GOOD ( 31.03 ) 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 Alanin, 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. -- Regards, Sakari Ailus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel