Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] drm/panel: API misuse by passing byte-swapped brightness value --
commit fdce0322736a51a627625ddf135b072aa86e11bd Author: Aaron Kling <[email protected]> drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Add support for the 1080x1920 panel used in the Retroid Pocket 6. > diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > index 278f5acc2d661..d0db128cda819 100644 > --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c [ ... ] > @@ -60,6 +60,82 @@ static void visionox_vtdr6130_reset(struct > visionox_vtdr6130 *ctx) > usleep_range(10000, 11000); > } > > +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 value (0xff07) to work around the core helper's LSB-first transmission? The mipi_dsi_dcs_set_display_brightness_multi API expects a logical brightness value, not a pre-swapped payload. If the core helper is ever updated to correctly follow the DCS spec and transmit MSB-first, could this panel silently break and apply a brightness of 65287 instead of the intended 0x07ff (2047)? > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x6f, 0x02); > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x02); > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x59, 0x00); -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4
