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 14D7B606A31A for ; Tue, 1 Dec 2026 01:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=jmzQDg/D; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.spacemit.com header.i=@linux.spacemit.com header.a=rsa-sha256 header.s=mxsw2412 header.b=nFm2gZdG DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:To:From:Subject: Cc:Message-Id:Date:Mime-Version: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=66x3M+vNZvWZgAWuBeKf3GmtpXkd61UmKd65WrCGKH0=; b=jmzQDg/DDkbbLYdynQB3qkT8Ev 6Ie3kzorKGEt8Mbp1+WXWDF8MTj9xLOwQ2lFimlBAoJ2U7QsD5ZHy/9ic/cUiuOlm+356Gq++OMFP vGYuXCDCzjpuDSDH/7Rxiif4ngRMvX3ka8IS54kX4tnj7Bt4Uo832LyR5GLiFkOzlzO9Ncdg1uqKk V3nuv383+WUcQOP5gjIswZ/GI3DqftJT5i8fGPdRfbWxbM+zb1YeQLs0O7Vsxh3yUIlovF0ZvxC5H T0x/H1xgDLV6fJShNBmyH4cP1aFhI83HK/gO4EbtsOgNHKcBpyiwDN0F8dsKcK078cTsV4eaupjkB O6HjDDSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCoY-00000006BwL-3cQV; Tue, 01 Dec 2026 01:37:50 +0000 Received: from smtpbgjp3.qq.com ([54.92.39.34]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCoT-00000006Bvs-1YXV; Tue, 01 Dec 2026 01:37:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.spacemit.com; s=mxsw2412; t=1796089003; bh=j6+r3dKJ2AingpJNnqCz523JrIBMMnY1iqPZbcA4uXA=; h=Mime-Version:Date:Message-Id:Subject:From:To; b=nFm2gZdGL1AFoVFx+9oQaFWbSsFIgJ6bL35SkR+adug0iv8odKcOkz2uqlbYA//qM X81FQEryzSAqLZamSudwtWrkVwf7ISbNm28Np4Ia8NQ9lHPOxOW/if3dkfkTgCWUG8 DBaQS1m0afaQsWNOBven7N9yXeSlmh848Vmk8IcM= X-QQ-mid: zesmtpgz6t1796088993teacdc09b X-QQ-Originating-IP: Xxi52+TXN2dt4Tb+dSgkirR5u0P5LQAha/3i0wNwZ/o= Received: from localhost ( [8.218.183.135]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 01 Dec 2026 09:36:25 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 5205509732982425431 EX-QQ-RecipientCnt: 41 X-Archived-By: Mime-Version: 1.0 Date: Tue, 01 Dec 2026 09:36:25 +0800 Message-Id: Cc: "Cody Kang" , "James Morris" , , , , , , , , Subject: Re: [PATCH v4 00/16] drm/spacemit: add SpacemiT K3 display support From: "Encrow Thorne" To: , "David Airlie" , "Simona Vetter" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Yixun Lan" , "Troy Mitchell" , "Vinod Koul" , "Neil Armstrong" , "Manivannan Sadhasivam" , "Haylen Chu" , "Michael Turquette" , "Stephen Boyd" , "Brian Masney" , "Philipp Zabel" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , "Yao Zi" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , "Guodong Xu" , "Icenowy Zheng" , "Jerome Brunet" , "Sarah Emery" , "Ze Huang" , "Dmitry Baryshkov" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261129-k3-display-v4-0-ce6cf7988202@gmail.com> In-Reply-To: <20261129-k3-display-v4-0-ce6cf7988202@gmail.com> X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpgz:linux.spacemit.com:qybglogicsvrsz:qybglogicsvrsz3b-0 X-QQ-XMAILINFO: MCg5+ArSTX6cac1EGksiKEtqDW6j45mUPCNydBXRQI77X1c03bM9nDiX 9IIaiKdGuG+BhH5StiNuWJdKatW425E4m7seHzTaZwA2BUoZTYzJdLI49xCmdEy0zdDdFye +MfynBIppzOzOotg8OFwtFuRsvYh/QCnPPdygIfwDgeO1qppEASSTO3CdqhEDMh7X/hk9pK JtrOA4LQQeWler/peqQ3kkGsiKT83/uzLNZyA+eXuJ/6RVgq3YH6ZLx2ck9EtJBuRePgRjT ubbNwKAHp3ozUOwDu6Tsocj0geH+XxAyqbxjjidj4Ai5ZE9pl5fl5E/z3Yo3AOqO9rxorRz 4X8FLkJRgQzP4Ki0RtdAFg4JO987t9BR046OvLMnx1dk+fnqAXmAG+TrLSRo7KmdkGX5nGz 5mfb70QdnGhmSjA26hHLHD1mNGtKvB7cGkpkin4Zw2QDDX9PZsyWmzmye038GvY9hqCLI7F poCwq4f59NsQX49amVNtK9PzR7RayHgaFuHxW9OmsS2aD3jxM2uOtGXoGcPB/QrbpFCMH7M 4Q0/cy2v0XSjJIJ5hffVdy0E9MsqzAmkVde1vMt1xhKlgqFt1IiI6Sgnm7WuCd+Wx9kouwX aPBVa+eW9XP6AaVIafUCstOVOhfcAHM92lj3Y1tdMKTzGYtwRqrVJA20ogPWy76rZUzZYod ouStwE4fs3GOmrNceheZUZ8PHwXQ8W4dIajgaGCGZvEe6O0aZDNoE3qAv8n/9o8fbxsg02l N8KHlT/Jx7TLXE1tZ696CIT+z+UzX09AKy3BhyrfgQ3ht1/kCrE1oLgbRJ0EIPQUXJJ3dS9 K32UURROu/+gr6uLQOG90kzmsE+IZME1xf+OrEEWawHomO8RA2MDk9Ew1FeaKjXg32NBzUl fslwxhr2TpAleuysfjPYufHMJI5jYEP7QycO3OiN9TXfN2p4KZe89HHKBWQXypM8Ht1OxQR 1iVpFVJ7wfSSMZvcuyW6WRi2lsLKZwUul2P4by1LLx4//Y/cBjC6xglKu3TxzFed1/tlUxd m/nP7r+8O7Evm+wbyRcKWo5NiNF0xDtmwiUVAt+w== X-QQ-XMRINFO: NI4Ajvh11aEjEMj13RCX7UuhPEoou2bs1g== X-QQ-RECHKSPAM: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_173747_127646_C3464D02 X-CRM114-Status: GOOD ( 48.43 ) X-Spam-Score: 0.4 (/) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-48.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_IN_WELCOMELIST_TO 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 Sun Nov 29, 2026 at 8:32 PM CST, Cody Kang via B4 Relay wrote: Hi Cody, > This series adds display support for the SpacemiT K3 [1], a RISC-V SoC: > a new DRM driver, a new PHY driver and three new bindings. > > The display path is three blocks deep: > > Saturn DPU -> Innosilicon DP/eDP controller -> Innosilicon DP PHY > > New readers will find an introduction to this hardware in the v2 cover > letter [2]. > > v4 keeps the structure of v3. After v3 I went through the whole driver > again, against the comments that new DRM and PHY drivers usually get > on the lists, and tested more on the boards. I also went through every > Sashiko report on v3 and those of a local run on an earlier state of > v4: the real bugs are fixed, and false positives are left as they are. > > The largest change (measured in lines of code) moves the PHY's analog > set-up from the DP controller driver into the PHY driver. The rest is > removal (a PLL table, register fields and stores that nothing used, the > HPD interrupt handlers) and fixes, most of them in the KMS and DP > controller patches (9 and 11). > > A note for those who are reviewing v3: patches 1, 4 and 12 are > identical in v4, and patches 2, 3, 10 and 13 to 16 differ by a few > lines, so comments on those still apply. Patches 5 to 9 and 11 changed; > please look at them in v4. Each patch's changelog lists the changes. > > One binding changed since Rob Herring's review. Patch 2 adds a "clocks" > property to the Innosilicon DP PHY, to accurately reflect hardware. > Patch 3's example includes this PHY, so it changed accordingly. I kept > his Reviewed-by; please say if it should go. > > The clock patch of v3 (patch 6 there) was applied by Jerome Brunet to > the clk-spacemit branch of clk/linux.git. It is no longer part of this > series, and the patches after it have moved up by one. The display > needs that patch at run time, but nothing in this series needs it to > build. > > v2 ships in the Ubuntu 26.10 RISC-V kernel [3]. Thanks to Sarah Emery > for two fixes found there. > > Thanks to Ze Huang for testing v3 on the K3 Pico-ITX with an external > DisplayPort monitor, and to James Morris for testing v3 on the K3 > CoM260-IFX with a DisplayPort monitor. > > Their Tested-by tags were given on v3. Because v4 changes this much, I > have not carried them over: no patch of v4 has a Tested-by. A retest of > v4 would be very welcome. > > About the series: > > The DPU driver arrives as five staged patches (6 to 10) to keep each one > a reasonable size. It becomes buildable with patch 10. Bisect safe. > > This series supports a single primary plane per CRTC and linear RGB > scanout (no plane scaling, rotation, YUV or writeback). It does not > support DSI, DSC or DP audio, and link rates are capped at HBR2. > > Based on drm-misc-next. > > Testing this series needs a SpacemiT u-boot carrying display support. > > Tested on two K3 boards: > > - Pico-ITX: an eDP panel and an external DisplayPort monitor. > - CoM260-IFX: DisplayPort only, no eDP. > > Note: The eDP panel DTS enablement is not part of this series; a separate > series will follow showing how eDP can be verified. > > Testing of v4: > > The series was tested on both boards on drm-misc-next plus the clock > patch, as modules and built in: mode switching, kmscube on each head > and on both, DPMS, page flips, module load and unload, DisplayPort > hot-plug, and all eleven plane formats on the eDP panel and on a > DisplayPort monitor. > > IGT 2.4 was also run on both boards. Of the kms tests that apply to > this driver, all pass. > > [1] https://www.spacemit.com/community/document/info?lang=en&nodepath=hardware/key_stone/k3 > [2] https://lore.kernel.org/r/20260809-k3-display-v2-0-327d7910bf71@gmail.com > [3] https://launchpad.net/ubuntu/+source/linux-riscv/7.2.0-5.5.2 > Thanks for v4. I tested the series based on v7.4-rc1 on a K3 CoM260 IFX with external DisplayPort monitors. Normal modesetting and page flipping with modetest work at both 1920x1080@60Hz and 3840x2160@60Hz. However, I found a recovery issue with the ViewSonic VX2762-4K-MHDU. After disabling the output and allowing the monitor to enter standby, the first modetest invocation fails to restore the picture. Terminating it and running the same command again succeeds. This tests display-output disable/enable, not system suspend/resume. The board remains running throughout. Reproducer on my setup: echo 4 > /sys/class/graphics/fb0/blank sleep 25 modetest -M spacemit -D /dev/dri/card0 -s 41@39:1920x1080-60 -v The first attempt reports: no usable link config; leaving video disabled (5400000 kbit/s x4 lanes) failed to find mode "1920x1080-60.00Hz" for connector 41 I traced this to a transient HPD drop during the initial bring-up. HPD initially passes the check, then goes low for about 1.4 seconds. The subsequent D0 request and training accesses fail with -ENXIO, and the driver abandons the attempt before HPD recovers. A local change that retries link training on -ENXIO within a two-second window allows this monitor to recover on the first invocation. Could you take a look at handling this transient HPD loss in the standby recovery path? Tested-by: Encrow Thorne > Changes in v4: > - drop the clk patch, applied by Jerome Brunet; rebased onto > drm-misc-next > - create the initial state with drm_mode_config_create_initial_state() > (Maxime Ripard) > - build the DP controller into spacemit-drm; use devm_drm_dev_alloc() > and the clk bulk API (Guodong Xu) > - set the sink to D0 before link training (James Morris) > - PHY: move the analog set-up here from the DP controller driver, and > take the reference clock from the device tree (new "clocks" property > in the binding) > - drop the RGB888 and BGR888 plane formats, which make the DPU > underrun, and the HPD interrupt handlers, whose interrupt never fires > on the boards > - other fixes: see each patch's changelog > - Link to v3: https://patch.msgid.link/20261121-k3-display-v3-0-ec419e8e96b8@gmail.com > > Changes in v3: > - drop the tracepoints, the hardware callback tables and the > constant-fill path; the Saturn register code is called directly > (Thomas Zimmermann) > - one command list per channel, allocated once and submitted by its > owner; the grouping, sorting and chaining of lists is gone (Thomas > Zimmermann) > - deliver the commit's event through the vblank machinery, armed from > the CFG_RDY interrupt (Thomas Zimmermann) > - power the DPU through runtime PM, and stop the boot loader's pipeline > at probe instead of at the first modeset (Thomas Zimmermann) > - add prepare_fb: the display MMU table is built once per GEM object > and the buffer's fences are waited for (Thomas Zimmermann) > - program the plane from the clipped rectangles, and size its line > buffer in atomic_check (Thomas Zimmermann) > - wrap only the hardware access in drm_dev_enter() (Thomas Zimmermann); > release the drm_device when the aggregate unbinds > - map scanout buffers write-combining; fail AUX transfers fast when HPD > is low (Sarah Emery) > - reject modes above 3840x2160, and bound framebuffers by what the RDMA > registers can address (Icenowy Zheng) > - let the panel supply the modes on eDP (Guodong Xu) > - leave the DPU's pixel clock at the rate it has; on DP and eDP the PHY > PLL is the pixel clock (Guodong Xu) > - do not advertise a gamma table (Guodong Xu) > - DT: order the display nodes by unit address; the Pico-ITX message > names the Type-C receptacle's DP alternate mode (Icenowy Zheng) > - clk: the commit message names the binding that documents the two > clock inputs (Jerome Brunet) > - MAINTAINERS: add Guodong Xu as maintainer; list Cody Kang with the > vsit.ai address > - rebased onto v7.4-rc1: atomic_create_state replaces .reset > - commit messages of patches 5, 7, 8, 9, 11, 12, 14 and 16 reworded > - picked up Rob Herring's Reviewed-by on patch 4 > - Link to v2: https://patch.msgid.link/20260809-k3-display-v2-0-327d7910bf71@gmail.com > > Changes in v2: > - unbind: keep the online IRQ alive until the teardown commits have > drained; module unload no longer rides two watchdog timeouts > - bridge teardown on devres: reset via > devm_reset_control_get_exclusive_deasserted(), pxclk disable as a > devm action ordered against the PHY child (Philipp Zabel, Yao Zi) > - all five DPU reset lines behind one reset_control_bulk_* pair > (Philipp Zabel, Guodong Xu) > - bindings: port@1 is now required; the CoM260 board describes its DP > receptacle with a dp-connector node; redundant minItems dropped > (Rob Herring) > - possible_crtcs derived from the input endpoint only > - EDID reads through the AUX I2C adapter; write-1-to-clear interrupt > acks by plain write; assorted dead code dropped > - picked up Rob Herring's Reviewed-by on patches 1-3 > - Link to v1: https://lore.kernel.org/r/20260725-k3-display-v1-0-6de34d80e86c@gmail.com > > Signed-off-by: Cody Kang > --- > Cody Kang (16): > dt-bindings: display: spacemit: add K3 Saturn DPU controller > dt-bindings: phy: add SpacemiT K3 Innosilicon DP PHY > dt-bindings: display: spacemit: add K3 Innosilicon DP/eDP controller > dt-bindings: soc: spacemit: allow eDP/DP PHY PLL pixel clocks on K3 APMU > phy: spacemit: add Innosilicon DP TX PHY driver > drm/spacemit: add Saturn DPU register model > drm/spacemit: add Saturn DPU core types, cmdlist and display MMU > drm/spacemit: add Saturn DPU hardware backend > drm/spacemit: add Saturn DPU KMS pipeline > drm/spacemit: add Saturn DPU DRM device driver > drm/spacemit: add Innosilicon DP/eDP controller bridge driver > MAINTAINERS: add SpacemiT K3 display driver entry > riscv: dts: spacemit: k3: add display nodes > riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output > riscv: dts: spacemit: k3-com260-ifx: enable the DisplayPort output > riscv: defconfig: spacemit: k3: enable display driver > > .../display/spacemit/spacemit,k3-inno-dp.yaml | 142 ++ > .../display/spacemit/spacemit,k3-saturn-dpu.yaml | 132 ++ > .../bindings/phy/spacemit,k3-inno-dp-phy.yaml | 54 + > .../bindings/soc/spacemit/spacemit,k1-syscon.yaml | 21 +- > MAINTAINERS | 11 + > arch/riscv/boot/dts/spacemit/k3-com260-ifx.dts | 27 + > arch/riscv/boot/dts/spacemit/k3-display.dtsi | 168 ++ > arch/riscv/boot/dts/spacemit/k3-pico-itx.dts | 11 + > arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 22 + > arch/riscv/configs/defconfig | 3 + > drivers/gpu/drm/Kconfig | 1 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/spacemit/Kconfig | 36 + > drivers/gpu/drm/spacemit/Makefile | 14 + > drivers/gpu/drm/spacemit/dpu/dpu_saturn.c | 276 +++ > drivers/gpu/drm/spacemit/dpu/dpu_saturn.h | 34 + > drivers/gpu/drm/spacemit/dpu/dpu_saturn_hee.c | 677 +++++++ > drivers/gpu/drm/spacemit/dpu/saturn_fbcmem.c | 57 + > drivers/gpu/drm/spacemit/dpu/saturn_fbcmem.h | 16 + > drivers/gpu/drm/spacemit/dpu/saturn_regs/dpu_int.h | 24 + > drivers/gpu/drm/spacemit/dpu/saturn_regs/ops_hee.h | 42 + > .../gpu/drm/spacemit/dpu/saturn_regs/reg_map_hee.h | 64 + > .../drm/spacemit/dpu/saturn_regs/saturn_fields.h | 286 +++ > drivers/gpu/drm/spacemit/spacemit_cmdlist.c | 188 ++ > drivers/gpu/drm/spacemit/spacemit_cmdlist.h | 133 ++ > drivers/gpu/drm/spacemit/spacemit_crtc.c | 667 +++++++ > drivers/gpu/drm/spacemit/spacemit_crtc.h | 125 ++ > drivers/gpu/drm/spacemit/spacemit_dmmu.c | 127 ++ > drivers/gpu/drm/spacemit/spacemit_dmmu.h | 79 + > drivers/gpu/drm/spacemit/spacemit_dpu_ids.h | 26 + > drivers/gpu/drm/spacemit/spacemit_dpu_reg.h | 99 + > drivers/gpu/drm/spacemit/spacemit_drm.c | 203 ++ > drivers/gpu/drm/spacemit/spacemit_drm.h | 84 + > drivers/gpu/drm/spacemit/spacemit_inno_dp.c | 2046 ++++++++++++++++++++ > drivers/gpu/drm/spacemit/spacemit_inno_dp.h | 328 ++++ > drivers/gpu/drm/spacemit/spacemit_planes.c | 303 +++ > drivers/phy/spacemit/Kconfig | 13 + > drivers/phy/spacemit/Makefile | 1 + > drivers/phy/spacemit/phy-k3-inno-dp.c | 1115 +++++++++++ > 39 files changed, 7655 insertions(+), 1 deletion(-) > --- > base-commit: 5ce32a0c94a827ff44ee60898c28060714dcff75 > change-id: 20260713-k3-display-e8ffed67e936 > > Best regards, > -- > Cody Kang _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv