public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panel: jdi-lt070me05000: Transition to mipi_dsi *_multi() functions
Date: Tue, 31 Mar 2026 17:44:36 +1000	[thread overview]
Message-ID: <review-patch1-tencent_E0E7D83DF383CC08960CF0070BF1E7CC8505@qq.com> (raw)
In-Reply-To: <tencent_E0E7D83DF383CC08960CF0070BF1E7CC8505@qq.com>

Patch Review

**Verdict: Already applied (superseded), with several issues compared to the existing conversion.**

The drm-next tree already contains this conversion (done more thoroughly). Comparing the patch against the current tree reveals several shortcomings:

1. **Context variable naming**: The patch uses `ctx` while the tree uses `dsi_ctx`. Minor style difference, but indicates the patch was developed against a stale base.

2. **Sleep calls not converted**: The patch keeps bare `usleep_range()` and `mdelay()`/`msleep()` calls:
   ```c
   usleep_range(10000, 20000);
   ...
   msleep(120);
   ...
   mdelay(10);
   ...
   mdelay(20);
   ```
   The tree converts these to `mipi_dsi_usleep_range()` and `mipi_dsi_msleep()`, which properly short-circuit when `accum_err` is set, avoiding unnecessary delays after a failure.

3. **`mipi_dsi_generic_write_multi()` vs `mipi_dsi_generic_write_seq_multi()`**: The patch uses `mipi_dsi_generic_write_multi()` with explicit casts and length parameters:
   ```c
   mipi_dsi_generic_write_multi(&ctx, (u8[]){0xB0, 0x00}, 2);
   ```
   The tree uses the cleaner `mipi_dsi_generic_write_seq_multi()` macro which infers the length automatically:
   ```c
   mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb0, 0x00);
   ```
   This is both more readable and less error-prone (no risk of length mismatch).

4. **Unused `dev` variable removal**: The patch removes `struct device *dev = &jdi->dsi->dev;` which is correct since the `dev_err()` calls are removed, but the existing tree also handles this properly.

5. **`jdi_panel_on()` and `jdi_panel_off()` not converted**: The patch only converts `jdi_panel_init()`. The existing tree also converts `jdi_panel_on()` and `jdi_panel_off()` to use the multi context pattern, making it a more complete conversion.

**Summary**: This patch is redundant — the work has already been merged in a better form. If it were being reviewed on its own merits, the feedback would be: use `mipi_dsi_*_seq_multi()` macros instead of raw `mipi_dsi_generic_write_multi()`, convert the sleep calls to `mipi_dsi_msleep()`/`mipi_dsi_usleep_range()`, and extend the conversion to `jdi_panel_on()` and `jdi_panel_off()` as well.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-31  7:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28 12:03 [PATCH] drm/panel: jdi-lt070me05000: Transition to mipi_dsi *_multi() functions YoungAndSure
2026-03-31  7:44 ` Claude review: " Claude Code Review Bot
2026-03-31  7:44 ` 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-tencent_E0E7D83DF383CC08960CF0070BF1E7CC8505@qq.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