Received: by 10.223.176.46 with SMTP id f43csp1689728wra; Sun, 21 Jan 2018 02:19:30 -0800 (PST) X-Google-Smtp-Source: AH8x225RdHob1UROtUkITFq8ZrvkHOLSO6wICJOyxIX8faS4f55a5m+/VL+unLZQX8d5fmvBlcQW X-Received: by 10.99.124.94 with SMTP id l30mr4161314pgn.108.1516529970163; Sun, 21 Jan 2018 02:19:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516529970; cv=none; d=google.com; s=arc-20160816; b=b8CKlUfUnX2p/edBTHJCOSexR08lEjXxnOYcAi+lccCz99f5PKV5EnbsamOLo6IiJ6 C7bNI3+D3Q6ApsqaN5CRp6FODVU/2kTSYXq0EAtZGiBNMSCGSSzESxiyOTe4s/1oY+CN Jg1L8EH8TM1H4AzEz5OTnvg5iHLacqHUM1TRlQKsJM95n/E201kmBsIngAg1j3hSKnm4 OsS9qqbroG6SQsPhnvSg4/r5CIcAJgaOAiWE1ZVo1sVPXuKHxP3U4+ZjAH+9GUVg3wrO XjT62TNQd6R0IkGzEstE0/KZcGgaEhd51DVVl1p6LMRYlmxskHA9CERbIO4ny9Ik7bhD LUFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=mUW2mH9Ps80DTlxoHseK31Z0OHIp0mepH/oNVfzSIYc=; b=cJr7iQwlYdXGfHe5Gutk0KAkJq74JnAqn9IiPqCx8/YxL6AFAT3xX94Yk0FcoH7uyO lIWpKWXfmqypXONfa5DHWZWUB8iSmwUEeNDY2GUv3xbGNyIJjmSEkhIgUyuvtJPNUXwu t2A7FQb2jN95Fell3BXgQ9dCRDySyN7m+xNvgcJG0QCDaQq2XHzXXhfv1ocJSH50JWu7 th+5LXe8TZu1+qvHZfsyO0FHBFa04WVbUFq8ao88594z2WC0Yt20BDCY9FIaXe4/EaoS xYzOG4UEryNED900vLV24cgxf/0SiVPp/JEOlfpxZSA/zGAQZy4vUDW03+H0HMCC+VVZ Ue0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4-v6si2458053plk.582.2018.01.21.02.19.16; Sun, 21 Jan 2018 02:19:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbeAUKSu (ORCPT + 99 others); Sun, 21 Jan 2018 05:18:50 -0500 Received: from lb2-smtp-cloud7.xs4all.net ([194.109.24.28]:43726 "EHLO lb2-smtp-cloud7.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbeAUKSs (ORCPT ); Sun, 21 Jan 2018 05:18:48 -0500 Received: from [192.168.1.10] ([80.101.105.217]) by smtp-cloud7.xs4all.net with ESMTPA id dCi3ewJf90Ng3dCi4ezonu; Sun, 21 Jan 2018 11:18:46 +0100 Subject: Re: [PATCH v6 6/9] media: i2c: ov772x: Remove soc_camera dependencies To: jacopo mondi , Laurent Pinchart References: <1516139101-7835-1-git-send-email-jacopo+renesas@jmondi.org> <00f1dd19-6420-26ab-0529-a97f2b0de682@xs4all.nl> <20180119111917.76wosrokgracbdrz@valkosipuli.retiisi.org.uk> <2694661.NEH0HeGgLD@avalon> <20180121093117.GK24926@w540> Cc: Sakari Ailus , Jacopo Mondi , magnus.damm@gmail.com, geert@glider.be, mchehab@kernel.org, festevam@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, pombredanne@nexb.com, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Hans Verkuil Message-ID: <8fd4699c-0d51-6cd8-c915-45283b628062@xs4all.nl> Date: Sun, 21 Jan 2018 11:18:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20180121093117.GK24926@w540> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfFDD80tsr1u9MzMni0TqkaAWaKjV9Lu2qwmbSEcAta36FPFZLWsNr6PucntHJAMLM5377/tDAYdjSBmMDsjk8Vb6RsQf+D/vjR/f2cqm0FpKtMxPNsFm npeB3OJs0KTyle/f7oBBRFai/DqqEbs5H6K8gqeWUkXrifJvCmywVZsHtgj/+zf0zJERO9Jm/i4eLxzN8Fbu+Ase/1syiQumi4vVYo/+m00dNE1qNG8sUbM6 paoLpZ8yB//qx+RIcJmoospurQOzt67lJ5PuZT5qZUv5Q1vuJP3VZfa1LrZrK5HJ54V0zKBvnTsipviR6zDrXNSoQcmrco6gRjjqbM3NryptFL9ZmKhV44rn NmD027tyaJsTSXCAhKgm8yBgbJUH+TlrrGyudy8DndvrC41WU65x3rhuV6pMcJDWmcNoLUL5r9vdUlTuNQWhaqhsbJUQoIFGnRURs/5LGRR7biY8zuHNgjH8 qjZpC+EqttUV8h6HEd6ay2dhkDi+RLVzGeT57k2q8i78AuGmLuaoujeLC+PFza9R3XlTS6dvmwuNhwBhNHCHuPmxeu/9QMA954h86Hpkw/b8XFz0TW9kds+O h58= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/01/18 10:31, jacopo mondi wrote: > Hello Hans, Laurent, Sakari, > > On Fri, Jan 19, 2018 at 02:23:21PM +0200, Laurent Pinchart wrote: >> Hello, >> >> On Friday, 19 January 2018 13:19:18 EET Sakari Ailus wrote: >>> On Fri, Jan 19, 2018 at 11:47:33AM +0100, Hans Verkuil wrote: >>>> On 01/19/18 11:24, Hans Verkuil wrote: >>>>> On 01/16/18 22:44, Jacopo Mondi wrote: >>>>>> Remove soc_camera framework dependencies from ov772x sensor driver. >>>>>> - Handle clock and gpios >>>>>> - Register async subdevice >>>>>> - Remove soc_camera specific g/s_mbus_config operations >>>>>> - Change image format colorspace from JPEG to SRGB as the two use the >>>>>> same colorspace information but JPEG makes assumptions on color >>>>>> components quantization that do not apply to the sensor >>>>>> - Remove sizes crop from get_selection as driver can't scale >>>>>> - Add kernel doc to driver interface header file >>>>>> - Adjust build system >>>>>> >>>>>> This commit does not remove the original soc_camera based driver as >>>>>> long as other platforms depends on soc_camera-based CEU driver. >>>>>> >>>>>> Signed-off-by: Jacopo Mondi >>>>>> Reviewed-by: Laurent Pinchart >>>>> >>>>> Acked-by: Hans Verkuil >>>> >>>> Un-acked. >>>> >>>> I just noticed that this sensor driver has no enum_frame_interval and >>>> g/s_parm support. How would a driver ever know the frame rate of the >>>> sensor without that? > > Does it make any difference if I point out that this series hasn't > removed any of that code, and the driver was not supporting that > already? Or was it handled through soc_camera? That last question is a good one. Can you check? There are two sh boards that use this sensor. Are you able to test on one of those boards? There is reversed engineered code for the ox772x here: drivers/media/usb/gspca/ov534.c That appears to handle framerates. I am very uncomfortable promoting this driver to drivers/media/i2c without having functioning frame interval handling. It could be as simple as a single fixed framerate, it doesn't have to be fancy. Without it it is basically unusable by applications since those typically expect support for this. Moving it to staging might be another option, with a TODO mentioning this missing feature. > >>> >>> s/_parm/_frame_interval/ ? >>> >>> We should have wrappers for this or rather to convert g/s_parm users to >>> g/s_frame_interval so drivers don't need to implement both. >> >> There are two ways to set the frame interval, either explicitly through the >> s_frame_interval operation, or implicitly through control of the pixel clock, >> horizontal blanking and vertical blanking (which in turn can be influenced by >> the exposure time). >> >> Having two ways to perform the same operation seems sub-optimal to me, but I >> could understand if they covered different use cases. As far as I know we >> don't document the use cases for those methods. What's your opinion on that ? >> > > -If- I have to implement that in this series to have it accepted, > please let me know which one of the two is the preferred one :) g/s_frame_interval. The other is (I think) for highly specialized devices. For regular normal sensors I do not think it makes much sense. Certainly not for fairly old sensors like this one. Regards, Hans