Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4693280pxb; Tue, 28 Sep 2021 01:43:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhq56Nnqjo+ifFmfnGBtC6ul/Uqt8Om24iz/A2k7btOfPfE5zHuPiar4Ek3Qo1JAXIeVDp X-Received: by 2002:a63:4c0e:: with SMTP id z14mr3497485pga.427.1632818623646; Tue, 28 Sep 2021 01:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632818623; cv=none; d=google.com; s=arc-20160816; b=dC6LqfiP3gDFhFtwe0Xqm73i183sVNhZ3LXksrp6JI+sE+UY2hZ6zCHIzEM8Kd07gh In5JOghnCQqCwpxsKDZ4kF8M3mKqVZ7VQZNTmB4ELRoY+rBTVwOz+kJBR0xSHLsQVf1v N+oZaTNYmlk4xRaHxA2bkBu9AEKkX+IbVx66WUNfWC76AWjrhuGOW1509fcdHHDymUfY BHXcoZw+OemAV88BUI7zjSxv6qVMJoCu2vqclecPemPBpYtQhe/lEqO4JesFp9TI+q7K 3Ij1kMp4RT8x8b/qSSG/IKo/G7S6aSK9vShjEAxyU3cOaCvf5natr6kdxoSJXJ9NQvXI 10oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tN+GetmdoHfw3FRgiOATGqOgXOyyBFMpA+mmoWgGw8w=; b=YBkCgOx2j3FgluYbulzjG3uot7wWZScM1hRkLl4HZgq9xV/4QZQ0by5rLYuf8FhfK6 IAYbPRlZ6BHt1D7kmNweu4qXr1I0TPLxk3aGSIdRk3H3bGmtyQRioCJfrbwZfMExXzYi CZEOsZ/fsi5mkWWvm4/mQicCSWZFhoTO7jbUazn3jejCEPiis7JgqjeJGKltI8Hhwox5 KQrMQYxpUJKNXDPaoheZ79PGRlEfH5FbrBT+tPjgZJ8N6e1/y9WfsUn64all+K4+JXNY d3DMNQQfqrqg7lK2qcpAgY3DKuh6SQOhwijKI+oZMsLraDyGLFi/MieowdpmwKuFSSJU oNMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si2367392pjm.149.2021.09.28.01.43.30; Tue, 28 Sep 2021 01:43:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239583AbhI1IoY (ORCPT + 99 others); Tue, 28 Sep 2021 04:44:24 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:47889 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235918AbhI1IoX (ORCPT ); Tue, 28 Sep 2021 04:44:23 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 218FC6000A; Tue, 28 Sep 2021 08:42:40 +0000 (UTC) Date: Tue, 28 Sep 2021 10:43:23 +0200 From: Jacopo Mondi To: Nikita Yushchenko , Hans Verkuil Cc: Niklas =?utf-8?Q?S=C3=B6derlund?= , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Barinov Subject: Re: [PATCH v2] media: rcar-vin: add G/S_PARM ioctls Message-ID: <20210928084323.5vuhvkp6ev2emv2z@uno.localdomain> References: <20210924135138.29950-1-nikita.yoush@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210924135138.29950-1-nikita.yoush@cogentembedded.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello explicit Cc Hans, as I recall the usage of s/g_parm was deprecated and discouraged in mainline. Hans: Support for g/s_param is required by Nikita to maintain compatibility with (out of tree?) subdevice drivers. Should we add it to the mainline receiver driver ? What other API should be used to control the subdevice framerate ? Should it go through VIDIOC_SUBDEV_S_FRAME_INTERVAL instead ? Thanks j On Fri, Sep 24, 2021 at 04:51:38PM +0300, Nikita Yushchenko wrote: > From: Vladimir Barinov > > This adds g/s_parm ioctls for parallel interface. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Nikita Yushchenko > --- > Changes from v1: > - use &vin->vdev to access vin's struct video_device > > drivers/media/platform/rcar-vin/rcar-v4l2.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c > index bdeff51bf768..a5bfa76fdac6 100644 > --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c > +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c > @@ -527,6 +527,24 @@ static int rvin_s_selection(struct file *file, void *fh, > return 0; > } > > +static int rvin_g_parm(struct file *file, void *priv, > + struct v4l2_streamparm *parm) > +{ > + struct rvin_dev *vin = video_drvdata(file); > + struct v4l2_subdev *sd = vin_to_source(vin); > + > + return v4l2_g_parm_cap(&vin->vdev, sd, parm); > +} > + > +static int rvin_s_parm(struct file *file, void *priv, > + struct v4l2_streamparm *parm) > +{ > + struct rvin_dev *vin = video_drvdata(file); > + struct v4l2_subdev *sd = vin_to_source(vin); > + > + return v4l2_s_parm_cap(&vin->vdev, sd, parm); > +} > + > static int rvin_g_pixelaspect(struct file *file, void *priv, > int type, struct v4l2_fract *f) > { > @@ -743,6 +761,9 @@ static const struct v4l2_ioctl_ops rvin_ioctl_ops = { > .vidioc_g_selection = rvin_g_selection, > .vidioc_s_selection = rvin_s_selection, > > + .vidioc_g_parm = rvin_g_parm, > + .vidioc_s_parm = rvin_s_parm, > + > .vidioc_g_pixelaspect = rvin_g_pixelaspect, > > .vidioc_enum_input = rvin_enum_input, > -- > 2.30.2 >