From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: display-connector: don't autoenable HPD IRQ
Date: Mon, 16 Mar 2026 12:14:39 +1000 [thread overview]
Message-ID: <review-patch1-20260314-dp-connector-hpd-v1-1-786044cedc17@oss.qualcomm.com> (raw)
In-Reply-To: <20260314-dp-connector-hpd-v1-1-786044cedc17@oss.qualcomm.com>
Patch Review
This patch adds `IRQF_NO_AUTOEN` to the IRQ request flags and implements `hpd_enable`/`hpd_disable` callbacks that call `enable_irq()`/`disable_irq()`.
**Looks correct.** The `hpd_enable`/`hpd_disable` callbacks are the intended mechanism per the `drm_bridge_funcs` documentation: bridges that set `DRM_BRIDGE_OP_HPD` should implement these. Using `IRQF_NO_AUTOEN` prevents the IRQ from firing before the DRM connector is fully set up, which is the bug being fixed.
One minor observation:
- The `hpd_enable`/`hpd_disable` callbacks are unconditionally wired into `display_connector_bridge_funcs`, but `conn->hpd_irq` is only valid (>= 0) when an HPD GPIO with IRQ capability was found. If `hpd_irq` is `-EINVAL` (no HPD GPIO, or IRQ request failed), calling `enable_irq(-EINVAL)` / `disable_irq(-EINVAL)` would be invalid. However, in practice, the `hpd_enable` callback is only invoked by `drm_bridge_hpd_enable()` when `DRM_BRIDGE_OP_HPD` is set in `bridge->ops`, and `DRM_BRIDGE_OP_HPD` is only set when `conn->hpd_irq >= 0`. So this is safe by design, but adding a guard like:
```c
if (conn->hpd_irq < 0)
return;
```
would be defensive and make the contract clearer. Not strictly necessary though.
**Fixes tag looks appropriate** – the original commit introduced the auto-enabled IRQ.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-16 2:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 0:43 [PATCH 0/2] drm/bridge: display-connector: detect DP state if cable is plugged on boot Dmitry Baryshkov
2026-03-14 0:43 ` [PATCH 1/2] drm/bridge: display-connector: don't autoenable HPD IRQ Dmitry Baryshkov
2026-03-16 2:14 ` Claude Code Review Bot [this message]
2026-03-14 0:43 ` [PATCH 2/2] drm/bridge: display-connector: trigger initial HPD event for DP Dmitry Baryshkov
2026-03-16 2:14 ` Claude review: " Claude Code Review Bot
2026-03-16 2:14 ` Claude review: drm/bridge: display-connector: detect DP state if cable is plugged on boot 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-20260314-dp-connector-hpd-v1-1-786044cedc17@oss.qualcomm.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