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: dw-hdmi-qp: Add HDMI 2.0 SCDC scrambling support Date: Thu, 04 Jun 2026 13:33:49 +1000 Message-ID: In-Reply-To: <20260602-dw-hdmi-qp-scramb-v7-14-445eb54ee1ed@collabora.com> References: <20260602-dw-hdmi-qp-scramb-v7-0-445eb54ee1ed@collabora.com> <20260602-dw-hdmi-qp-scramb-v7-14-445eb54ee1ed@collabora.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 **`curr_conn` pointer lifetime:** A `struct drm_connector *curr_conn` point= er is stored in `struct dw_hdmi_qp` and set during `atomic_enable`, cleared= during `atomic_disable`. It's read from `dw_hdmi_qp_hpd_notify()` (patch 1= 5) which runs from a threaded IRQ/work context. There is no explicit lock p= rotecting this pointer. The modeset path serializes enable/disable, but HPD= events are asynchronous. If an HPD event fires during a modeset (between t= he connector being torn down and `curr_conn` being set to NULL), there coul= d be a use-after-free or stale pointer access. In practice, the `IRQF_NO_AU= TOEN` + `hpd_enable/disable` gating (patch 19) should prevent this, but doc= umenting this invariant (or adding a barrier) would be worthwhile. **Scrambling before PHY init:** `drm_scdc_start_scrambling()` is called bef= ore `hdmi->phy.ops->init()`. This order is correct per HDMI 2.0 =E2=80=94 S= CDC should be configured before TMDS transmission starts =E2=80=94 but it's= non-obvious and worth a one-line comment explaining the sequencing. **`atomic_disable` early return:** ```c if (!hdmi->curr_conn) return; ``` This silently skips PHY disable if `curr_conn` is NULL. If `atomic_enable` = failed early (before setting `curr_conn`), this could leave the PHY in an i= nconsistent state. The `WARN_ON(!hdmi->curr_conn)` in `atomic_enable` shoul= d prevent this path, but the disable side could use a matching `WARN_ON`. --- Generated by Claude Code Patch Reviewer