Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp23929pxx; Wed, 28 Oct 2020 16:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIkuiuDa6AFG/lTXIC0Ebq5Ie5Nf/TeX9kg+qlpdnBErDvwJMU0jUtJRKuQ5z5PaGAWDLa X-Received: by 2002:a17:907:9604:: with SMTP id gb4mr1573568ejc.336.1603929454506; Wed, 28 Oct 2020 16:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603929454; cv=none; d=google.com; s=arc-20160816; b=d7rTJw8DGxVQnqGD9vEJA+mMxlRmOKEzuE84nOmDi4T08XQtHI9juKdAb5hlHK3GH6 ODgZ+4Mi8YWl1iIC5GPY9AhX7JsXWle4rkEYvGZxOpIYID2QWFAc3uKQr8KbdXhuE4nU Rs8C9do5zZolrxBeofPnKjV8Pd7UICVbseR36VlBicCd3/1lwsu3QDULtYtikTe0MqU/ ZzxKT38IgN1N/hfnCfApbubfgpa4LzHSLUK+r+6wX4m9RAacj7Cp9YuYq/1R3CQZIn/6 6HGGXZO/dXqzh9/kOjS6S5Ovr/4MZzgAGVLhQDKdHduHJ10F65FmYe/XYhjeq6ZsoLxp j4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6y4QOceXe8zRQKZs06ORTkquPOtHQn77ARvbGZP9r1M=; b=Ib03xu9moprpLz6AHj0tmY/+QL4THTE2Via2lMrbyt7voccqOrseJK6jD6+A31TAIU d8eoroQjF69BaHyP72QTzSP80h6zPfVxxxgPAJAjxb5VnHc+gMfHRGAaful0cIrLE4Dl Urgc1PgMTIcFlmSh//bH362Xbay7GVGTe2kF4j9ToZKn0n41Yk6DX6a+CsP1Dc+BQZGG GszrtORnvF0HwYSsCoMJB2UET2N2pgtzA0Zc4LcXeBZQaE9uhiDQhA1MKglEBo4m2MR6 gED5to2bnPT9HYTc5YljBvUEz+Im84gtrdpjA6ZW3JpJD1zvFoLuRnEjHbdJ3ocRdb9o PMfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gFRUCQCF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si118078edf.354.2020.10.28.16.57.12; Wed, 28 Oct 2020 16:57:34 -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; dkim=pass header.i=@chromium.org header.s=google header.b=gFRUCQCF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389326AbgJ1X4F (ORCPT + 99 others); Wed, 28 Oct 2020 19:56:05 -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-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