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="dH5F+2tR" Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16C42AC; Wed, 13 Dec 2023 02:14:49 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DF19FC000A; Wed, 13 Dec 2023 10:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702462488; 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=MLFvzHrlurDDiJ9fwrCennWA8j0DQ+B1g0medVOvn24=; b=dH5F+2tRMK76OGGohcrS/NXdCDmBhV4EcdF0FjTlYeE+OPGDutcYd2hZ0U/vEAPL94Zfs1 ERc34e9cqi5gFzja5y8RmIBHI+GLT9lJZTNSFGbiXiv2mfnH8HEE3G37dWMeXqppewq61h 1nCEC1LjB25k+YGNr3OEK5Elp+d/e0B+soZ0XaVb0VkXbfDO+6twicSZgf4YWmMrnfoUw5 y9uidhUdgU4vHoPyBnWWoGYtz8X4TuWNGsUlSlOBvQFvDCjWW2OL+miYI1RwhGskjaIaAq zcSWRtLiYa1SLt9+GW+qBWt4WZCR7MaElSg1CSDiHcpYpNQXRYqbKWNwMwcaYw== Date: Wed, 13 Dec 2023 11:14:44 +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 3/8] media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval Message-ID: <20231213111444.34145eab@booty> In-Reply-To: <20231208181648.13568-3-laurent.pinchart@ideasonboard.com> References: <20231208181442.13356-1-laurent.pinchart@ideasonboard.com> <20231208181648.13568-3-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:43 +0200 Laurent Pinchart wrote: > Due to a historical mishap, the v4l2_subdev_frame_interval structure > is the only part of the V4L2 subdev userspace API that doesn't contain a > 'which' field. This prevents trying frame intervals using the subdev > 'TRY' state mechanism. > > Adding a 'which' field is simple as the structure has 8 reserved fields. > This would however break userspace as the field is currently set to 0, > corresponding to V4L2_SUBDEV_FORMAT_TRY, while the corresponding ioctls > currently operate on the 'ACTIVE' state. We thus need to add a new > subdev client cap, V4L2_SUBDEV_CLIENT_CAP_WHICH_INTERVAL, to indicate > that userspace is aware of this new field. > > All drivers that implement the subdev .get_frame_interval() and > .set_frame_interval() operations are updated to return -EINVAL when > operating on the TRY state, preserving the current behaviour. > > While at it, fix a bad copy&paste in the documentation of the struct > v4l2_subdev_frame_interval_enum 'which' field. > > Signed-off-by: Laurent Pinchart > Reviewed-by: Philipp Zabel # for imx-media > Reviewed-by: Hans Verkuil ... > drivers/staging/media/tegra-video/csi.c | 3 +++ For tegra-video: Reviewed-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com