From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: Add ->detect_ctx hook and drm_bridge_detect_ctx()
Date: Tue, 03 Mar 2026 12:42:54 +1000 [thread overview]
Message-ID: <review-patch1-20260303-dw-hdmi-qp-scramb-v4-1-317d3b8bd219@collabora.com> (raw)
In-Reply-To: <20260303-dw-hdmi-qp-scramb-v4-1-317d3b8bd219@collabora.com>
Patch Review
This patch adds the atomic variant of `drm_bridge_funcs.detect()` and a new `drm_bridge_detect_ctx()` helper. The implementation is clean and follows the established patterns from the connector-level `detect_ctx`.
**Looks good.** A few observations:
The fallback path when `detect_ctx` is NULL but `detect` exists is correct:
```c
return bridge->funcs->detect(bridge, connector);
```
The self-managed locking path (ctx == NULL) properly handles EDEADLK:
```c
drm_modeset_acquire_init(&br_ctx, 0);
retry:
ret = drm_modeset_lock(&connector->dev->mode_config.connection_mutex, &br_ctx);
if (!ret)
ret = bridge->funcs->detect_ctx(bridge, connector, &br_ctx);
if (ret == -EDEADLK) {
drm_modeset_backoff(&br_ctx);
goto retry;
}
```
The conversion of negative errors to `connector_status_unknown` is appropriate:
```c
if (ret < 0)
ret = connector_status_unknown;
```
**Minor doc nit:** The doc says "If @ctx is set, it might also return -EDEADLK" — but when ctx is passed through directly to `detect_ctx`, the callback could return *any* negative error, not just -EDEADLK. The caller would see all of them. This is handled correctly in practice (patch 2's `drm_bridge_connector_detect_ctx` checks `ret < 0`), but the doc could be more precise.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-03 2:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 1:38 [PATCH v4 0/4] Add HDMI 2.0 support to DW HDMI QP TX Cristian Ciocaltea
2026-03-03 1:38 ` [PATCH v4 1/4] drm/bridge: Add ->detect_ctx hook and drm_bridge_detect_ctx() Cristian Ciocaltea
2026-03-03 2:42 ` Claude Code Review Bot [this message]
2026-03-03 1:38 ` [PATCH v4 2/4] drm/bridge-connector: Switch to using ->detect_ctx hook Cristian Ciocaltea
2026-03-03 2:42 ` Claude review: " Claude Code Review Bot
2026-03-03 1:38 ` [PATCH v4 3/4] drm/bridge: dw-hdmi-qp: Add high TMDS clock ratio and scrambling support Cristian Ciocaltea
2026-03-03 2:42 ` Claude review: " Claude Code Review Bot
2026-03-03 1:38 ` [PATCH v4 4/4] drm/rockchip: dw_hdmi_qp: Do not send HPD events for all connectors Cristian Ciocaltea
2026-03-03 2:42 ` Claude review: " Claude Code Review Bot
2026-03-03 2:42 ` Claude review: Add HDMI 2.0 support to DW HDMI QP TX Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-23 17:45 [PATCH RESEND v4 0/4] " Cristian Ciocaltea
2026-03-23 17:45 ` [PATCH RESEND v4 1/4] drm/bridge: Add ->detect_ctx hook and drm_bridge_detect_ctx() Cristian Ciocaltea
2026-03-24 21:36 ` Claude review: " 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-patch1-20260303-dw-hdmi-qp-scramb-v4-1-317d3b8bd219@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