From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-patch1-20260217-hot-plug-passup-v7-1-f8221b2aab51@collabora.com> (raw)
In-Reply-To: <20260217-hot-plug-passup-v7-1-f8221b2aab51@collabora.com>
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
next prev parent reply other threads:[~2026-02-17 20:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 19:00 [PATCH v7 0/2] Pass down hot-plug CONNECTOR ID to user-space Nicolas Frattaroli
2026-02-17 19:00 ` [PATCH v7 1/2] drm: Introduce pending_hp to drm_connector Nicolas Frattaroli
2026-02-17 20:43 ` Claude Code Review Bot [this message]
2026-02-17 19:00 ` [PATCH v7 2/2] drm: Send per-connector hotplug events Nicolas Frattaroli
2026-02-17 20:43 ` Claude review: " Claude Code Review Bot
2026-02-17 20:43 ` Claude review: Pass down hot-plug CONNECTOR ID to user-space Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260217-hot-plug-passup-v7-1-f8221b2aab51@collabora.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox