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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B21DDC18E5A for ; Wed, 11 Mar 2020 01:11:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 793A421D56 for ; Wed, 11 Mar 2020 01:11:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="oY6dAoI/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbgCKBL3 (ORCPT ); Tue, 10 Mar 2020 21:11:29 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:58888 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbgCKBL3 (ORCPT ); Tue, 10 Mar 2020 21:11:29 -0400 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4CC445F; Wed, 11 Mar 2020 02:11:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583889088; bh=zOxb/XPWIzzpfBdh3AVmyz5kHdMYkbB+MYcAU7NV3F8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oY6dAoI/KHDOOmzCs7tXXFr5HM2l6c6wen2k7tdsf2+fxEFfSkoYAHkQnCcOjZwVk 0q5N70sR0R5JQ7RZRYHYp0rEz4LGbrCNTj4ch+GNme5uisfB4eYvulLRFe702BczgM nhbW5Y8h1K0EfKp9v431XEFYJ+GIHTPUDwXSfOGk= Date: Wed, 11 Mar 2020 03:11:24 +0200 From: Laurent Pinchart To: Niklas =?utf-8?Q?S=C3=B6derlund?= Cc: Helen Koike , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Niklas =?utf-8?Q?S=C3=B6derlund?= Subject: Re: [PATCH v4 2/3] rcar-vin: Make use of V4L2_CAP_IO_MC Message-ID: <20200311011124.GD4871@pendragon.ideasonboard.com> References: <20200306163935.805333-1-niklas.soderlund@ragnatech.se> <20200306163935.805333-3-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200306163935.805333-3-niklas.soderlund@ragnatech.se> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Niklas, Thank you for the patch. On Fri, Mar 06, 2020 at 05:39:34PM +0100, Niklas Söderlund wrote: > From: Niklas Söderlund > > Set the V4L2_CAP_IO_MC capability flag and remove the driver specific > vidioc_enum_input, vidioc_g_input and vidioc_s_input callbacks for the > media controller enabled part of the driver. > > Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart > --- > drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +---------------- > 1 file changed, 1 insertion(+), 16 deletions(-) > > diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c > index 5151a3cd8a6e6754..96ddd36619167fd5 100644 > --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c > +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c > @@ -767,18 +767,6 @@ static int rvin_mc_s_fmt_vid_cap(struct file *file, void *priv, > return 0; > } > > -static int rvin_mc_enum_input(struct file *file, void *priv, > - struct v4l2_input *i) > -{ > - if (i->index != 0) > - return -EINVAL; > - > - i->type = V4L2_INPUT_TYPE_CAMERA; > - strscpy(i->name, "Camera", sizeof(i->name)); > - > - return 0; > -} > - > static const struct v4l2_ioctl_ops rvin_mc_ioctl_ops = { > .vidioc_querycap = rvin_querycap, > .vidioc_try_fmt_vid_cap = rvin_mc_try_fmt_vid_cap, > @@ -786,10 +774,6 @@ static const struct v4l2_ioctl_ops rvin_mc_ioctl_ops = { > .vidioc_s_fmt_vid_cap = rvin_mc_s_fmt_vid_cap, > .vidioc_enum_fmt_vid_cap = rvin_enum_fmt_vid_cap, > > - .vidioc_enum_input = rvin_mc_enum_input, > - .vidioc_g_input = rvin_g_input, > - .vidioc_s_input = rvin_s_input, > - > .vidioc_reqbufs = vb2_ioctl_reqbufs, > .vidioc_create_bufs = vb2_ioctl_create_bufs, > .vidioc_querybuf = vb2_ioctl_querybuf, > @@ -961,6 +945,7 @@ int rvin_v4l2_register(struct rvin_dev *vin) > vin->format.colorspace = RVIN_DEFAULT_COLORSPACE; > > if (vin->info->use_mc) { > + vdev->device_caps |= V4L2_CAP_IO_MC; > vdev->ioctl_ops = &rvin_mc_ioctl_ops; > } else { > vdev->ioctl_ops = &rvin_ioctl_ops; -- Regards, Laurent Pinchart