Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2769640pxb; Fri, 5 Nov 2021 04:31:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcvIra7cuxVc8GzZ24RRC8YQrARwL9oNmTvgU8T0QqE+d13EiGKpjrvhCCw9TB31/agrkZ X-Received: by 2002:a05:6602:2599:: with SMTP id p25mr41813303ioo.90.1636111880721; Fri, 05 Nov 2021 04:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636111880; cv=none; d=google.com; s=arc-20160816; b=neGLh8VuXQLLD7MOEeuIaVL5KCpAbwi0AmyOC8ivKp1xm1ofE45F4G4cUoQik1xrCf uEHex3VEQtExFWZPk2iWsYK0HnlIo0sfB8iv3f9/0D44dqYuOlYRQm0vWdncsWzZbh0l ZC3mVD0hXs91XRQmnf5PNqyCPjBZBa8pOolJHKSw0I9sw/7S0qYhxXgAl8/euE46A7OL p+lGRwzvdglIRmCtTOy9StNleVtzpax4ojoH8h2R/5Oi+x2UtwxfOwpbsWHVEzelBqgu FD47mb1MQQXM+MafDfyDnDiEcxt8LDhdl6ihE3x9WaadtbKInePY592ci1w5hXrebTM/ EsOQ== 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=n9P4Mo04U545fDQCUXTKxNlHhUMunRZ8wJI7ASxNxgY=; b=FcAnRNGoLqUVb6vtzfNFat2AhfnFhBxlrjGE2mCGkWioUlhYmThv92KvqxSAUayNRI JeraighUVCUr2Xa1A6PmMgfjp5ACrnm/6RkZfrw0Al3/rZ018Yur7WglluFbWwHYCqgC Eeo99XMz2iRTkMtydoy0pyefXI55QDOCbm4sJQ+ecXqzYxQTG2fo0yNZRJQGO/psGAte enb9DJ4xwpGmPLUuMk+OI8qkIWsKNBiK6Dc2M6JJnrUGf7wMxQS1o9MKslWAXMSR9FTS XPmzlGoyI9Zs8i9+68N0UKcgBC4q+Kza1NH+PfYGMfH5GAMm0sIHQ4k3mIkew6wwvMib AQTw== 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 i12si17429130ilu.147.2021.11.05.04.31.02; Fri, 05 Nov 2021 04:31:20 -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 S232685AbhKEJZw (ORCPT + 99 others); Fri, 5 Nov 2021 05:25:52 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:43947 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232641AbhKEJZu (ORCPT ); Fri, 5 Nov 2021 05:25:50 -0400 Received: (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 735E6200016; Fri, 5 Nov 2021 09:23:07 +0000 (UTC) Date: Fri, 5 Nov 2021 10:23:59 +0100 From: Jacopo Mondi To: Eugen Hristev Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi, robh+dt@kernel.org, nicolas.ferre@microchip.com Subject: Re: [PATCH 09/21] media: atmel: atmel-isc-base: remove frameintervals VIDIOC Message-ID: <20211105092359.qlogekdzzk6nnjs2@uno.localdomain> References: <20211022075247.518880-1-eugen.hristev@microchip.com> <20211022075247.518880-10-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211022075247.518880-10-eugen.hristev@microchip.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eugen On Fri, Oct 22, 2021 at 10:52:35AM +0300, Eugen Hristev wrote: > VIDIOC_ENUM_FRAMEINTERVALS is not recommended for a top video driver. > The frame rate is defined by the sensor subdevice, thus it can be queried > directly by anyone interested in the frame intervals. This change makes sense in the context of moving towards media controller, but I wonder how does this impact existing userspace that relies on this. Anyway Reviewed-by: Jacopo Mondi Thanks j > > Signed-off-by: Eugen Hristev > --- > drivers/media/platform/atmel/atmel-isc-base.c | 37 ------------------- > 1 file changed, 37 deletions(-) > > diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c > index 6f14cc549543..8537ad73d160 100644 > --- a/drivers/media/platform/atmel/atmel-isc-base.c > +++ b/drivers/media/platform/atmel/atmel-isc-base.c > @@ -1108,42 +1108,6 @@ static int isc_enum_framesizes(struct file *file, void *fh, > return 0; > } > > -static int isc_enum_frameintervals(struct file *file, void *fh, > - struct v4l2_frmivalenum *fival) > -{ > - struct isc_device *isc = video_drvdata(file); > - struct v4l2_subdev_frame_interval_enum fie = { > - .code = isc->config.sd_format->mbus_code, > - .index = fival->index, > - .width = fival->width, > - .height = fival->height, > - .which = V4L2_SUBDEV_FORMAT_ACTIVE, > - }; > - int ret = -EINVAL; > - unsigned int i; > - > - for (i = 0; i < isc->num_user_formats; i++) > - if (isc->user_formats[i]->fourcc == fival->pixel_format) > - ret = 0; > - > - for (i = 0; i < isc->controller_formats_size; i++) > - if (isc->controller_formats[i].fourcc == fival->pixel_format) > - ret = 0; > - > - if (ret) > - return ret; > - > - ret = v4l2_subdev_call(isc->current_subdev->sd, pad, > - enum_frame_interval, NULL, &fie); > - if (ret) > - return ret; > - > - fival->type = V4L2_FRMIVAL_TYPE_DISCRETE; > - fival->discrete = fie.interval; > - > - return 0; > -} > - > static const struct v4l2_ioctl_ops isc_ioctl_ops = { > .vidioc_querycap = isc_querycap, > .vidioc_enum_fmt_vid_cap = isc_enum_fmt_vid_cap, > @@ -1168,7 +1132,6 @@ static const struct v4l2_ioctl_ops isc_ioctl_ops = { > .vidioc_g_parm = isc_g_parm, > .vidioc_s_parm = isc_s_parm, > .vidioc_enum_framesizes = isc_enum_framesizes, > - .vidioc_enum_frameintervals = isc_enum_frameintervals, > > .vidioc_log_status = v4l2_ctrl_log_status, > .vidioc_subscribe_event = v4l2_ctrl_subscribe_event, > -- > 2.25.1 >