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-connector: Switch to using ->detect_ctx hook Date: Tue, 03 Mar 2026 12:42:54 +1000 Message-ID: In-Reply-To: <20260303-dw-hdmi-qp-scramb-v4-2-317d3b8bd219@collabora.com> References: <20260303-dw-hdmi-qp-scramb-v4-0-317d3b8bd219@collabora.com> <20260303-dw-hdmi-qp-scramb-v4-2-317d3b8bd219@collabora.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This patch removes `.detect` from `drm_bridge_connector_funcs` and adds `.detect_ctx` to the helper funcs. The conversion is straightforward. **Concern about removing .detect:** The old `drm_bridge_connector_detect` was assigned to `drm_connector_funcs.detect`. By removing it entirely, any code path that calls `connector->funcs->detect()` directly (rather than going through the helper framework) will now get a NULL function pointer. The helper framework (`drm_helper_probe_detect_ctx`) checks `detect_ctx` first, so that path works. But `drm_mode_getconnector()` (the ioctl handler) may have a direct `.detect` call path that should be verified. If the ioctl handler also goes through `drm_helper_probe_detect`, this is fine. The `drm_bridge_connector_get_modes_edid` change is correct: ```c - status = drm_bridge_connector_detect(connector, false); + status = drm_bridge_connector_detect_ctx(connector, NULL, false); ``` When ctx is NULL, `drm_bridge_detect_ctx` manages its own locking and never returns negative values, so assigning to the `enum drm_connector_status status` variable is safe. **Minor observation:** The `force` parameter from `detect_ctx(connector, ctx, force)` is received but never forwarded to `drm_bridge_detect_ctx`. This is consistent with the bridge-level detect hooks not having a `force` parameter, but it means bridges can never distinguish forced vs. polled detection. --- Generated by Claude Code Patch Reviewer