From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D0D91B14F3; Mon, 9 Sep 2024 09:50:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725875413; cv=none; b=eFiW8SOdkSlrTM7lRVLO+f1qFP/cCbz2aes215su8qojoupvNfXgHENG2Mc/VfggNs6NOeVd07Qw7r1wLdyfEk1QcJeTBYqZ5ffz9rOeJKuIi+rkWYL4sT3AV/AcjrZ9+oYPqbq+IMnZFZ3FsCr8B2V+y84bhBeZeAWkdqwf14s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725875413; c=relaxed/simple; bh=gXQyLs4Falod6BhS9AqrAuvVHD5ygStW1u0vafdUDUM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Qb/hroZw8smcTvCsQWcBPqcEg2DaqWul2NjbfPB67ZPGCqm3YPiYplirSSWggYhjt0zFxq8pwt2406LOq4hBvfsFKcm2am3AgMVLbV7vTMKsSp29SC+um1RwUix8CElBQf+8kByG+L2Iaa5FKrBi6ygWNgEHhnoy3jDuepFS950= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=d6Wo3+Dz; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="d6Wo3+Dz" Received: from [192.168.88.20] (91-156-87-48.elisa-laajakaista.fi [91.156.87.48]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EF2742C6; Mon, 9 Sep 2024 11:48:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1725875334; bh=gXQyLs4Falod6BhS9AqrAuvVHD5ygStW1u0vafdUDUM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=d6Wo3+Dzy3rjRoFaYxBJqW4T5DCoWreSynSohVQfzz4mAMSgyFoJ/mWkZ3RJlhH25 Del03H00/kXAV4Z2RYvW4Gb0kJzfyZ0XIK8ddOLc/9ukOhEfxvGwqxt3emt07p0wZz hwtmgMxcvJBGAPShVEYbcwMUkOOcsrvlHKsYHMLs= Message-ID: Date: Mon, 9 Sep 2024 12:50:05 +0300 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/4] drm/tidss: Add OLDI bridge support To: Aradhya Bhatia , Francesco Dolcini , max.krummenacher@toradex.com Cc: Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Laurent Pinchart , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , DRI Development List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Praneeth Bajjuri , Udit Kumar , Alexander Sverdlin , Randolph Sapp , Devarsh Thakkar , Jayesh Choudhary , Jai Luthra References: <20240716084248.1393666-1-a-bhatia1@ti.com> <20240906114311.GA32916@francesco-nb> Content-Language: en-US From: Tomi Valkeinen Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= xsFNBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5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MEs8WjBbpP81h7QxWIfWtp+VnwNGc6nq5IQDESH mvQcsFS7d3eGVI6eyjCFdcAO8eMAEQEAAcLBXwQYAQIACQUCTqazRwIbDAAKCRD6PaqMvJYe 9fA7EACS6exUedsBKmt4pT7nqXBcRsqm6YzT6DeCM8PWMTeaVGHiR4TnNFiT3otD5UpYQI7S suYxoTdHrrrBzdlKe5rUWpzoZkVK6p0s9OIvGzLT0lrb0HC9iNDWT3JgpYDnk4Z2mFi6tTbq xKMtpVFRA6FjviGDRsfkfoURZI51nf2RSAk/A8BEDDZ7lgJHskYoklSpwyrXhkp9FHGMaYII m9EKuUTX9JPDG2FTthCBrdsgWYPdJQvM+zscq09vFMQ9Fykbx5N8z/oFEUy3ACyPqW2oyfvU CH5WDpWBG0s5BALp1gBJPytIAd/pY/5ZdNoi0Cx3+Z7jaBFEyYJdWy1hGddpkgnMjyOfLI7B CFrdecTZbR5upjNSDvQ7RG85SnpYJTIin+SAUazAeA2nS6gTZzumgtdw8XmVXZwdBfF+ICof 92UkbYcYNbzWO/GHgsNT1WnM4sa9lwCSWH8Fw1o/3bX1VVPEsnESOfxkNdu+gAF5S6+I6n3a ueeIlwJl5CpT5l8RpoZXEOVtXYn8zzOJ7oGZYINRV9Pf8qKGLf3Dft7zKBP832I3PQjeok7F yjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 09/09/2024 12:31, Aradhya Bhatia wrote: > Hi, > > Thank you, Francesco and Max, for testing and reporting this! > > On 09/09/24 13:45, Tomi Valkeinen wrote: >> Hi, >> >> On 06/09/2024 14:43, Francesco Dolcini wrote: >>> +Max >>> >>> Hello Aradhya, >>> >>> On Tue, Jul 16, 2024 at 02:12:44PM +0530, Aradhya Bhatia wrote: >>>> The addition of the 2nd OLDI TX (and a 2nd DSS in AM62Px) creates a need >>>> for some major changes for a full feature experience. >>>> >>>> 1. The OF graph needs to be updated to accurately show the data flow. >>>> 2. The tidss and OLDI drivers now need to support the dual-link and the >>>>     cloned single-link OLDI video signals. >>>> 3. The drivers also need to support the case where 2 OLDI TXes are >>>>     connected to 2 different VPs - thereby creating 2 independent >>>> streams >>>>     of single-link OLDI outputs. >>> >>> Have you considered/tested the use case in which only single link is >>> used? >>> You do not mention it here and to me this is a relevant use case. >>> >>> There is a workaround for this (use option 2, cloned, even if nothing is >>> connected to the second link), but this seems not correct. > > I agree. The whole idea behind the series is to be able to accurately > describe the hardware. Putting the devicetree in clone mode in order to > get the single-link mode working is far from ideal. Btw, with the fw_devlink=off hack, and removing the second link from k3-am625-sk-microtips-mf101hie-panel.dtso, is still not enough, as the k3-am62-main.dtsi contains the ti,companion-oldi property which makes the driver think it's a cloning case. So, I think, either the ti,companion-oldi and ti,secondary-oldi should only be set in the overlay when setting up cloning/dual-link, or the companion-oldi property shouldn't actually make a difference, and the selection between clone and single-link should be done via some other means. >>> We (Max in Cc here) noticed that this specific use case is broken on >>> your downstream v6.6 TI branch. > > Yes, it was been brought to my attention that the single-link usecase is > not working over the downstream ti-6.6 kernel. As I have since > discovered, it's not working on this series either. > > For some reason, the supplier-consumer dependency between the OLDI and > the panel devicetree nodes is not getting flagged as `FWLINK_FLAG_CYCLE` > in cases of single-link configuration. > > This flag allows the panel driver to continue to probe without waiting > for the OLDI driver (panel's supplier). Absence of the flag getting set > is causing these drivers to keep deferring probe in an endless cycle. > > Even with the flag, the OLDI (and tidss) cannot complete probe until the > panel driver is probed and ready. That is because the OLDI (and tidss) > need the panel to continue with the bridge-chain creation. > > However, over with the dual-lvds configuration (and as Francesco has > now mentioned the clone configuration as well), the flag gets set by > default, and everything works. > > This is what the debug has led to, so far. Yes, I came to the same conclusion with my debug. >> >> What if you set "fw_devlink=off" kernel boot parameter? >> > > Yes! I haven't tested it, but it seems that this will bypass the > supplier check and let the panel probe continue. > > > Tomi, any idea, why is this issue happening only for single-link in the > first place? It seems as if having 2 ports inside the panel devicetree > lets the probe mechanism recognize the circular dependency and ignore > the supplier OLDIs? I have to say I have no idea... I don't really understand the devlink code here, but I'm guessing that the "cycle" part comes from the fact that with a media graph we have links (remote-endpoint) both ways in the DT data. So it's not possible to say which side is the consumer, which one is the supplier. Thus, it's marked as a cycle and, I think, basically ignored for the probing purpose. But why not here? I can see the links being created both ways: /display Linked as a fwnode consumer to /bus@f0000/dss@30200000/oldi-txes/oldi@0 /bus@f0000/dss@30200000/oldi-txes/oldi@0 Linked as a fwnode consumer to /display but it's never marked as a cycle. > This is the function where the difference comes down to, by the way - > __fw_devlink_relax_cycles(), per my knowledge. I am still on my way to > understand what exactly it is doing and why is it not relaxing the > single-link case. Yep. The answer is probably somewhere there =). Tomi