Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3606166pxb; Sat, 13 Feb 2021 03:27:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJylzO1mDoH22KZnCDcehd7Z9PHyd3aaz23EOC+5ELyf1d2xZPgVBWVzOpPZetE0832ZsRoF X-Received: by 2002:a05:6402:6cc:: with SMTP id n12mr7310372edy.297.1613215643096; Sat, 13 Feb 2021 03:27:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613215643; cv=none; d=google.com; s=arc-20160816; b=iyDEg46XJQce85Xl+sViBbXJA8aLH3n1dzMdh8lxn0TV0USzONiHOWbmIswbGmz85T bPogATILnOpbU9mt3Vry0rMyuCGvO32b5o8hCB/wVq4/Qxx66Ay58Q7KYH6Oyaihnrc8 gctwEb9mKDl+PMlsfa54SoIWdRvyEnrwaJzjlR/ouGBXKZUFpalgkAmEGYZIYIpB4/ux LxclExFbzcSohLFAEBQros4ERvAWmrOC4xINMfbdTmmEqEXAPOoJoa3t/yUatX2iaA+9 /tmnG9g7d2L9vm9a2DnSjvxP7jj+UlN7qZq0MsxtXeFtw/12WTJSBjN3dldm4R0j4pt4 wOHQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=efSVxwMv4AE2Bf8gz8Hv8Zt7WogqzvyLeGZ7U7OGeks=; b=Uz45YtYj/UPrQ4187G0NUHNi9ruS0qpo1ouljiualwB/eA3yRw8wEyI5KqeBYiIdWL fOkIfE0nfgmSpKfnzFwmU6NDdhf6PI+HqDhX0EacnMka/UuT1BRoMnHRP0F1jYS5XSOT Km+F1ZbBpXOTRoSG9+bHQmDYF+SWCWHKRLGaUkSlIagTF0KoOKAG738CP9mEM1RxYwa2 mwfV0h0BeW0ykuF7BsE+kSL5LHtkK5Wcazbt3LWt/RPJ5RPKkDuzNei6WROMX1/kEhLZ 5iPOYq3bmmK5AFTATTSWK7Xs3KmKiTGV0mHMiwbYHpO3tEbc38jceoUGQ2huYdKdso5u yEjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=iaGM7Xel; 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=posteo.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z14si2660514ejr.425.2021.02.13.03.25.47; Sat, 13 Feb 2021 03:27:23 -0800 (PST) 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=@posteo.net header.s=2017 header.b=iaGM7Xel; 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=posteo.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbhBMLVB (ORCPT + 99 others); Sat, 13 Feb 2021 06:21:01 -0500 Received: from mout01.posteo.de ([185.67.36.65]:40810 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbhBMLU7 (ORCPT ); Sat, 13 Feb 2021 06:20:59 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 0D58A160060 for ; Sat, 13 Feb 2021 12:20:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1613215201; bh=LdSMwsAk/xXFN+Y8P4/lPu3FFkk8ht3k2CuANxWxN+o=; h=Date:From:To:Cc:Subject:From; b=iaGM7XellNK3d19UKPxI4hcjnGbZil9+IdvlOJC4FQTqgHLMK8trHef86O2MRskSZ i5o+eqlhApBxe994DAjAuQ9xvfqv5LApquFrxCrMNsRG90BlkaSiRL6TmdoSKZa62F 9Mgm6+xUmAIQ9OYhZfptSyQ88k4FNMG/iNlb1gPlvMWedkjiM3SxgAJs4moZI4JUPh TGuC11Wj9qY/z3zRPErEvV/x+QuDe0KB67H8B7R80QshrQ27hnJI4avNXO53Hj7sEa gtEEt2e9M22RWThMcT/sLZkhWq5dxL7fKzYenuBgKUPVex4m4CWBxzM0uF5C2mpYvj pAinXfMuh+XlQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Dd7FB123Zz6tmJ; Sat, 13 Feb 2021 12:19:58 +0100 (CET) Date: Sat, 13 Feb 2021 12:19:57 +0100 From: Sebastian Fricke To: Heiko =?utf-8?Q?St=C3=BCbner?= Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, hjc@rock-chips.com, robh+dt@kernel.org, linux-media@vger.kernel.org, dafna.hirschfeld@collabora.com, helen.koike@collabora.com, ezequiel@collabora.com, cmuellner@linux.com Subject: Re: [PATCH 0/6] Support second Image Signal Processor on rk3399 Message-ID: <20210213111957.3ocxgcyno6ent4vt@basti-TUXEDO-Book-XA1510> References: <20210202145632.1263136-1-heiko@sntech.de> <808992741.0ifERbkFSE@diego> <20210211052515.qdqe256cipdwwrz6@basti-TUXEDO-Book-XA1510> <16789691.tv2OnDr8pf@diego> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <16789691.tv2OnDr8pf@diego> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Heiko, On 11.02.2021 15:42, Heiko Stübner wrote: >Hi Sebastian, > >Am Donnerstag, 11. Februar 2021, 06:25:15 CET schrieb Sebastian Fricke: >> Hey Heiko, >> >> On 10.02.2021 12:15, Heiko Stübner wrote: >> >Hi Sebastian, >> > >> >Am Freitag, 5. Februar 2021, 15:55:56 CET schrieb Heiko Stübner: >> >> Hi Sebastian, >> >> >> >> I did some tests myself today as well and can confirm your >> >> hdmi related finding - at least when plugged in on boot. >> >> >> >> I tried some combinations of camera vs. hdmi and it seems >> >> really only when hdmi is plugged in on boot >> > >> >as you can see in v2, it should work now even with hdmi >> >connected on boot. My patch ignored the grf-clock when >> >doing the grf-based init. >> > >> >All clocks are on during boot and I guess the hdmi-driver >> >did disable it after its probe. The phy_power_on functions >> >did handle it correctly already, so it was only happening >> >with hdmi connected on boot. >> >> Thank you very much for solving that problem, I've tested the scenarios >> described below and it works like a charm. (With your V2) >> > >> > >> >Btw. do you plan on submitting your ov13850 driver >> >soonish? >> >> Actually, I have posted the patch already see here: >> https://patchwork.kernel.org/project/linux-media/patch/20210130182313.32903-2-sebastian.fricke@posteo.net/ > >very cool to see > >> I currently review the requested changes and questions and will soon >> post a second version, but I expect quite some time until it is actually >> merged. > >could you Cc me on future versions? Sure will do :) > > >Thanks >Heiko Sebastian >> >> Greetings, >> Sebastian >> >> > >> > >> >> >> >> (1) >> >> - boot >> >> - camera >> >> --> works >> >> >> >> (2) >> >> - boot >> >> - camera >> >> - hdmi plugged in >> >> - hdmi works >> >> - camera >> >> --> works >> >> >> >> (3) >> >> - hdmi plugged in >> >> - boot >> >> - hdmi works >> >> - camera >> >> --> camera doesn't work >> >> >> >> (4) >> >> - boot >> >> - hdmi plugged in >> >> - hdmi works >> >> - camera >> >> -> camera works >> >> >> >> >> >> With a bit of brute-force [0] it seems the camera also works again even >> >> with hdmi connected on boot. So conclusion would be that some clock >> >> is misbehaving. >> >> >> >> Now we'll "only" need to find out which one that is. >> >> >> >> >> >> Heiko >> >> >> >> >> >> [0] >> >> Don't disable any clock gates >> >> >> >> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c >> >> index 070dc47e95a1..8daf1fc3388c 100644 >> >> --- a/drivers/clk/clk-gate.c >> >> +++ b/drivers/clk/clk-gate.c >> >> @@ -61,6 +61,9 @@ static void clk_gate_endisable(struct clk_hw *hw, int enable) >> >> >> >> set ^= enable; >> >> >> >> +if (!enable) >> >> +return; >> >> + >> >> if (gate->lock) >> >> spin_lock_irqsave(gate->lock, flags); >> >> else >> >> >> >> >> >> >> >> Am Freitag, 5. Februar 2021, 09:15:47 CET schrieb Heiko Stübner: >> >> > Hi Sebastian, >> >> > >> >> > Am Freitag, 5. Februar 2021, 07:43:35 CET schrieb Sebastian Fricke: >> >> > > On 03.02.2021 20:54, Heiko Stübner wrote: >> >> > > >Am Mittwoch, 3. Februar 2021, 19:14:22 CET schrieb Sebastian Fricke: >> >> > > >> I have tested your patch set on my nanoPC-T4, here is a complete log >> >> > > >> with: >> >> > > >> - relevant kernel log entries >> >> > > >> - system information >> >> > > >> - media ctl output >> >> > > >> - sysfs entry information >> >> > > >> >> >> > > >> https://paste.debian.net/1183874/ >> >> > > >> >> >> > > >> Additionally, to your patchset I have applied the following patches: >> >> > > >> https://github.com/initBasti/Linux_kernel_media_tree_fork/commits/dual_cam_setup >> >> > > >> >> >> > > >> And just to not cause confusion the `media_dev` entries come from this >> >> > > >> unmerged series: >> >> > > >> https://patchwork.kernel.org/project/linux-media/list/?series=426269 >> >> > > >> >> >> > > >> I have actually been able to stream with both of my cameras at the same >> >> > > >> time using the libcamera cam command. >> >> > > >> I would like to thank you a lot for making this possible. >> >> > > > >> >> > > >Thanks for testing a dual camera setup. On my board I could only test >> >> > > >the second ISP. And really glad it works for you tool :-) . >> >> > > > >> >> > > >Out of curiosity, do you also see that green tint in the images the cameras >> >> > > >produce? >> >> > > >> >> > > Yes, I do. Actually, I currently have two forms of a green tint, on my >> >> > > OV13850 everything is quite dark and greenish, which is caused by the >> >> > > missing 3A algorithms. On my OV4689, I have big patches of the image >> >> > > with bright green color and flickering, I investigated if this is >> >> > > connected to the 2nd ISP instance, but that doesn't seem to be the case >> >> > > as I have the same results when I switch the CSI ports of the cameras. >> >> > > >> >> > > I have found another issue, while testing I discovered following >> >> > > issue: >> >> > > When I start the system with an HDMI monitor connected, then the camera >> >> > > on the 2nd port doesn't work. This is probably because the RX/TX is >> >> > > reserved as a TX. >> >> > > But it made me wonder because if the system has an RX, a TX, and >> >> > > an RX/TX, why isn't the pure TX used by the monitor and the >> >> > > cameras take RX and RX/TX? >> >> > > Or do you think that this is maybe a malfunction of this patch? >> >> > >> >> > I don't think it is an issue with this specific series, but still puzzling. >> >> > >> >> > I.e. the DPHYs are actually only relevant to the DSI controllers, >> >> > with TX0 being connected to DSI0 and TX1RX1 being connected >> >> > to DSI1. So having an hdmi display _in theory_ shouldn't matter at all. >> >> > >> >> > Out of curiosity what happens, when you boot without hdmi connected >> >> > turn on the cameras, connect the hdmi after this, try the cameras again? >> >> > >> >> > >> >> > Heiko >> >> > >> >> > > >> >> > > > >> >> > > >Thanks >> >> > > >Heiko >> >> > > >> >> > > Greetings, >> >> > > Sebastian >> >> > > >> >> > > > >> >> > > > >> >> > > >> If you like to you can add: >> >> > > >> Tested-by: Sebastian Fricke >> >> > > >> >> >> > > >> On 02.02.2021 15:56, Heiko Stuebner wrote: >> >> > > >> >The rk3399 has two ISPs and right now only the first one is usable. >> >> > > >> >The second ISP is connected to the TXRX dphy on the soc. >> >> > > >> > >> >> > > >> >The phy of ISP1 is only accessible through the DSI controller's >> >> > > >> >io-memory, so this series adds support for simply using the dsi >> >> > > >> >controller is a phy if needed. >> >> > > >> > >> >> > > >> >That solution is needed at least on rk3399 and rk3288 but no-one >> >> > > >> >has looked at camera support on rk3288 at all, so right now >> >> > > >> >only implement the rk3399 specifics. >> >> > > >> > >> >> > > >> > >> >> > > >> >Heiko Stuebner (6): >> >> > > >> > drm/rockchip: dsi: add own additional pclk handling >> >> > > >> > dt-bindings: display: rockchip-dsi: add optional #phy-cells property >> >> > > >> > drm/rockchip: dsi: add ability to work as a phy instead of full dsi >> >> > > >> > arm64: dts: rockchip: add #phy-cells to mipi-dsi1 >> >> > > >> > arm64: dts: rockchip: add cif clk-control pinctrl for rk3399 >> >> > > >> > arm64: dts: rockchip: add isp1 node on rk3399 >> >> > > >> > >> >> > > >> > .../display/rockchip/dw_mipi_dsi_rockchip.txt | 1 + >> >> > > >> > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 39 ++ >> >> > > >> > drivers/gpu/drm/rockchip/Kconfig | 2 + >> >> > > >> > .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 342 ++++++++++++++++++ >> >> > > >> > 4 files changed, 384 insertions(+) >> >> > > >> > >> >> > > >> >> >> > > > >> >> > > > >> >> > > > >> >> > > > >> >> > > >> >> > >> >> > >> >> >> >> >> > >> > >> > >> > >> > > > >