From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: renesas: rzg2l_mipi_dsi: Fix deassert/assert of CMN_RSTB signal
Date: Tue, 31 Mar 2026 17:20:06 +1000 [thread overview]
Message-ID: <review-patch3-20260330104450.128512-4-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20260330104450.128512-4-biju.das.jz@bp.renesas.com>
Patch Review
**Purpose**: Move `reset_control_deassert()` from `dphy_init` to after Link register writes in `startup()`, and move `reset_control_assert()` from `dphy_exit` to `stop()`, per the hardware manual requirement that CMN_RSTB deassertion happens after Link register configuration.
**Review**:
1. **`reset_control_deassert` moved correctly**: It now sits at the end of `rzg2l_mipi_dsi_startup()` after all the Link register writes (TXSETR, CLSTPTSETR, LPTRNSTSETR, DSISETR), which matches the hardware manual sequence. The `fsleep(1000)` from patch 2 follows it correctly.
2. **NULL check for `dsi->rstc`**: The guard `if (dsi->rstc)` in `rzg2l_mipi_dsi_startup()` is correct since `rstc` is obtained via `devm_reset_control_get_optional_exclusive()` and can be NULL for RZ/V2H.
3. **`reset_control_assert` in `rzg2l_mipi_dsi_stop()`**: The unconditional call:
```c
reset_control_assert(dsi->rstc);
```
is safe because `reset_control_assert(NULL)` is a no-op in the kernel reset framework. However, there's an **asymmetry** with the deassert path which does check `if (dsi->rstc)`. For consistency and clarity, it might be better to also wrap the assert in `if (dsi->rstc)`. This is a style nit, not a bug.
4. **Assert before dphy_exit**: The assert is placed before `dphy_exit()` in `stop()`, which is the reverse of the startup order (dphy_init then deassert). This is correct teardown ordering.
5. **Error path**: If `reset_control_deassert()` fails, the code jumps to `err_phy` which calls `dphy_exit()` and `pm_runtime_put()`. This is correct cleanup.
6. **Missing Fixes tag**: Unlike patches 1 and 2, this patch does not carry a Fixes tag or Cc: stable. If the incorrect ordering of CMN_RSTB relative to Link register writes is a hardware manual violation that could cause real issues, this arguably deserves a Fixes tag too. The cover letter implies this is also a correctness fix based on the same hardware manual section.
**Verdict**: Correct and well-structured. Minor style nit on the assert/deassert symmetry, and the missing Fixes tag should be considered.
---
**Summary**: The series is in good shape. The hardware manual references are clear, the changes are well-motivated, and the code is correct. The main actionable items are:
- Consider adding a Fixes tag to patch 3 if the CMN_RSTB ordering was causing real hardware issues
- Consider adding `if (dsi->rstc)` guard around `reset_control_assert()` in patch 3 for symmetry with the deassert path (cosmetic only, not a bug)
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-31 7:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 10:44 [PATCH v3 0/3] Improvements on RZ/G2L MIPI DSI driver Biju
2026-03-30 10:44 ` [PATCH v3 1/3] drm: renesas: rzg2l_mipi_dsi: Move rzg2l_mipi_dsi_set_display_timing() Biju
2026-03-31 7:20 ` Claude review: " Claude Code Review Bot
2026-03-30 10:44 ` [PATCH v3 2/3] drm: renesas: rzg2l_mipi_dsi: Increase reset deassertion delay Biju
2026-03-31 7:20 ` Claude review: " Claude Code Review Bot
2026-03-30 10:44 ` [PATCH v3 3/3] drm: renesas: rzg2l_mipi_dsi: Fix deassert/assert of CMN_RSTB signal Biju
2026-03-31 7:20 ` Claude Code Review Bot [this message]
2026-03-31 7:20 ` Claude review: Improvements on RZ/G2L MIPI DSI driver 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-patch3-20260330104450.128512-4-biju.das.jz@bp.renesas.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