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: Use delayed_work to debounce hotplug event Date: Mon, 18 May 2026 16:41:49 +1000 Message-ID: In-Reply-To: <20260516183838.2024991-19-jonas@kwiboo.se> References: <20260516183838.2024991-1-jonas@kwiboo.se> <20260516183838.2024991-19-jonas@kwiboo.se> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Status:** Well-implemented, a few observations. Uses `enable_delayed_work`/`disable_delayed_work` APIs to gate HPD work on attach/detach lifecycle: ```c +#define HOTPLUG_DEBOUNCE_MS 1100 ``` The 1100ms debounce matches other kernel drivers. The `hpd_work` calls `drm_helper_hpd_irq_event()` instead of `drm_bridge_hpd_notify()` to avoid the deadlock explained in the comment. The `dw_hdmi_remove()` properly disables the IRQ before canceling work: ```c + hdmi_writeb(hdmi, ~0, HDMI_PHY_MASK0); + devm_free_irq(hdmi->dev, irq, hdmi); + cancel_delayed_work_sync(&hdmi->hpd_work); ``` **Minor note:** `INIT_DELAYED_WORK` followed immediately by `disable_delayed_work` is fine -- it ensures the work is disabled by default until `enable_hpd`/`hpd_enable` is called. --- Generated by Claude Code Patch Reviewer