From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0B163B6346 for ; Sat, 8 Aug 2026 10:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786185784; cv=none; b=BsdWzN82zEazjURIzaGsJ5+suIPS2AYMpdn0ZnLVlOTcPLlqMYiIsOEQuSZm6JA921G1PBXEfuolkU2m3IyRlW2Gj1AstG1zAR2M0w6gwIxGgjkwO030n1PiAVeCiDPlGROtbeBy2Ze805xDax9cntMUBv2W6AhDO4FjM+UvVd0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786185784; c=relaxed/simple; bh=opHHAIR0KIa2vIpeSD81rmA42mtnIXghu5q/B8BPYUk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Icw01auJystcEmHHmNkJaKHgkN66fHXmHd7jFf9wJQSjn83BNCHyIpXCokm/szMWcD09xHaUtWf1yvTOFYvkWQua6w2/j7r6sQK4yC5HTpNgtZKhcY56wUllWP71dqsMszEs0rbebax/r8FUcpdGBQw1ClIu/rwMGxy9RGA6mzw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LHb5Ij0D; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LHb5Ij0D" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4955c545a94so334755e9.3 for ; Sat, 08 Aug 2026 03:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786185781; x=1786790581; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=2qu55O0ynnLqL5BTIsWmcyB62JZff9IWE/mdM9/Md6o=; b=LHb5Ij0DdMk591u2Rhp+yo4FCUty8nO2R3UP4380H9B2ubZPANBegm13mmNgDxKZzB qZaCSro63hkrf2gUaF3HcrJJxiqDsPMQ1JY9UQ7gCoQTjHmG9BX7morsck9JfR2NGMY9 6LHPBKfc63eXg3zWXvPILhUpuXkuZtOkB9yQjtZnhZHUrcr2UDpLvzt4Z0lQfH7Ov9rX T7+VOIZwpgsdNoEOQNEEx0vv7pKFNlXj/mqra0dLL9ChRQyX73u2iPzjJBTsx+LC1p62 OxABA6kMMiMbreVt3PdObnJ4zd84jk+FEMjmy9g7y+3pT0PwOZ5oQZ2gEFWKZvgsQzpk wDiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786185781; x=1786790581; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2qu55O0ynnLqL5BTIsWmcyB62JZff9IWE/mdM9/Md6o=; b=CYXE5ozt9fVZzAPjebaClWorKihUJvmVkY7KVlh7CXyviSzVlFIF0o9exctx/YEnLe mmjDrLp7OAON9KWRtysrL43UjqH84FX3hItLQ8MWhY8GmiANtxMPC1EwYWITA360dWBY bBKgrpZ36BPIspqNouq1nfo00HMQILWNJvJzSyD9im0OqCbvAtfFSA+QAKSiTvgUkvud lOGR7HAomtm0GP1mIqz2ViXiXPt60CqjwJ0e14o93oVxKzAMqR7fQoJ+GSfO8TyHHviP YM2aAl/jbspLLX2Qw5MpSV3u4BCvGxcuerovk+9sUhJEi0Lujjf7mHk+EL+f3mHNdNjt JFiw== X-Forwarded-Encrypted: i=1; AHgh+Rp1PXQXyle0XsJzk5EmhogjCQOvrI16HIgvcrT0ZAc6xB0eMAZQim4Zp9nmXBQZUDoPW8r3AAFRm/A0KI0=@vger.kernel.org X-Gm-Message-State: AOJu0YyK5wSUClgbuL1tLYQzj+Cf8xzKUvAsWwom0x1s5+3yU6RDqa0e FdAtdPN1O8Qk6KSWeWYM9MLguI4bdbTMf3xMEOKwSHhszRJdXlU6lZQM X-Gm-Gg: AR+sD13TOhTYkfbepshAIgLA+pBJNfqVIt2KtuMflZ56nLE7o0Vggz9hEbVO0H9mxtQ 9crMgx4KHpYpfjYOJYC1keqHcXKxUBQvDzof42f83IonYPR6wBzdaeEfUtcEq+HvUaph2E7Mp// p/hMisAii0aXvVRfzf1ilw7nWfQGYC35tPe48f/5XlFKjZ+oS95TI9FfcP6W1fHLWCvefSyUbBe l2uyGjWEzUu+6EcVYWgj+iHE+VOr3/ZFpv5lW9fcZF9mJ/OuykqxXqOQbUcxOQwuhcvr1F3vUpK 5sZK9Jp06VYYh9a2evEAZ6FsZnYWU9FkdPIdK6NN2lbPzxPxTS9ROP84ny91GDrI6k9ye2+dyn6 dCyuo3xhyylECRtk6uvOBN57sLRr0/rlhtPduklUF0pY0jJUrRYQA+fQ+IQ/dtCZlfVoQE5F/xW inkl/KjKjH4IPv7gQsgdCW+Z9D12RALZ/wrxNYU5n9HLk3wjKA86Y9D7ccNyVJKaZ6rq77h0MCp AC2ruoQrJPm4NOdGAAD2ByP7DpIkeWUucE0ySrd3838ygY/BkljPrcKB/0rot0YavoSUw== X-Received: by 2002:a05:600c:3b9e:b0:496:bbce:ef with SMTP id 5b1f17b1804b1-4994e7c3321mr217494125e9.3.1786185780722; Sat, 08 Aug 2026 03:43:00 -0700 (PDT) Received: from OrangePi5-Plus.BB-HOME (20014C4E1B8E20009911270F4BEC2300.dsl.pool.telekom.hu. [2001:4c4e:1b8e:2000:9911:270f:4bec:2300]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4800215078asm13324152f8f.12.2026.08.08.03.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2026 03:43:00 -0700 (PDT) From: Igor Paunovic To: dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Cc: Igor Paunovic , Cristian Ciocaltea , Heiko Stuebner , Andy Yan , Sandy Huang , Sebastian Reichel , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: drm/rockchip: vop2: ACLK_VOP pinned at 500 MHz starves DP 4K120 on RK3588 Date: Sat, 8 Aug 2026 12:42:29 +0200 Message-ID: <20260808104240.13776-1-royalnet026@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, On RK3588 the VOP2 AXI clock is pinned to 500 MHz by device tree and nothing in mainline ever raises it. For DisplayPort at 3840x2160@120 that is not enough bandwidth, and the failure is not graceful: the video port floods POST_BUF_EMPTY interrupts and the picture is corrupted. I mentioned this in passing when I sent a Tested-by for the dw-dp v11 series: https://lore.kernel.org/all/20260808094138.7205-1-royalnet026@gmail.com/ The pin is explicit. In arch/arm64/boot/dts/rockchip/rk3588-base.dtsi the cru node lists <&cru ACLK_VOP> in assigned-clocks with 500000000 in the matching position of assigned-clock-rates. It is a deliberate assignment rather than a boot default, and it is identical in mainline and in the Collabora rockchip-devel branch. The rate request does propagate. ACLK_VOP is registered as a gate with flags 0 in clk-rk3588.c, but drivers/clk/rockchip/clk.c adds CLK_SET_RATE_PARENT for every branch_gate, so a request on aclk_vop travels up through aclk_vop_sub_src (a mux carrying the same flag) to aclk_vop_root, which is a settable composite. What I measured, on an Orange Pi 5 Plus driving a DP monitor over USB-C Alt Mode at 3840x2160@120 (YCbCr 4:2:0, so dclk sits at 594 MHz), on drm-misc-next of 2026-08-07 (dc2f9f7fed1a) plus the dw-dp v11 and usbdp v13 series. I built with CLOCK_ALLOW_WRITE_DEBUGFS and changed the rate by writing aclk_vop_root's clk_rate in clock debugfs, one level up, which has the same effect. The mode was unchanged across all three phases, so dclk stayed at 594 MHz and the AXI rate was the only thing that moved: 500 MHz: vop2_isr reported ~594000 suppressed callbacks per 5 s, roughly 119k interrupts per second, all POST_BUF_EMPTY on the DP video port; picture unusable 750 MHz: no POST_BUF_EMPTY logged at all for 42 s, the whole phase; the picture became correct the moment the write landed 500 MHz: ~607000 suppressed callbacks per 5 s; broken again Both transitions are immediate, and the timestamps line up with the phases of my test script. Everything I can drive up to 2560x1440@144 (about 586 MHz pixel clock) stays clean at 500 MHz; 3840x2160@120 (1188 MHz) does not. That comparison comes from a mode sweep on my rockchip-devel based daily kernel rather than from the run above, and my monitor offers nothing in between, so I cannot bisect the threshold. In mainline rockchip_drm_vop2.c there is no clk_set_rate() on the VOP aclk at all; the only clk_set_rate() in the file is on vp->dclk. To reproduce: enable dp0 on an RK3588 board - it is disabled in the mainline DTS, so this needs a board DT change - drive a DP monitor at 3840x2160@120, and watch dmesg or the vop interrupt count in /proc/interrupts. The only code I know of that raises the rate is a commit in the Collabora rockchip-devel branch, "drm/rockchip: vop2: Scale ACLK rate up for RK3588 FRL display modes" by Cristian Ciocaltea. It defines a 750 MHz rate and calls clk_set_rate() from vop2_crtc_atomic_enable() and _disable(), gated on vcstate->frl_enabled with a refcount over the video ports. I could not find it on lore, but I may well have missed it. If that is the intended shape of the fix, DisplayPort still would not benefit: frl_enabled is set only by dw_hdmi_qp-rockchip.c, and neither dw-dp.c nor dw_dp-rockchip.c mentions FRL at all, so the condition is HDMI specific while the bandwidth problem is not. It also explains what I had been seeing since I enabled dp0 on this board last week: 4K120 over USB-C only worked while an HDMI output happened to be running in FRL mode. Raising the DT rate to 750 MHz unconditionally would be simpler, but it would cost power on boards that never drive such a mode, which is presumably the reason for making it dynamic. Cristian, Heiko - hence my question: should the ACLK rate be derived from the bandwidth the enabled video ports actually need, rather than from an HDMI-specific link flag? A per-video-port requirement combined with max() across the active ports would cover DP and HDMI under one rule and would not need a refcount. I am happy to prepare a patch along those lines if that is the right direction. Igor Paunovic