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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 7A278C388F7 for ; Wed, 28 Oct 2020 23:56:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2277420684 for ; Wed, 28 Oct 2020 23:56:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="gFRUCQCF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389331AbgJ1X4G (ORCPT ); Wed, 28 Oct 2020 19:56:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389291AbgJ1Xzj (ORCPT ); Wed, 28 Oct 2020 19:55:39 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5F51C0613CF for ; Wed, 28 Oct 2020 16:55:38 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id 7so1428003ejm.0 for ; Wed, 28 Oct 2020 16:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6y4QOceXe8zRQKZs06ORTkquPOtHQn77ARvbGZP9r1M=; b=gFRUCQCFuTR8+JtdmcXcAlK5X7E61XmvvyAGA/K18mnTt93AI2o+wSqfYUI4n8Y0lU +48KACrQVO3Qw2aB5MwS/gPxeoLzJZw2XI2pEtuKlzoaB/ELqONtZsDRg2xOHXNYJiB6 ur5YGrTWS0kXoutcPvKSjtwakbK/45cyXDu+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6y4QOceXe8zRQKZs06ORTkquPOtHQn77ARvbGZP9r1M=; b=BUn37PtuYmRevJ1+YqEiKHXfdvo1L2w4lQczCPzOvM60/1zBb0C5DCictXOAphIa/g cyPDr88YpGsJeL0JaoJSW4DKxJSTOQlFelFhcpuMXGgGviwKob1IAR/j8kHeaOljocDo iJhox8f8IkI8UDYv3iv4tuxYFf+FqHEhqYMJouc814omrgOpn0PYTdxU7JVTBnJ+nZbf oR20R3ezeXeO6F4pKRa5wsgzau1Sz9Sbl0n7zlBXWmc6Xt1qg80Ani09J/3HbYuigSGN odddiPnkWdsYJKBzv5AOQoOllwMTruNJdKXsjFjRqxU/8WOpqjT0eo4jmbcNwJGfLx8z gz1g== X-Gm-Message-State: AOAM531/gC8gK6568WTj2AGUyCr36mHn6o77A1W4WL3YvR0KVIb2Wk1X EvXKXZ9M1kSjuxvrR5Kqdv6XrQmepiNGsA== X-Google-Smtp-Source: ABdhPJzls00cI8z19mJi3Xzfak5jZQ/eSlfLp9Q+AuWkXFtHQZ2N9CQSJGdSuGHfYZ7f20vqhAUxsA== X-Received: by 2002:a17:907:2177:: with SMTP id rl23mr7131993ejb.243.1603886921595; Wed, 28 Oct 2020 05:08:41 -0700 (PDT) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id ao17sm2936382ejc.18.2020.10.28.05.08.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 05:08:40 -0700 (PDT) Received: by mail-wr1-f49.google.com with SMTP id n6so5367441wrm.13 for ; Wed, 28 Oct 2020 05:08:40 -0700 (PDT) X-Received: by 2002:adf:ab05:: with SMTP id q5mr8280571wrc.32.1603886919796; Wed, 28 Oct 2020 05:08:39 -0700 (PDT) MIME-Version: 1.0 References: <20201028091947.93097-1-krzk@kernel.org> <20201028100311.GF26150@paasikivi.fi.intel.com> In-Reply-To: From: Tomasz Figa Date: Wed, 28 Oct 2020 13:08:28 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: i2c: imx258: correct mode to GBGB/RGRG To: Krzysztof Kozlowski Cc: Sakari Ailus , "Yeh, Andy" , Mauro Carvalho Chehab , Jason Chen , Alan Chiang , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2020 at 11:15 AM Krzysztof Kozlowski wrote: > > On Wed, 28 Oct 2020 at 11:03, Sakari Ailus wrote: > > > > On Wed, Oct 28, 2020 at 10:56:55AM +0100, Krzysztof Kozlowski wrote: > > > On Wed, 28 Oct 2020 at 10:45, Krzysztof Kozlowski wrote: > > > > > > > > On Wed, 28 Oct 2020 at 10:43, Yeh, Andy wrote: > > > > > > > > > > But the sensor settings for the original submission is to output GRBG Bayer RAW. > > > > > > > > > > Regards, Andy > > > > > > > > No, not to my knowledge. There are no settings for color output > > > > because it is fixed to GBGB/RGRG. I was looking a lot into this driver > > > > (I have few other problems with it, already few other patches posted) > > > > and I could not find a setting for this in datasheet. If you know the > > > > setting for the other color - can you point me to it? > > > > > > And except the datasheet which mentions the specific format, the > > > testing confirms it. With original color the pictures are pink/purple. > > > With proper color, the pictures are correct (with more green color as > > > expected for bayer). > > > > Quoting the driver's start_streaming function: > > > > /* Set Orientation be 180 degree */ > > ret = imx258_write_reg(imx258, REG_MIRROR_FLIP_CONTROL, > > IMX258_REG_VALUE_08BIT, REG_CONFIG_MIRROR_FLIP); > > I understand that you think it will replace the lines and columns and > the first line will be RG, instead of GB.... or actually BG because it > flips horizontal and vertical? So why does it not work? Any chance your SoC capture interface performs this flipping on its own as well? > > BTW, this nicely points that the comment around > device_property_read_u32() for rotation is a little bit misleading :) > Are you referring to the comment below? /* * Check that the device is mounted upside down. The driver only * supports a single pixel order right now. */ ret = device_property_read_u32(&client->dev, "rotation", &val); if (ret || val != 180) return -EINVAL; What's misleading about it? > > if (ret) { > > dev_err(&client->dev, "%s failed to set orientation\n", > > __func__); > > return ret; > > } > > > > Could it be you're taking pictures of pink objects? ;-) > > I can send a few sample pictures taken with GStreamer (RAW8, not > original RAW10)... > > Best regards, > Krzysztof