From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init()
Date: Tue, 10 Mar 2026 11:47:02 +1000 [thread overview]
Message-ID: <review-patch6-20260310-drm-rk-fixes-v2-6-645ecfb43f49@collabora.com> (raw)
In-Reply-To: <20260310-drm-rk-fixes-v2-6-645ecfb43f49@collabora.com>
Patch Review
**Verdict: Good, one ordering note**
This patch does two things: (1) switches the struct allocation to `drmm_kzalloc()` (same fix as patches 1/2), and (2) replaces `drm_simple_encoder_init()` with `drmm_encoder_init()`, which also allows removing the explicit `drm_encoder_cleanup()` call from `unbind`.
One observation: In the patched code, `drm_encoder_helper_add()` is called *before* `drmm_encoder_init()`:
```c
drm_encoder_helper_add(encoder, &dw_hdmi_qp_rockchip_encoder_helper_funcs);
ret = drmm_encoder_init(drm, encoder, NULL, DRM_MODE_ENCODER_TMDS, NULL);
```
This is technically fine since `drm_encoder_helper_add()` just sets `encoder->helper_private` which doesn't require the encoder to be registered with the DRM core. However, the existing `dw_dp-rockchip.c` does it in the opposite order (init first, helper_add second), which is the more conventional ordering. Consider swapping these two lines for consistency, though it's not a correctness issue.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-10 1:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 22:44 [PATCH v2 0/8] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
2026-03-09 22:44 ` [PATCH v2 1/8] drm/rockchip: inno-hdmi: Switch to drmm_kzalloc() Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 2/8] drm/rockchip: dw_dp: " Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 3/8] drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove() Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 4/8] drm/rockchip: dw_dp: Simplify error handling Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 5/8] drm/rockchip: dw_dp: Drop unnecessary #include Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 6/8] drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init() Cristian Ciocaltea
2026-03-10 1:47 ` Claude Code Review Bot [this message]
2026-03-09 22:44 ` [PATCH v2 7/8] drm/bridge: synopsys: dw-dp: Unregister AUX channel on bridge detach Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-09 22:44 ` [PATCH v2 8/8] drm/bridge: synopsys: dw-dp: Drop useless memory allocation Cristian Ciocaltea
2026-03-10 1:47 ` Claude review: " Claude Code Review Bot
2026-03-10 1:47 ` Claude review: Rockchip DRM use-after-free & null-ptr-deref fixes 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-patch6-20260310-drm-rk-fixes-v2-6-645ecfb43f49@collabora.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