From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/rockchip: dw_hdmi: Hold a reference to the dw-hdmi bridge
Date: Sat, 16 May 2026 16:14:39 +1000 [thread overview]
Message-ID: <review-patch5-20260510183114.1248840-6-jonas@kwiboo.se> (raw)
In-Reply-To: <20260510183114.1248840-6-jonas@kwiboo.se>
Patch Review
**Status: Minor concern**
This adds `of_drm_find_and_get_bridge(np)` after `dw_hdmi_bind()` succeeds and calls `drm_bridge_put()` in unbind. The purpose is to hold a reference on the bridge for the lifetime of the encoder component.
**Concern**: The error path calls `dw_hdmi_remove(hdmi->hdmi)` on bridge lookup failure, but the bind function called `dw_hdmi_bind()` above. I'd expect `dw_hdmi_unbind()` to be used here for symmetry, matching what the `unbind` function does. Let me check:
```c
hdmi->bridge = of_drm_find_and_get_bridge(np);
if (!hdmi->bridge) {
dw_hdmi_remove(hdmi->hdmi);
return dev_err_probe(dev, -ENODEV,
"failed to find bridge\n");
}
```
The use of `dw_hdmi_remove()` vs `dw_hdmi_unbind()` may be intentional if the APIs differ, but it's worth the author confirming this is the right teardown function. The `unbind` path uses `dw_hdmi_unbind()`.
Also, `of_drm_find_and_get_bridge(np)` searches for a bridge associated with the device node. After `dw_hdmi_bind()` registers the bridge, this should find it. But the check `if (!hdmi->bridge)` only checks for NULL -- `of_drm_find_and_get_bridge` could also return an `ERR_PTR`. Checking the API: looking at the header, it returns `struct drm_bridge *` which can be NULL or ERR_PTR, so `IS_ERR_OR_NULL()` would be safer.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 6:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 18:31 [PATCH 00/10] drm/rockchip: dw_hdmi: Misc cleanup and propagate bus format Jonas Karlman
2026-05-10 18:31 ` [PATCH 01/10] drm/rockchip: dw_hdmi: Use of_device_get_match_data() to get match data Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 02/10] drm/rockchip: dw_hdmi: Use local dev variable consistently in bind() Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 03/10] drm/rockchip: dw_hdmi: Use drmres helpers for encoder resources Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 04/10] drm/rockchip: dw_hdmi: Inline resource lookup into bind() Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 05/10] drm/rockchip: dw_hdmi: Hold a reference to the dw-hdmi bridge Jonas Karlman
2026-05-16 6:14 ` Claude Code Review Bot [this message]
2026-05-10 18:31 ` [PATCH 06/10] drm/rockchip: dw_hdmi: Remove empty encoder helper funcs Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 07/10] drm/rockchip: dw_hdmi: Clean up whitespace Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 08/10] drm/rockchip: dw_hdmi: Set output_port for RK3568/RK3566 Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 09/10] drm/rockchip: dw_hdmi: Configure HDMI PHY in atomic_mode_set() Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-10 18:31 ` [PATCH 10/10] drm/rockchip: dw_hdmi: Propagate bus format to display driver Jonas Karlman
2026-05-16 6:14 ` Claude review: " Claude Code Review Bot
2026-05-16 6:14 ` Claude review: drm/rockchip: dw_hdmi: Misc cleanup and propagate bus format 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-patch5-20260510183114.1248840-6-jonas@kwiboo.se \
--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