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: Introduce pending_hp to drm_connector Date: Wed, 18 Feb 2026 06:43:46 +1000 Message-ID: In-Reply-To: <20260217-hot-plug-passup-v7-1-f8221b2aab51@collabora.com> References: <20260217-hot-plug-passup-v7-0-f8221b2aab51@collabora.com> <20260217-hot-plug-passup-v7-1-f8221b2aab51@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 adds the `pending_hp` boolean to `drm_connector`, initializes it to false, and sets it to true wherever a connector status change is detected: the polling path, the HPD IRQ path, and the sysfs `status_store` path. It also clears `pending_hp` in both `drm_kms_helper_hotplug_event` and `drm_kms_helper_connector_hotplug_event` so it is reset when the event is actually sent. > + connector->pending_hp = false; Initialization in `drm_connector_init_only` is correct; `drm_connector` is often kzalloc'd so this would be zero anyway, but explicit initialization is fine for documentation purposes. > + mutex_lock(&dev->mode_config.mutex); > + drm_connector_list_iter_begin(dev, &conn_iter); > + drm_for_each_connector_iter(connector, &conn_iter) { > + connector->pending_hp = false; > + } > + drm_connector_list_iter_end(&conn_iter); > + mutex_unlock(&dev->mode_config.mutex); Clearing all connectors' `pending_hp` in `drm_kms_helper_hotplug_event` is appropriate -- this function sends a global event, so all pending per-connector notifications are subsumed. > + mutex_lock(&dev->mode_config.mutex); > + connector->pending_hp = false; > + mutex_unlock(&dev->mode_config.mutex); Clearing `pending_hp` in `drm_kms_helper_connector_hotplug_event` under the mutex is consistent. > connector->pending_hp = true; The `status_store` path in `drm_sysfs.c` sets `pending_hp = true` under `mode_config.mutex`, which is correct. However, `status_store` does not send a hotplug event itself -- it calls `fill_modes` and returns. Who consumes this `pending_hp`? Looking at the code, if polling is enabled, the next poll cycle will pick it up because `fill_modes` (which calls `drm_helper_probe_single_connector_modes`) will set `delayed_event = true` when it detects the status change, which schedules the poll worker. But as discussed in the patch 2 review, the `delayed_event` path has an issue with the new code. No other issues with patch 1. --- Generated by Claude Code Patch Reviewer