From: Tim Surber <me@timsurber.de>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
Heiko Stuebner <heiko@sntech.de>
Cc: Sandy Huang <hjc@rock-chips.com>, Andy Yan <andyshrk@163.com>,
Andy Yan <andy.yan@rock-chips.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Daniel Stone <daniel@fooishbar.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
Igor Paunovic <royalnet026@gmail.com>,
kernel@collabora.com, dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 07/15] drm/rockchip: vop2: Reset AXI and DCLK to improve robustness
Date: Sat, 21 Nov 2026 03:31:18 +0100 [thread overview]
Message-ID: <20261121023139.3515640-1-me@timsurber.de> (raw)
In-Reply-To: <20261105-dw-hdmi-qp-yuv-v6-7-1bb63ef5766e@collabora.com>
Hi Cristian,
On Thu, 05 Nov 2026 03:00:41 +0200, Cristian Ciocaltea wrote:
> @@ -953,6 +974,8 @@ static int vop2_enable(struct vop2 *vop2)
>
> static void vop2_disable(struct vop2 *vop2)
> {
> + vop2_reset_assert_deassert(vop2, vop2->axi_rst);
> +
> rockchip_drm_dma_detach_device(vop2->drm, vop2->dev);
with this patch my RK3588 board (FriendlyElec
CM3588) hangs hard sometimes when the last CRTC is switched off. Without the series
or with the AXI reset in vop2_disable() removed it does not happen.
Here is a minimal reproducer, run as root, with a display on HDMI and fbcon on it:
python3 - <<'EOF' &
import fcntl, os, struct
fd = os.open("/dev/dri/by-path/platform-display-subsystem-card", os.O_RDWR)
try:
fcntl.ioctl(fd, 0x641F) # DRM_IOCTL_DROP_MASTER: leave KMS to fbcon
except OSError:
pass
while True:
b = bytearray(struct.pack("6IQ", 2160, 3840, 32, 0, 0, 0, 0))
fcntl.ioctl(fd, 0xC02064B2, b) # DRM_IOCTL_MODE_CREATE_DUMB
handle = struct.unpack("6IQ", b)[4]
fcntl.ioctl(fd, 0xC00464B4, struct.pack("I", handle)) # DRM_IOCTL_MODE_DESTROY_DUMB
EOF
while :; do
echo 4 > /sys/class/graphics/fb0/blank; sleep 0.3
echo 0 > /sys/class/graphics/fb0/blank; sleep 0.7
done
This hangs the board within a few blank cycles. In
practice I hit it when a KMS application exits: it frees its buffers
while fbcon takes the display back with a full modeset.
This issue can be fixed for me by moving vop2_reset_assert_deassert(vop2, vop2->axi_rst) from vop2_disable to vop2_enable.
--8<--
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -913,6 +913,9 @@ static int vop2_enable(struct vop2 *vop2)
if (ret)
goto err_put_pm;
+ /* Reset while idle; doing it in vop2_disable() can hang the SoC */
+ vop2_reset_assert_deassert(vop2, vop2->axi_rst);
+
ret = rockchip_drm_dma_attach_device(vop2->drm, vop2->dev);
if (ret) {
drm_err(vop2->drm, "failed to attach dma mapping: %d\n", ret);
@@ -973,8 +976,6 @@ static int vop2_enable(struct vop2 *vop2)
static void vop2_disable(struct vop2 *vop2)
{
- vop2_reset_assert_deassert(vop2, vop2->axi_rst);
-
rockchip_drm_dma_detach_device(vop2->drm, vop2->dev);
regcache_drop_region(vop2->map, 0, vop2_regmap_config.max_register);
-->8--
Does that work for the cases the reset was added for (the RGB <-> YUV420
switch glitches and the DSI panel on the EVB1)? I can't test those here.
Thanks,
Tim
next prev parent reply other threads:[~2026-11-21 2:32 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 1:00 [PATCH v6 00/15] Support 10-bit YUV422 and 8/10-bit YUV420 color format on DW HDMI QP Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 01/15] dt-bindings: display: vop2: Add missing reset properties Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 02/15] drm/rockchip: vop2: Fix resource leak on vop2_enable() error path Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 03/15] drm/rockchip: vop2: Disable core clocks before dropping runtime PM reference Cristian Ciocaltea
2026-11-05 11:43 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 04/15] drm/rockchip: vop2: Balance state on atomic_enable() error paths Cristian Ciocaltea
2026-11-05 12:24 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 05/15] drm/rockchip: vop2: Avoid division by zero when computing max_dclk Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 06/15] drm/rockchip: vop2: Fix VOP2_MAX_DCLK_RATE overflow on 32-bit Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 07/15] drm/rockchip: vop2: Reset AXI and DCLK to improve robustness Cristian Ciocaltea
2026-11-21 2:31 ` Tim Surber [this message]
2026-11-05 1:00 ` [PATCH v6 08/15] drm/rockchip: vop2: Consolidate HDMI PHY PLL clock parent switch Cristian Ciocaltea
2026-11-05 12:18 ` Daniel Stone
2026-11-05 12:56 ` Cristian Ciocaltea
2026-11-05 14:33 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 09/15] drm/rockchip: vop2: Use TMDS character rate to select DCLK source Cristian Ciocaltea
2026-11-05 14:35 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 10/15] drm/rockchip: vop2: Switch to enum vop_csc_format Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 11/15] drm/bridge: dw-hdmi-qp: Log resolution and refresh rate in atomic_enable() Cristian Ciocaltea
2026-11-05 1:00 ` [PATCH v6 12/15] drm/rockchip: dw_hdmi_qp: Do not mask error code in atomic_check() Cristian Ciocaltea
2026-11-05 11:55 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 13/15] drm/rockchip: dw_hdmi_qp: Support 10-bit YUV422 output format Cristian Ciocaltea
2026-11-05 12:08 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 14/15] drm/rockchip: dw_hdmi_qp: Enable YUV420 " Cristian Ciocaltea
2026-11-05 12:09 ` Daniel Stone
2026-11-05 1:00 ` [PATCH v6 15/15] arm64: dts: rockchip: Add RK3588 VOP2 resets Cristian Ciocaltea
2026-11-05 12:25 ` [PATCH v6 00/15] Support 10-bit YUV422 and 8/10-bit YUV420 color format on DW HDMI QP Daniel Stone
2026-11-05 13:04 ` Cristian Ciocaltea
2026-11-05 13:22 ` Heiko Stübner
2026-11-05 14:36 ` Daniel Stone
2026-11-05 14:35 ` Daniel Stone
2026-11-06 12:27 ` (subset) " Heiko Stuebner
2026-11-06 12:28 ` Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261121023139.3515640-1-me@timsurber.de \
--to=me@timsurber.de \
--cc=andy.yan@rock-chips.com \
--cc=andyshrk@163.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=royalnet026@gmail.com \
--cc=sebastian.reichel@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox