From patchwork Fri Jul 1 19:40:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 34978 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJ4Ic-0002Zm-UE; Fri, 01 Jul 2016 19:40:26 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1bJ4Ia-0007IE-lM; Fri, 01 Jul 2016 21:40:26 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbcGATkS (ORCPT + 1 other); Fri, 1 Jul 2016 15:40:18 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:43271 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752224AbcGATkO (ORCPT ); Fri, 1 Jul 2016 15:40:14 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 45446823D7; Fri, 1 Jul 2016 21:40:11 +0200 (CEST) Date: Fri, 1 Jul 2016 21:40:10 +0200 From: Pavel Machek To: Sakari Ailus , laurent.pinchart@ideasonboard.com Cc: Sebastian Reichel , Ivaylo Dimitrov , pali.rohar@gmail.com, linux-media@vger.kernel.org Subject: Re: square-only image on Nokia N900 camera -- pipeline setup in python (was Re: [RFC PATCH 00/24] Make Nokia N900 cameras working) Message-ID: <20160701194010.GA30452@amd> References: <20160420081427.GZ32125@valkosipuli.retiisi.org.uk> <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> <20160427030850.GA17034@earth> <20160617164226.GA27876@amd> <20160617171214.GA5830@amd> <20160620205904.GL24980@valkosipuli.retiisi.org.uk> <20160701073146.GA21405@amd> <20160701085025.GA30653@amd> <20160701110154.GA26056@amd> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160701110154.GA26056@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.7.1.180316 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, KNOWN_FREEWEB_URI 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, INVALID_MSGID_NO_FQDN 0, IN_REP_TO 0, LEGITIMATE_NEGATE 0, MSG_THREAD 0, MULTIPLE_RCPTS_RND 0, REFERENCES 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __HTTPS_URI 0, __IN_REP_TO 0, __KNOWN_FREEWEB_URI2 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __MULTIPLE_URI_TEXT 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __URI_IN_BODY 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0' On Fri 2016-07-01 13:01:54, Pavel Machek wrote: > On Fri 2016-07-01 10:50:25, Pavel Machek wrote: > > Hi! > > > > > On gitlab is the latest version of pipeline setup if python. I also > > > got fcam to work (slowly) on the camera, with autofocus and > > > autogain. Capturing from preview modes works fine, but image quality > > > is not good, as expected. Capturing raw GRBG10 images works, but > > > images are square, with values being outside square being 0. > > > > > > Same problem is there with yavta and fcam-dev capture, so I suspect > > > there's something in kernel. If you have an idea what could be wrong / > > > what to try, let me know. If omap3isp works for you in v4.6, and > > > produces expected rectangular images, that would be useful to know, > > > too. > > > > > > Python capture script is at > > > > > > https://gitlab.com/tui/tui/commit/266b6eb302dcf1481e3e90a05bf98180e5759168 > > > > I switched to the front camera (vs6555 pixel array 2-0010 + vs6555 > > binner 2-0010) and got same effect: preview image works fine, raw > > image is square. Still kernel v4.6. > > Same issue with kernel v4.7-rc5. And this seems to fix it. Now image fills whole frame. But I still can't get 5MP format to work, it fails with: [ 497.929016] check_format checking px 808534338 808534338, h 1968 1968, w 2592 2592, bpline 5184 5184, size 10202112 10202112 field 1 1 [ 497.929107] configuring for 2592(5184)x1968 [ 497.936248] stream on success [ 498.020233] omap3isp 480bc000.isp: CCDC won't become idle! [ 525.563476] omap3isp 480bc000.isp: Unable to stop OMAP3 ISP CCDC commit 5268a954cd6af4853ad8e05f32ff4741c245e65e Author: Pavel Date: Fri Jul 1 21:34:35 2016 +0200 This seems to fix stuff for me -- now square limitation of images is gone. diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index 5c52ae8..0e052e6 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -1185,7 +1185,8 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc) /* Use the raw, unprocessed data when writing to memory. The H3A and * histogram modules are still fed with lens shading corrected data. */ - syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR; +// syn_mode &= ~ISPCCDC_SYN_MODE_VP2SDR; + syn_mode |= ISPCCDC_SYN_MODE_VP2SDR; if (ccdc->output & CCDC_OUTPUT_MEMORY) syn_mode |= ISPCCDC_SYN_MODE_WEN;