From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B98D606A31D for ; Tue, 27 Oct 2026 18:25:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NyomVhiY; dkim=pass (1024-bit key, unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=bCe0DApS DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:In-Reply-To:From:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=yYVnZVngw4wIyvUedHrp/RCi4DEk87r28LIRWXpCLH0=; b=NyomVhiYE6zjSF F68jCNn+A16YWp6UNFo1EGA1OiKFV6K2uzJKDkypT6n0MMPcPiEW6pR/+xnQZGnrJw1hL26l0bZy9 BCRAJwgCcKrMqIvxImO/ySPyyIhWNhfqgfsPFR4tsN7PL2QSVGqf0tRJheIWYdj9492O7qfl1Jqbq Ghyy43xow4leCS4/9kt1qGA0RK0PX3j1iMOvsIRbK7ZeuEphuptb8c5LkROTvZJoytYgi6pCw5bgw 3lQteMrJM+V3mP/FTTtbgXqTKhlogDdQ62R+Ia4ES2KdqlCHafO7sviY8bUPoZLz4pSXcuTRDcVIQ Xp+x0npNeWixzzzCDqBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLlrq-00000005YnA-0BDE; Tue, 27 Oct 2026 18:25:50 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xLlrl-00000005Ylw-3ued; Tue, 27 Oct 2026 18:25:49 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20261027182540euoutp01808e2a0784b22e974d6c8ffe88c8195c~idi3U5q2O1070810708euoutp01J; Tue, 27 Oct 2026 18:25:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20261027182540euoutp01808e2a0784b22e974d6c8ffe88c8195c~idi3U5q2O1070810708euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1793125540; bh=yYVnZVngw4wIyvUedHrp/RCi4DEk87r28LIRWXpCLH0=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=bCe0DApSTMa5hEEGgVvneqzfJYakD7qrG9r1rRA787dJcmFkxZeM041kJvQzf1sWi mFAb6eOSUU0Yw/Y6KAUriZpeXdgumQlCNkdGsLLdF/sfW7mYHnWBx2d7wOenrOEkLR zJJaDP1dZxSCFavYWwIcrbMKnu0ZvjvRL33YUuUE= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20261027182539eucas1p2af97fa5bad6b7de6ca761cb86172737b~idi2gJHhp1120011200eucas1p2b; Tue, 27 Oct 2026 18:25:39 +0000 (GMT) Received: from [192.168.1.44] (unknown [106.210.136.40]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20261027182538eusmtip2789b0e5587293524b9c364f453c89396~idi03PmTX1528615286eusmtip2f; Tue, 27 Oct 2026 18:25:38 +0000 (GMT) Message-ID: <5fec923f-36bb-4dcc-bf3a-13be3eaa8f83@samsung.com> Date: Tue, 27 Oct 2026 19:25:37 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 19/20] riscv: dts: starfive: jh7110: Update DT for display subsystem To: Icenowy Zheng , Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Lee Jones , Andy Yan , Philipp Zabel , Emil Renner Berthing , Hal Feng , Michael Turquette , Stephen Boyd , Heiko Stuebner , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Dominique Belhachemi , Brian Masney , Jerome Brunet Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, mfd@lists.linux.dev, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, Marek Szyprowski , Maud Spierings , Graham Markall , Chaoyi Chen , Joshua Peisach , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= Content-Language: en-US From: Michal Wilczynski In-Reply-To: Content-Transfer-Encoding: 8bit X-CMS-MailID: 20261027182539eucas1p2af97fa5bad6b7de6ca761cb86172737b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260915153248eucas1p27d8d2c9fa536bbd951e0102b04416dad X-EPHeader: CA X-CMS-RootMailID: 20260915153248eucas1p27d8d2c9fa536bbd951e0102b04416dad References: <20260915-jh7110-clean-send-v4-0-f0e4fd6f2cc8@samsung.com> <20260915-jh7110-clean-send-v4-19-f0e4fd6f2cc8@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261027_112546_575882_C87A890E X-CRM114-Status: GOOD ( 23.57 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 9/29/26 17:06, Icenowy Zheng wrote: > 在 2026-09-15二的 17:32 +0200,Michal Wilczynski写道: >> Activate the display subsystem by describing the video output >> subsystem, >> which the documentation calls dom_vout_top, as a bus node covering >> the >> whole 0x29400000 region, with dc8200, the HDMI block, the video >> output >> system controller and voutcrg as its children. >> >> The subsystem node owns the resources its children share: the NoC >> display >> bus clock and reset that gate access to every register in the region, >> and >> the PD_VOUT power domain. Modelling it this way keeps a shared gate >> owned >> by the block that shares it rather than by whichever consumer happens >> to >> probe first, and lets dc8200 inherit dma-noncoherent for framebuffer >> DMA >> from the bus it sits on. >> >> The monolithic hdmi node is in turn modelled as a container with >> hdmi_phy >> and hdmi_controller children. This lets the PHY (clock provider, >> depending only on xin24m) and the controller (clock consumer) probe >> independently, breaking the circular clock dependency with voutcrg. >> >> voutcrg consumes the pixel clock from the &hdmi_phy node instead of >> the >> old fixed-clock, and dc8200 gets its pixel clocks from voutcrg's >> MUXes. >> The old, incorrect hdmitx0-pixel-clock fixed-clock node is removed. >> >> The HDMI controller gets a phandle to the video output system >> controller, >> which holds the mux selecting the DC8200 output that drives the HDMI >> transmitter. >> >> CMA is enlarged and constrained to memory the display controller can >> address, because the default pool is too small for its framebuffers. >> >> Co-developed-by: Dominique Belhachemi >> Signed-off-by: Dominique Belhachemi >> Signed-off-by: Michal Wilczynski > > ``` > Tested-by: Icenowy Zheng > ``` > > But, > >> --- >> arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 121 >> +++++++++++++++++++++++- >> arch/riscv/boot/dts/starfive/jh7110.dtsi | 105 >> ++++++++++++++++---- >> 2 files changed, 203 insertions(+), 23 deletions(-) >> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi >> b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi >> index >> a7a1c09a2c9075711f3a214a49618911fdc7b421..a4c3daf712a63b177f744e8c613 >> 416d22e0c9dbd 100644 >> --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi >> +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi >> @@ -33,6 +33,27 @@ memory@40000000 { >> bootph-pre-ram; >> }; >> >> + reserved-memory { >> + #address-cells = <2>; >> + #size-cells = <2>; >> + ranges; >> + >> + /* >> + * The display controller allocates its framebuffers >> from CMA, >> + * and the default pool is too small for them. Keep >> the pool >> + * inside the range the controller can address; it >> fits in the >> + * memory every VisionFive 2 variant has. >> + */ >> + linux,cma { >> + compatible = "shared-dma-pool"; >> + reusable; >> + size = <0x0 0x20000000>; >> + alignment = <0x0 0x1000>; >> + alloc-ranges = <0x0 0x70000000 0x0 >> 0x20000000>; >> + linux,cma-default; >> + }; >> + }; >> + > > I don't know whether constraining the CMA pool in the DT is a good > idea. > > Thanks, > Icenowy > So I've tested the version without alloc-ranges and some of the modetest runs failed especially the higher resolutions. It seems this is because without alloc-ranges __reserved_mem_alloc_size() allocates top down with MEMBLOCK_ALLOC_ANYWHERE so the pool lands above 4 GB, which the DC8200 cannot reach - vs_dc.c sets a 32-bit DMA mask. 25 of the 42 advertised modes failed with "failed to create dumb buffer: Cannot allocate memory" - every 4K and 1080p mode, down to 1360x768. Only 1280x800 and below survive. So the range seems to be a hardware limit which is why I think it belongs in the DT. I'd like to keep it in v6. Best regards, -- Michal Wilczynski