Claude review: drm: renesas: rzg2l_mipi_dsi: Move rzg2l_mipi_dsi_set_display_timing()

Claude Code Review Bot
2026-03-31T07:20:05Z

Patch Review

**Purpose**: Move `rzg2l_mipi_dsi_set_display_timing()` from `atomic_pre_enable` to `atomic_enable`, placing it after `rzg2l_mipi_dsi_start_hs_clock()` per the hardware manual requirement.

**Review**:

The move itself is correct — display timings are now set after HS clock start in `atomic_enable`, which matches the hardware manual.

Minor observations:

1. **Dropped error handling on `rzg2l_mipi_dsi_startup()`**: The original code had:
```c
ret = rzg2l_mipi_dsi_startup(dsi, mode);
if (ret < 0)
return;
```
After the patch, it's simply:
```c
rzg2l_mipi_dsi_startup(dsi, mode);
```
Since `atomic_pre_enable` returns void, the old code just silently returned on error anyway (no error propagation). Dropping the check is arguably cleaner, but if `rzg2l_mipi_dsi_startup()` fails, `atomic_enable` will still proceed to call `rzg2l_mipi_dsi_start_hs_clock()` on an uninitialized PHY. Consider at minimum logging an error, or saving the error state so `atomic_enable` can bail out early. This is a pre-existing issue, not introduced by this patch.

2. **Duplicated connector/crtc/mode lookup**: The mode is looked up in both `atomic_pre_enable` and `atomic_enable` now. This is unavoidable given the bridge callback split, so it's fine, but the mode could alternatively be cached in `struct rzg2l_mipi_dsi` during `pre_enable` to avoid the repetition. Not a blocker.

3. The Fixes tags look correct, targeting the commits that introduced `atomic_pre_enable` and the original driver.

**Verdict**: Looks good. The hardware manual motivation is clear and the change is correct.