From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260223064630.12720-3-clamor95@gmail.com> References: <20260223064630.12720-1-clamor95@gmail.com> <20260223064630.12720-3-clamor95@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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