All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Aaron Kling" <webgeek1234@gmail.com>
Cc: dri-devel@lists.freedesktop.org, robh@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel
Date: Fri, 14 Aug 2026 18:26:41 +0000	[thread overview]
Message-ID: <20260814182642.5BE811F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814-rp6-panel-v1-4-111c1aeccf0f@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The panel initialization sequence uses a byte-swapped magic number (`0xff07`) to set display brightness, exploiting the little-endian behavior of `mipi_dsi_dcs_set_display_brightness_multi` to send a big-endian sequence.
--

--- Patch [4]: [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel ---
commit 2ba31f55071d4cfd213a7bfcbe0e2720a74312ac
Author: Aaron Kling <webgeek1234@gmail.com>

drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel

This commit adds support for the 1080x1920 panel used in the Retroid
Pocket 6 handheld console.

> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index 805c9846c2a0b..5c826f95ec478 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c

[ ... ]

> +static int retroidpocket_rp6_on(struct visionox_vtdr6130 *ctx)
> +{
> +	struct mipi_dsi_device *dsi = ctx->dsi;
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
> +	struct drm_dsc_picture_parameter_set pps;
> +
> +	dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x03, 0x01);
> +	mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx,
> +				     MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x20);
> +	mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0xff07);

[Severity: Medium]
Is this intentionally passing a byte-swapped magic number (0xff07) to
compensate for mipi_dsi_dcs_set_display_brightness_multi() sending the
brightness value LSB-first?

The DCS specification requires the brightness parameter to be MSB-first. By
passing 0xff07, it appears this code intentionally sends 0x07 followed by
0xff so the panel receives 0x07ff (2047) MSB-first.

If the core helper is ever corrected to comply with the DCS specification,
this sequence will send 0xff followed by 0x07, which the panel will interpret
as 0xff07 (65287), drastically exceeding the intended brightness.

Should this instead send the raw bytes explicitly using
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
0x07, 0xff) to avoid depending on the helper's current endianness behavior?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com?part=4

      reply	other threads:[~2026-08-14 18:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 18:17 [PATCH 0/4] drm/panel: Support Retroid Pocket 6 panel Aaron Kling via B4 Relay
2026-08-14 18:17 ` Aaron Kling
2026-08-14 18:17 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
2026-08-14 18:17   ` Aaron Kling
2026-08-14 18:25   ` sashiko-bot
2026-08-14 18:17 ` [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support Aaron Kling via B4 Relay
2026-08-14 18:17   ` Aaron Kling
2026-08-14 18:17 ` [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config Aaron Kling via B4 Relay
2026-08-14 18:17   ` Aaron Kling
2026-08-14 18:23   ` sashiko-bot
2026-08-14 18:17 ` [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Aaron Kling via B4 Relay
2026-08-14 18:17   ` Aaron Kling
2026-08-14 18:26   ` sashiko-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=20260814182642.5BE811F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=webgeek1234@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.