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: gpu/drm: panel: add support for DSI panel used in Motorola Atrix 4G and Droid X2
Date: Tue, 24 Feb 2026 10:38:14 +1000	[thread overview]
Message-ID: <review-patch2-20260223064630.12720-3-clamor95@gmail.com> (raw)
In-Reply-To: <20260223064630.12720-3-clamor95@gmail.com>

Patch Review

> +config DRM_PANEL_MOTOROLA_MOT
> +	tristate "Atrix 4G and Droid X2 540x960 DSI video mode panel"

The Kconfig describes this as a "video mode panel", but:

> +	dsi->mode_flags = MIPI_DSI_MODE_LPM;

The mode flags do not include `MIPI_DSI_MODE_VIDEO`. Without that flag, the DSI host will operate in command mode, not video mode. Other command-mode panel drivers (e.g., panel-sharp-lq101r1sx01, panel-lg-sw43408) similarly set only `MIPI_DSI_MODE_LPM`. If this panel genuinely operates in video mode, `MIPI_DSI_MODE_VIDEO` needs to be added to `mode_flags`. If it's actually a command-mode panel, the Kconfig description should be corrected. Which is it?

> +static int mot_panel_prepare(struct drm_panel *panel)
> +{
> +	...
> +	ret = regulator_bulk_enable(ARRAY_SIZE(mot_panel_supplies), priv->supplies);
> +	if (ret < 0) {
> +		dev_err(dev, "failed to enable power supplies: %d\n", ret);
> +		return ret;
> +	}
> +
> +	mot_panel_reset(priv);
> +
> +	mipi_dsi_generic_write_seq_multi(&ctx, 0xf0, 0x5a, 0x5a);
> +	...
> +	mot_es2(&ctx);
> +	...
> +	return ctx.accum_err;

If any of the DSI commands fail, `ctx.accum_err` will be non-zero and `mot_panel_prepare` returns an error. The `drm_panel_prepare` framework function will then not set `panel->prepared = true`, which means the subsequent `drm_panel_unprepare` call will skip the unprepare callback entirely. The regulators enabled at the top of this function will remain enabled with no cleanup path. The reset GPIO is also left deasserted. To fix this, the error return should disable regulators and reassert reset before returning.

> +#include <video/mipi_display.h>

This header defines `MIPI_DCS_*` constants. The driver uses the `_multi` helper functions exclusively (e.g., `mipi_dsi_dcs_exit_sleep_mode_multi`) which reference those constants internally, so this include does not appear to be directly needed by the driver.

The rest of the driver -- probe/remove lifecycle, mode definition, init sequence structure, GPIO handling -- looks correct.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-02-24  0:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23  6:46 [PATCH v2 0/2] gpu/drm: panel: add support for DSI panel used in Motorola Atrix 4G and Droid X2 Svyatoslav Ryhel
2026-02-23  6:46 ` [PATCH v2 1/2] dt-bindings: display: panel: document Atrix 4G and Droid X2 DSI panel Svyatoslav Ryhel
2026-02-24  0:38   ` Claude review: " Claude Code Review Bot
2026-02-23  6:46 ` [PATCH v2 2/2] gpu/drm: panel: add support for DSI panel used in Motorola Atrix 4G and Droid X2 Svyatoslav Ryhel
2026-02-24  0:38   ` Claude Code Review Bot [this message]
2026-02-24  0:38 ` Claude review: " 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-patch2-20260223064630.12720-3-clamor95@gmail.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