Claude review: drm: verisilicon: call atomic helper's plane state check even if no CRTC

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

Patch Review

**Status: Good, with note**

Removes the early `return 0` when `!crtc` and instead passes `NULL` as `crtc_state` to `drm_atomic_helper_check_plane_state()`. Looking at the helper implementation, when `crtc` is NULL:
- Line 907: `WARN_ON(plane_state->crtc && ...)` — short-circuits since `plane_state->crtc` is NULL, no NULL deref.
- Line 912-915: If `!fb`, sets `visible = false` and returns 0.
- Line 918-921: If `!plane_state->crtc` (and fb is set), fires `WARN_ON` and sets `visible = false`.

So this is safe. The key benefit is that `plane_state->visible` and `plane_state->src`/`dst` get properly initialized even when the plane is being disabled, which is important for correctness. The `Fixes` tag is appropriate.

Also removes the `WARN_ON(!crtc_state)` after `drm_atomic_get_new_crtc_state()` — this is fine since that condition would indicate a framework bug and the helper already has its own warnings.