From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: dw-hdmi-qp: use drm_hdmi_acr_get_n_cts() helper for audio N/CTS
Date: Mon, 25 May 2026 20:47:24 +1000 [thread overview]
Message-ID: <review-patch1-86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz> (raw)
In-Reply-To: <86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz>
Patch Review
**Correctness: Good**
The conversion is straightforward and correct. The call site at line 255:
```c
drm_hdmi_acr_get_n_cts(tmds_char_rate, sample_rate, &n, &cts);
```
replaces the two separate calls:
```c
n = dw_hdmi_qp_find_n(hdmi, tmds_char_rate, sample_rate);
cts = dw_hdmi_qp_find_cts(hdmi, tmds_char_rate, sample_rate);
```
The helper always returns a non-zero CTS (it has a `DIV_ROUND_CLOSEST_ULL` fallback at line 421-422 of `drm_hdmi_helper.c` for any entry where `cts == 0`), which means `dw_hdmi_qp_set_cts_n()` will now always take the `AUDPKT_ACR_CTS_OVR_EN` path (line 125-127) — i.e., software-override CTS rather than hardware auto-measurement. This is the behavioral fix: the old code returned `cts = 0` for out-of-table TMDS rates, disabling CTS override and relying on the controller's broken auto-measurement.
**Type compatibility: Good**
The function parameter `tmds_char_rate` is declared `unsigned long long` in `dw_hdmi_qp_set_sample_rate()`, matching the helper's signature (`unsigned long long tmds_char_rate`). The struct field `hdmi->tmds_char_rate` is `unsigned long` (line 88) which is implicitly widened at the call site (line 291) — no truncation risk.
**Include: Already present**
`<drm/display/drm_hdmi_helper.h>` is already included at line 21, so no additional include is needed.
**Behavioral subtlety worth noting (not a bug):**
The removed open-coded N table had optimized N values for many non-CEA TMDS rates (28.32–162 MHz). For those rates, the helper falls back to `N = 128 * Fs / 1000`, which is the HDMI 1.4b recommended default — functionally correct but may produce slightly different jitter characteristics than the removed optimized values. The commit message acknowledges this explicitly and states no regression was observed. This is acceptable.
**Commit message quality: Excellent**
The commit message is thorough: it explains the root cause (CTS=0 at out-of-table rates), the fix mechanism, testing matrix with four TMDS rates, and the behavioral trade-off for non-CEA N values. The `Assisted-by: Claude:claude-opus-4-7` trailer follows `Documentation/process/coding-assistants.rst`. All tags (Reported-by, Closes, Suggested-by, Tested-by, Signed-off-by) are present and well-formed.
**No issues found. Patch is ready to merge.**
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-05-25 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 7:36 [PATCH v3] drm/bridge: dw-hdmi-qp: use drm_hdmi_acr_get_n_cts() helper for audio N/CTS Simon Wright
2026-05-25 10:47 ` Claude review: " Claude Code Review Bot
2026-05-25 10:47 ` Claude Code Review Bot [this message]
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-86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz \
--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