From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: ti-sn65dsi83: fix CHA_DSI_CLK_RANGE rounding
Date: Fri, 27 Feb 2026 11:46:38 +1000 [thread overview]
Message-ID: <review-patch1-20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-1-2e15f5a9a6a0@bootlin.com> (raw)
In-Reply-To: <20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-1-2e15f5a9a6a0@bootlin.com>
Patch Review
**Verdict: Looks good.**
The fix is correct. The register encoding is:
```
(CHA_DSI_CLK_RANGE * 5 MHz) <= DSI_CLK < ((CHA_DSI_CLK_RANGE + 1) * 5 MHz)
```
This means the register value should be the floor of `DSI_CLK / 5 MHz`. The old code:
```c
return DIV_ROUND_UP(clamp(..., 40000U, 500000U), 5000U);
```
rounds up, producing an off-by-one for any frequency that isn't an exact multiple of 5 MHz. The new code:
```c
return clamp(..., 40000U, 500000U) / 5000U;
```
uses truncating integer division, which is the correct floor operation here. The example in the commit message (437.1 MHz → register 87 vs incorrect 88) clearly demonstrates the issue.
Fixes tag and stable Cc are appropriate.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-27 1:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 16:16 [PATCH 0/3] drm/bridge: ti-sn65dsi83: two fixes + add test pattern Luca Ceresoli
2026-02-26 16:16 ` [PATCH 1/3] drm/bridge: ti-sn65dsi83: fix CHA_DSI_CLK_RANGE rounding Luca Ceresoli
2026-02-27 1:46 ` Claude Code Review Bot [this message]
2026-02-26 16:16 ` [PATCH 2/3] drm/bridge: ti-sn65dsi83: halve horizontal syncs for dual LVDS output Luca Ceresoli
2026-02-27 1:46 ` Claude review: " Claude Code Review Bot
2026-02-26 16:16 ` [PATCH 3/3] drm/bridge: ti-sn65dsi83: add test pattern generation support Luca Ceresoli
2026-02-27 1:46 ` Claude review: " Claude Code Review Bot
2026-02-27 1:46 ` Claude review: drm/bridge: ti-sn65dsi83: two fixes + add test pattern 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-20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-1-2e15f5a9a6a0@bootlin.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