From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/bridge: display-connector: don't autoenable HPD IRQ Date: Sat, 16 May 2026 11:28:16 +1000 Message-ID: In-Reply-To: <20260513-dp-connector-hpd-v2-1-42f757bfcbf9@oss.qualcomm.com> References: <20260513-dp-connector-hpd-v2-0-42f757bfcbf9@oss.qualcomm.com> <20260513-dp-connector-hpd-v2-1-42f757bfcbf9@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Purpose:** Prevent the HPD IRQ from firing before the DRM connector is fu= lly set up by using `IRQF_NO_AUTOEN` and controlling enablement via `hpd_en= able`/`hpd_disable` bridge callbacks. **Analysis:** The change is straightforward and correct. Adding `IRQF_NO_AUTOEN` to `devm= _request_threaded_irq()`: ```c IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN | IRQF_ONESHOT, ``` ensures the IRQ starts disabled. The new callbacks: ```c static void display_connector_hpd_enable(struct drm_bridge *bridge) { struct display_connector *conn =3D to_display_connector(bridge); enable_irq(conn->hpd_irq); } static void display_connector_hpd_disable(struct drm_bridge *bridge) { struct display_connector *conn =3D to_display_connector(bridge); disable_irq(conn->hpd_irq); } ``` are only invoked when `DRM_BRIDGE_OP_HPD` is set in `bridge->ops`, which on= ly happens when `conn->hpd_irq >=3D 0` (line 413-414), so `conn->hpd_irq` i= s always valid when these callbacks run. The `enable_irq`/`disable_irq` are called under `bridge->hpd_mutex` (held b= y `drm_bridge_hpd_enable`/`drm_bridge_hpd_disable`). If a threaded IRQ fire= s immediately after `enable_irq()` and calls `drm_bridge_hpd_notify()`, tha= t will block on the mutex in a separate thread context =E2=80=94 no deadloc= k, just a brief wait. The callback `hpd_cb` is already set before `hpd_enab= le` is called (drm_bridge.c:1459-1460), so the notification will be properl= y delivered. The Fixes tag referencing the original commit that introduced the driver is= appropriate. **No issues found.** --- --- Generated by Claude Code Patch Reviewer