Claude review: drm: verisilicon: convert drm_format to vs_format in atomic_check

Claude Code Review Bot
2026-03-31T06:44:29Z

Overall Series Review

Subject: drm: verisilicon: convert drm_format to vs_format in atomic_check
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Patches: 6
Reviewed: 2026-03-31T16:44:29.302372

---

This is a well-structured 4-patch series that moves the `drm_format` to `vs_format` conversion from `atomic_update` (which cannot fail) to `atomic_check` (which can properly return errors). The series is on v4 and already has Reviewed-by tags from Thomas Zimmermann on all patches. The approach is correct and follows standard DRM patterns. The patches are logically ordered and each patch is self-contained.

One minor issue: in patch 3, passing `NULL` for `crtc_state` to `drm_atomic_helper_check_plane_state()` will trigger a `WARN_ON` inside that helper (line 907: `WARN_ON(plane_state->crtc && plane_state->crtc != crtc_state->crtc)`). However, since `crtc` is also NULL in that case, the dereference of `crtc_state->crtc` is guarded by the short-circuit evaluation of `plane_state->crtc` being NULL. And line 918 has `WARN_ON(!plane_state->crtc)` which fires but harmlessly returns `visible = false`. This is a known/accepted pattern — the helper itself handles the NULL crtc case (with a warning that `fb` without `crtc` is odd), and the real fix is ensuring `drm_atomic_helper_check_plane_state()` gets called at all for cleanup purposes.

Overall: **Looks good.** Series is ready for merge.