Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] riscv: dts: starfive: linux,cma alloc-ranges exceeds RAM on 1GB JH7110 boards - [Low] riscv: dts: starfive: duplicate 24 MHz fixed-clock node xin24m in jh7110.dtsi --
commit 9a9f9a950fa034a2cfc3ceea40250d8ea7116cfb Author: Michal Wilczynski <[email protected]> riscv: dts: starfive: jh7110: Update DT for display subsystem This commit adds the JH7110 video output subsystem, DC8200 display controller, HDMI controller and PHY nodes, and configures a 512 MiB CMA pool in the common board dtsi. > diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi > b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi > index 64de468f2c317..3eadb5732b011 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; > + }; > + }; [Severity: High] Does constraining linux,cma to alloc-ranges = <0x0 0x70000000 0x0 0x20000000> cause __reserved_mem_alloc_size() to fail with -ENOMEM on 1 GiB JH7110 boards? jh7110-common.dtsi is also included by 1 GiB boards such as Milk-V Mars and Milk-V Mars CM, where physical RAM at 0x40000000..0x80000000 has only 256 MiB inside 0x70000000..0x90000000. Even on larger RAM configurations, matching the alloc-ranges length to the 512 MiB pool size leaves no placement slack if an initrd or firmware reservation overlaps 0x70000000..0x90000000, causing the kernel to fall back to the small default CMA pool. Since vs_dc_probe() sets DMA_BIT_MASK(32), alloc-ranges can span the entire 32-bit addressable DRAM window (<0x0 0x40000000 0x0 0xc0000000>). [ ... ] > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi > b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 82ea63f715b0e..4c3ef68c16bb6 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -352,6 +346,13 @@ tdm_ext: tdm-ext-clock { > #clock-cells = <0>; > }; > > + xin24m: xin24m-clock { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <24000000>; > + clock-output-names = "xin24m"; > + }; [Severity: Low] Does xin24m duplicate the existing osc: oscillator node in jh7110.dtsi? osc already represents the 24 MHz reference crystal for syscrg, stgcrg, aoncrg, and pllclk (with its frequency set in jh7110-common.dtsi), and neither the starfive,jh7110-inno-hdmi-phy binding nor starfive_hdmi_phy_probe() requires the clock to be named "xin24m", so hdmi_phy can use clocks = <&osc> directly. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=15
