From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
Date: Mon, 25 May 2026 20:00:01 +1000 [thread overview]
Message-ID: <review-patch1-20260521-sm8650-7-1-bonded-dsi-v4-1-a4dd5e0850f1@linaro.org> (raw)
In-Reply-To: <20260521-sm8650-7-1-bonded-dsi-v4-1-a4dd5e0850f1@linaro.org>
Patch Review
**Concept**: Replaces the hardcoded `slice_per_pkt = 1` assumption in the MSM DSI host with support for configurable values. A `dsc_slice_per_pkt` field is added to `struct drm_dsc_config`.
**Issues:**
1. **Division by zero risk**: In `dsi_update_dsc_timing()`, the new code does:
```c
pkt_per_line = slice_per_intf / msm_host->dsc_slice_per_pkt;
```
If `dsc_slice_per_pkt` is 0 (e.g. a panel driver that sets `dsc` but doesn't set this new field, and the `?: 1` fallback in `dsi_host_attach` is somehow bypassed or a different code path sets the DSC config), this is an OOPS. The fallback at attach time (`dsi->dsc->dsc_slice_per_pkt ?: 1`) is good but fragile — consider also clamping or validating in `dsi_update_dsc_timing` itself.
2. **Questionable placement in `drm_dsc_config`**: The comment says "This is not part of DSC standard, and only used in some DSI panels so far." Adding transport-layer packetization config to a struct representing the DSC standard parameter set conflates concerns. The existing `msm_dsi_host` already has a local `dsc_slice_per_pkt` field — you could keep it purely there, and pass it from `mipi_dsi_device` via a separate field rather than polluting `drm_dsc_config`. This needs buy-in from DRM core maintainers (Maxime, Thomas, etc.).
3. **Naming redundancy**: The field is called `dsc_slice_per_pkt` inside `struct drm_dsc_config`. Since it's already in a `dsc` struct, just `slice_per_pkt` would be sufficient and consistent with how other fields like `slice_count`, `slice_width` etc. are named.
4. **The `pkt_per_line` log2 encoding check**: The existing code at line 964 warns if `pkt_per_line > 4` because the register field is log2-encoded and only supports 1, 2, 4. With `slice_per_pkt > 1`, `pkt_per_line` can now be smaller (e.g., 4 slices / 4 slice_per_pkt = 1), but there's no validation that `slice_per_intf` is evenly divisible by `dsc_slice_per_pkt`, which could give non-power-of-2 results.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 10:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 14:46 [PATCH v4 0/5] Add support to 2 panels in bonded-DSI mode Jun Nie
2026-05-21 14:46 ` [PATCH v4 1/5] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Jun Nie
2026-05-25 10:00 ` Claude Code Review Bot [this message]
2026-05-21 14:46 ` [PATCH v4 2/5] drm/mipi-dsi: Add flag to support dual-panel configurations Jun Nie
2026-05-25 10:00 ` Claude review: " Claude Code Review Bot
2026-05-21 14:46 ` [PATCH v4 3/5] drm/msm/dsi: Support dual panel use case with single CRTC Jun Nie
2026-05-25 10:00 ` Claude review: " Claude Code Review Bot
2026-05-21 14:46 ` [PATCH v4 4/5] dt-bindings: display: Add Synaptics R63455 panel support Jun Nie
2026-05-21 19:45 ` Conor Dooley
2026-05-21 20:24 ` Dmitry Baryshkov
2026-05-22 6:32 ` Neil Armstrong
2026-05-21 20:46 ` Rob Herring (Arm)
2026-05-25 10:00 ` Claude review: " Claude Code Review Bot
2026-05-21 14:46 ` [PATCH v4 5/5] drm/panel: Add driver for Synaptics R63455 DSI panel Jun Nie
2026-05-25 10:00 ` Claude review: " Claude Code Review Bot
2026-05-25 10:00 ` Claude review: Add support to 2 panels in bonded-DSI mode 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-20260521-sm8650-7-1-bonded-dsi-v4-1-a4dd5e0850f1@linaro.org \
--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