From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/i915/dp: Clear accumulated HPD events after link training
Date: Sun, 12 Apr 2026 12:53:17 +1000 [thread overview]
Message-ID: <review-patch1-20260408084509.555045-1-acelan.kao@canonical.com> (raw)
In-Reply-To: <20260408084509.555045-1-acelan.kao@canonical.com>
Patch Review
**Correctness:**
The block/unblock pairing is correct:
- `intel_dp_start_link_train()` calls `intel_hpd_block(encoder)` at line 1655
- `intel_dp_stop_link_train()` calls the unblock at line 1155
The change from `intel_hpd_unblock()` (which calls `queue_work_for_missed_irqs()` to replay accumulated events) to `intel_hpd_clear_and_unblock()` (which clears `event_bits`, `retry_bits`, `short_hpd_pin_mask`, and `long_hpd_pin_mask`) is the right approach. The cleared events genuinely are stale — they were generated during link training and reflect pre-retrain link status.
**Safety net:**
The commit message correctly identifies that the safety net exists at lines 1157-1162:
```c
if (!display->hotplug.ignore_long_hpd &&
intel_dp->link.seq_train_failures < MAX_SEQ_TRAIN_FAILURES) {
int delay_ms = intel_dp->link.seq_train_failures ? 0 : 2000;
intel_encoder_link_check_queue_work(encoder, delay_ms);
}
```
This queues a link check after 2 seconds (on first success), which will catch any legitimate link degradation post-retrain. Any *new* HPD events arriving after the unblock are processed normally through the standard path.
**Minor observation:**
The commit message could benefit from a `Fixes:` or `Cc: stable@` tag if this is intended for backporting, given that it fixes a GPU hard lockup. The commit that introduced `intel_hpd_block()`/`intel_hpd_unblock()` in the link training path would be the appropriate `Fixes:` target. This doesn't affect the code quality, but would help with stable kernel backporting.
**Overall:** Clean, minimal, correct fix. The commit message is well-written and explains both the problem (stale HPD burst racing with modeset) and why the fix is safe (events are stale + link check safety net).
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-12 2:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 8:45 [PATCH] drm/i915/dp: Clear accumulated HPD events after link training Chia-Lin Kao (AceLan)
2026-04-12 2:53 ` Claude Code Review Bot [this message]
2026-04-12 2:53 ` Claude review: " 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-20260408084509.555045-1-acelan.kao@canonical.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