From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/rockchip: vop2: Wait for layer cfg done before switching LAYERSEL_REGDONE_SEL
Date: Tue, 05 May 2026 08:08:45 +1000 [thread overview]
Message-ID: <review-patch2-20260504-vop2-layer-cfg-tmout-v1-2-730226a7331e@collabora.com> (raw)
In-Reply-To: <20260504-vop2-layer-cfg-tmout-v1-2-730226a7331e@collabora.com>
Patch Review
**Verdict: Good fix, correct.**
This patch reorders the operations so that:
1. **First**: wait for the previous VP's layer config to latch (the wait needs the old VP's vsync to fire)
2. **Then**: write RK3568_OVL_CTRL with LAYERSEL_REGDONE_SEL set to the current VP
3. **Then**: handle port_sel changes
Before this patch, LAYERSEL_REGDONE_SEL was switched to the current VP *before* the wait, meaning the previous VP's vsync could no longer trigger the shadow register latch — a classic ordering bug.
The moved block:
```c
if (layer_sel != old_layer_sel || port_sel != old_port_sel)
ovl_ctrl |= FIELD_PREP(RK3568_OVL_CTRL__LAYERSEL_REGDONE_SEL, vp->id);
vop2_writel(vop2, RK3568_OVL_CTRL, ovl_ctrl);
if (port_sel != old_port_sel) {
vop2_writel(vop2, RK3568_OVL_PORT_SEL, port_sel);
vop2_cfg_done(vp);
rk3568_vop2_wait_for_port_mux_done(vop2);
}
```
now appears *after* the layer cfg done wait, which is correct.
Note: the `vop2_writel(vop2, RK3568_OVL_CTRL, ovl_ctrl)` is unconditional (always writes ovl_ctrl even when LAYERSEL_REGDONE_SEL is not set). This was the same before the patch so it's not a regression — but it means we always write OVL_CTRL even in the no-change case. Not a bug, just an observation about pre-existing behavior.
No issues.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-04 22:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 18:23 [PATCH 0/5] drm/rockchip: vop2: Fix layer cfg done timeout on multi-output setups Cristian Ciocaltea
2026-05-04 18:23 ` [PATCH 1/5] drm/rockchip: vop2: Fix wrong wait target in layer cfg done check Cristian Ciocaltea
2026-05-04 22:08 ` Claude review: " Claude Code Review Bot
2026-05-04 18:24 ` [PATCH 2/5] drm/rockchip: vop2: Wait for layer cfg done before switching LAYERSEL_REGDONE_SEL Cristian Ciocaltea
2026-05-04 22:08 ` Claude Code Review Bot [this message]
2026-05-04 18:24 ` [PATCH 3/5] drm/rockchip: vop2: Delay old_{layer|port}_sel updates in setup_layer_mixer() Cristian Ciocaltea
2026-05-04 22:08 ` Claude review: " Claude Code Review Bot
2026-05-04 18:24 ` [PATCH 4/5] drm/rockchip: vop2: Drop redundant zero-init " Cristian Ciocaltea
2026-05-04 22:08 ` Claude review: " Claude Code Review Bot
2026-05-04 18:24 ` [PATCH 5/5] drm/rockchip: vop2: Use vop2->old_layer_sel directly in wait_for_layer_cfg_done() Cristian Ciocaltea
2026-05-04 22:08 ` Claude review: " Claude Code Review Bot
2026-05-04 22:08 ` Claude review: drm/rockchip: vop2: Fix layer cfg done timeout on multi-output setups Claude Code Review Bot
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=review-patch2-20260504-vop2-layer-cfg-tmout-v1-2-730226a7331e@collabora.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.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