Claude review: drm/i915/display: Switch to managed for encoder

Claude Code Review Bot
2026-04-12T00:51:25Z

Patch Review

The conversion to `drmm_encoder_alloc()` / `drmm_encoder_init()` / `drmm_kzalloc()` is correct. The use of `drmm_add_action_or_reset()` for encoder-specific cleanup (DP flush work, TypeC port cleanup, SDVO i2c cleanup, DVO device ops) is appropriate.

**Issue:** Several error paths in this patch drop `kfree(intel_connector)` calls (e.g., in `g4x_dp.c` and `g4x_hdmi.c`) without connectors being managed yet. Connectors don't become managed until patch 8. If this patch is applied without patch 8 and an error occurs during init, the connector allocation will leak. These two patches should either be squashed or the connector cleanup should be retained in patch 7.

---
Generated by Claude Code Patch Reviewer