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-qp: use drm_hdmi_acr_get_n_cts() helper for audio N/CTS Date: Mon, 25 May 2026 20:47:24 +1000 Message-ID: In-Reply-To: <86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz> References: <86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz> <86fcf349-0a7a-4618-9001-612371b0f71b@symple.nz> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 =3D dw_hdmi_qp_find_n(hdmi, tmds_char_rate, sample_rate); cts =3D 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 = =3D=3D 0`), which means `dw_hdmi_qp_set_cts_n()` will now always take the `= AUDPKT_ACR_CTS_OVR_EN` path (line 125-127) =E2=80=94 i.e., software-overrid= e CTS rather than hardware auto-measurement. This is the behavioral fix: th= e old code returned `cts =3D 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 `un= signed long` (line 88) which is implicitly widened at the call site (line 2= 91) =E2=80=94 no truncation risk. **Include: Already present** `` is already included at line 21, so no add= itional 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=E2=80=93162 MHz). For those rates, the helper falls back to `= N =3D 128 * Fs / 1000`, which is the HDMI 1.4b recommended default =E2=80= =94 functionally correct but may produce slightly different jitter characte= ristics 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=3D0 at out-= of-table rates), the fix mechanism, testing matrix with four TMDS rates, an= d the behavioral trade-off for non-CEA N values. The `Assisted-by: Claude:c= laude-opus-4-7` trailer follows `Documentation/process/coding-assistants.rs= t`. 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