From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="FeuddR8g" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5D1EA4; Wed, 13 Dec 2023 02:02:00 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 27B4160003; Wed, 13 Dec 2023 10:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702461719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nzq47vFlv97cazTquttyDrHhz//pHKUF4LDlvhQgbK8=; b=FeuddR8grSkUeA+v5ZTM+a/fzRBdjj6sOJAYGGxdsWfw+lQ1/aY+jL0UALte6wGRqEUd1t 1HFRLyh/Io9ijAL9ZDbryHUYHOXdJOmdvfrBQcGCAP6Mr1GsCR2N/lfRRsnvptIIcytA16 KKJdUr5uHCVftzX2qfJa9jav20TraCwvyXvvhNNKdC4bMxmwLdKVrw3TpFJ9aALmtTFKW3 pTM9MaUqOqsk7ViGBVjyRSgZK1cWBD+yYPf2W1u0YG/iJwceIs9jvIkaCEEgYikgYJFm37 ruoF4C8h3+Fk4eqlLM1yyK3p5/VyOhV6dRNVPsVEXEDOy9d2KpBYyhu3ohaw4A== Date: Wed, 13 Dec 2023 11:01:54 +0100 From: Luca Ceresoli To: Laurent Pinchart Cc: linux-media@vger.kernel.org, Akinobu Mita , Andrzej Hajda , Daniel Scally , Hans Verkuil , Hans de Goede , Jacopo Mondi , Jonathan Hunter , Kieran Bingham , Lars-Peter Clausen , Leon Luo , Mauro Carvalho Chehab , Niklas =?UTF-8?Q?S=C3=B6derlund?= , Paul Elder , Pavel Machek , Philipp Zabel , Ricardo Ribalda , Rui Miguel Silva , Sakari Ailus , Sowjanya Komatineni , Steve Longerbeam , Sylwester Nawrocki , Thierry Reding , Tomi Valkeinen , linux-tegra@vger.kernel.org Subject: Re: [PATCH v4 2/8] media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations Message-ID: <20231213110154.21024f41@booty> In-Reply-To: <20231208181648.13568-2-laurent.pinchart@ideasonboard.com> References: <20231208181442.13356-1-laurent.pinchart@ideasonboard.com> <20231208181648.13568-2-laurent.pinchart@ideasonboard.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: luca.ceresoli@bootlin.com Hi Laurent, On Fri, 8 Dec 2023 20:16:42 +0200 Laurent Pinchart wrote: > The subdev .[gs]_frame_interval are video operations, but they operate > on pads (and even on streams). Not only is this confusing, it causes > practical issues for drivers as the operations don't receive a subdev > state pointer, requiring manual state handling. > > To improve the situation, turn the operations into pad operations, and > extend them to receive a state pointer like other pad operations. > > While at it, rename the operations to .[gs]et_frame_interval at the same > time to match the naming scheme of other pad operations. This isn't > strictly necessary, but given that all drivers using those operations > need to be modified, handling the rename separately would generate more > churn for very little gain (if at all). > > Signed-off-by: Laurent Pinchart > Reviewed-by: Hans Verkuil > Reviewed-by: Philipp Zabel # for imx-media ... > drivers/media/v4l2-core/v4l2-common.c | 8 +-- > drivers/media/v4l2-core/v4l2-subdev.c | 63 +++++++++++-------- ... > drivers/staging/media/tegra-video/csi.c | 9 +-- > include/media/v4l2-common.h | 4 +- > include/media/v4l2-subdev.h | 22 ++++--- For tegra-video: Reviewed-by: Luca Ceresoli I'm afraid I cannot test it as the tegra-video hardware I have has a parallel camera only, no CSI. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com