From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: ti-sn65dsi83: add test pattern generation support
Date: Fri, 27 Feb 2026 11:46:39 +1000 [thread overview]
Message-ID: <review-patch3-20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-3-2e15f5a9a6a0@bootlin.com> (raw)
In-Reply-To: <20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-3-2e15f5a9a6a0@bootlin.com>
Patch Review
**Verdict: Has a bug in the hdisplay halving logic.**
**Bug — hdisplay halved unconditionally instead of only for dual LVDS:**
The commit message says:
> "Active line length needs to be halved for test pattern generation **in dual LVDS output**."
But the code halves `hdisplay` whenever the test pattern is enabled, regardless of whether dual LVDS mode is active:
```c
le16val = cpu_to_le16(mode->hdisplay / (sn65dsi83_test_pattern ? 2 : 1));
```
On an SN65DSI83 (single LVDS only), enabling the test pattern would incorrectly halve the active line length. This should use the `dual_factor` introduced in patch 2:
```c
le16val = cpu_to_le16(mode->hdisplay / (sn65dsi83_test_pattern ? dual_factor : 1));
```
This way single LVDS (`dual_factor == 1`) gets no division, and dual LVDS (`dual_factor == 2`) gets the correct halving.
**Missing MODULE_PARM_DESC:**
The module parameter has no description:
```c
static bool sn65dsi83_test_pattern;
module_param_named(test_pattern, sn65dsi83_test_pattern, bool, 0644);
```
Adding a `MODULE_PARM_DESC` would help users discover and understand the parameter (e.g., `MODULE_PARM_DESC(test_pattern, "Enable LVDS test pattern output");`).
**Minor — global state for per-device feature:**
The module parameter is a file-scope `static bool`, meaning it applies to all SN65DSI83/84 instances in the system. For a debug/bringup feature this is probably acceptable, but worth noting. A per-device debugfs entry would be cleaner if there are multi-bridge use cases.
**Minor — runtime writability vs. effect:**
The parameter is 0644 (writable at runtime), but changes only take effect on the next `atomic_pre_enable` (i.e., next modeset). This is expected behavior but could surprise users. The `MODULE_PARM_DESC` could note this.
---
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 review: " Claude Code Review Bot
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 Code Review Bot [this message]
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-patch3-20260226-ti-sn65dsi83-dual-lvds-fixes-and-test-pattern-v1-3-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