* [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel
2026-06-04 12:41 [PATCH 0/2] drm/panel: couple of visionox vtdr6140 driver enhancements Neil Armstrong
@ 2026-06-04 12:41 ` Neil Armstrong
2026-06-04 13:03 ` sashiko-bot
2026-06-04 20:24 ` Claude review: " Claude Code Review Bot
2026-06-04 12:41 ` [PATCH 2/2] drm/panel: visionox-vtdr6130: switch to devm panel calls and drop remove Neil Armstrong
2026-06-04 20:24 ` Claude review: drm/panel: couple of visionox vtdr6140 driver enhancements Claude Code Review Bot
2 siblings, 2 replies; 8+ messages in thread
From: Neil Armstrong @ 2026-06-04 12:41 UTC (permalink / raw)
To: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Neil Armstrong, Jun Nie
From: Jun Nie <jun.nie@linaro.org>
Enable display compression (DSC v1.2) for 1080x2400 Visionox
VTDR6130 AMOLED DSI panel.
This panel is the default panel for the following devices:
- SM8550-QRD
- SM8550-HDK
- SM8650-QRD
- SM8650-HDK
Enable DSC since now functional in the MSM/DPU/DSI driver.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index 97a79411e1ec..0cdcdbbc766d 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -9,6 +9,7 @@
#include <linux/of.h>
#include <drm/display/drm_dsc.h>
+#include <drm/display/drm_dsc_helper.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
@@ -17,6 +18,7 @@
struct visionox_vtdr6130 {
struct drm_panel panel;
+ struct drm_dsc_config dsc;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
@@ -47,9 +49,12 @@ static int visionox_vtdr6130_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,
@@ -123,6 +128,9 @@ static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 20);
+ drm_dsc_pps_payload_pack(&pps, dsi->dsc);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+
return dsi_ctx.accum_err;
}
@@ -269,6 +277,16 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
ctx->dsi = dsi;
mipi_dsi_set_drvdata(dsi, ctx);
+ ctx->dsc.dsc_version_major = 0x1;
+ ctx->dsc.dsc_version_minor = 0x2;
+ ctx->dsc.slice_height = 40;
+ ctx->dsc.slice_width = 540;
+ ctx->dsc.slice_count = 2;
+ ctx->dsc.bits_per_component = 8;
+ ctx->dsc.bits_per_pixel = 8 << 4;
+ ctx->dsc.block_pred_enable = true;
+
+ dsi->dsc = &ctx->dsc;
dsi->lanes = 4;
dsi->format = MIPI_DSI_FMT_RGB888;
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET |
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel
2026-06-04 12:41 ` [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel Neil Armstrong
@ 2026-06-04 13:03 ` sashiko-bot
2026-06-04 14:42 ` Neil Armstrong
2026-06-04 20:24 ` Claude review: " Claude Code Review Bot
1 sibling, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-06-04 13:03 UTC (permalink / raw)
To: Neil Armstrong; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The panel driver DRM_PANEL_VISIONOX_VTDR6130 lacks Kconfig dependencies for DSC helpers, causing a linker error when compiled without them.
--
commit 2b76aa2af63143268815713af0dc4f51234d7f43
Author: Jun Nie <jun.nie@linaro.org>
drm/panel: Enable DSC for Visionox VTDR6130 panel
This commit enables display compression (DSC v1.2) for the 1080x2400 Visionox
VTDR6130 AMOLED DSI panel. It sets up the DSC configuration parameters and
sends the picture parameter set during panel initialization.
> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index 97a79411e1ecd..0cdcdbbc766da 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
[ ... ]
> @@ -123,6 +128,9 @@ static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
> mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> mipi_dsi_msleep(&dsi_ctx, 20);
>
> + drm_dsc_pps_payload_pack(&pps, dsi->dsc);
[Severity: Low]
Will this cause a linker error if CONFIG_DRM_DISPLAY_DSC_HELPER is not enabled?
This adds a call to drm_dsc_pps_payload_pack(), but it doesn't appear to
update the Kconfig entry for DRM_PANEL_VISIONOX_VTDR6130 to select
DRM_DISPLAY_DSC_HELPER and DRM_DISPLAY_HELPER.
Could this lead to undefined reference errors during the build for
configurations where the panel is enabled but the helpers are not?
> + mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
> +
> return dsi_ctx.accum_err;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260604-topic-sm8x50-vtdr6130-dsc-v1-0-09bcd1dff1fb@linaro.org?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel
2026-06-04 13:03 ` sashiko-bot
@ 2026-06-04 14:42 ` Neil Armstrong
0 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2026-06-04 14:42 UTC (permalink / raw)
To: sashiko-reviews; +Cc: dri-devel
On 6/4/26 15:03, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] The panel driver DRM_PANEL_VISIONOX_VTDR6130 lacks Kconfig dependencies for DSC helpers, causing a linker error when compiled without them.
> --
>
> commit 2b76aa2af63143268815713af0dc4f51234d7f43
> Author: Jun Nie <jun.nie@linaro.org>
>
> drm/panel: Enable DSC for Visionox VTDR6130 panel
>
> This commit enables display compression (DSC v1.2) for the 1080x2400 Visionox
> VTDR6130 AMOLED DSI panel. It sets up the DSC configuration parameters and
> sends the picture parameter set during panel initialization.
>
>> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
>> index 97a79411e1ecd..0cdcdbbc766da 100644
>> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
>> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> [ ... ]
>> @@ -123,6 +128,9 @@ static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
>> mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>> mipi_dsi_msleep(&dsi_ctx, 20);
>>
>> + drm_dsc_pps_payload_pack(&pps, dsi->dsc);
>
> [Severity: Low]
> Will this cause a linker error if CONFIG_DRM_DISPLAY_DSC_HELPER is not enabled?
Good catch
>
> This adds a call to drm_dsc_pps_payload_pack(), but it doesn't appear to
> update the Kconfig entry for DRM_PANEL_VISIONOX_VTDR6130 to select
> DRM_DISPLAY_DSC_HELPER and DRM_DISPLAY_HELPER.
>
> Could this lead to undefined reference errors during the build for
> configurations where the panel is enabled but the helpers are not?
>
>> + mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
>> +
>> return dsi_ctx.accum_err;
>> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Claude review: drm/panel: Enable DSC for Visionox VTDR6130 panel
2026-06-04 12:41 ` [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel Neil Armstrong
2026-06-04 13:03 ` sashiko-bot
@ 2026-06-04 20:24 ` Claude Code Review Bot
1 sibling, 0 replies; 8+ messages in thread
From: Claude Code Review Bot @ 2026-06-04 20:24 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Author:** Jun Nie, signed-off by Neil Armstrong.
This patch adds structured DSC configuration and sends the PPS via the standard MIPI DCS Picture Parameter Set command.
**DSC configuration (probe):**
```c
+ ctx->dsc.dsc_version_major = 0x1;
+ ctx->dsc.dsc_version_minor = 0x2;
+ ctx->dsc.slice_height = 40;
+ ctx->dsc.slice_width = 540;
+ ctx->dsc.slice_count = 2;
+ ctx->dsc.bits_per_component = 8;
+ ctx->dsc.bits_per_pixel = 8 << 4;
+ ctx->dsc.block_pred_enable = true;
+
+ dsi->dsc = &ctx->dsc;
```
These parameters are consistent with the existing hardcoded PPS blob in the 0x70 vendor register (which decodes to: DSC 1.2, pic_height=2400, pic_width=1080, slice_height=40, slice_width=540). The `bits_per_pixel = 8 << 4` (128, i.e. 8.0 bpp with 4 fractional bits) matches the pattern used across all other panel drivers. The remaining DSC parameters (RC model, initial offset, etc.) are populated by the MSM DSI host driver via `dsi_populate_dsc_params()` when it sees `dsi->dsc` is set.
**DSC enable command:**
```c
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x03, 0x01);
```
DCS command 0x03 with value 0x01 enables compression mode on the panel. This is placed correctly at the top of the `_on()` function before other initialization — good.
**PPS transmission:**
```c
+ drm_dsc_pps_payload_pack(&pps, dsi->dsc);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
```
Placed after display-on and the 20ms delay. This follows the pattern of other DSC-enabled panel drivers (`panel-visionox-r66451`, `panel-lg-sw43408`, etc.).
**Minor observation (non-blocking):** The existing driver already has a hardcoded PPS-like blob written to vendor register 0x70 (line 64 in the current source). That blob's decoded parameters (DSC 1.2, slice 40x540, 1080x2400) match the new structured DSC config exactly. It would be worth confirming that both the vendor register write and the standard MIPI PPS are needed — but this is common for Qualcomm-reference panels and is almost certainly correct.
**Verdict:** Looks correct. No issues.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] drm/panel: visionox-vtdr6130: switch to devm panel calls and drop remove
2026-06-04 12:41 [PATCH 0/2] drm/panel: couple of visionox vtdr6140 driver enhancements Neil Armstrong
2026-06-04 12:41 ` [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel Neil Armstrong
@ 2026-06-04 12:41 ` Neil Armstrong
2026-06-04 20:24 ` Claude review: " Claude Code Review Bot
2026-06-04 20:24 ` Claude review: drm/panel: couple of visionox vtdr6140 driver enhancements Claude Code Review Bot
2 siblings, 1 reply; 8+ messages in thread
From: Neil Armstrong @ 2026-06-04 12:41 UTC (permalink / raw)
To: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Neil Armstrong
Switch to devm_drm_panel_add() and devm_mipi_dsi_attach() and drop
the remove() callback.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index 0cdcdbbc766d..6733e0e1d061 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -298,28 +298,11 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
"Failed to create backlight\n");
- drm_panel_add(&ctx->panel);
-
- ret = mipi_dsi_attach(dsi);
- if (ret < 0) {
- dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
- drm_panel_remove(&ctx->panel);
+ ret = devm_drm_panel_add(dev, &ctx->panel);
+ if (ret)
return ret;
- }
-
- return 0;
-}
-
-static void visionox_vtdr6130_remove(struct mipi_dsi_device *dsi)
-{
- struct visionox_vtdr6130 *ctx = mipi_dsi_get_drvdata(dsi);
- int ret;
-
- ret = mipi_dsi_detach(dsi);
- if (ret < 0)
- dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
- drm_panel_remove(&ctx->panel);
+ return devm_mipi_dsi_attach(dev, dsi);
}
static const struct of_device_id visionox_vtdr6130_of_match[] = {
@@ -330,7 +313,6 @@ MODULE_DEVICE_TABLE(of, visionox_vtdr6130_of_match);
static struct mipi_dsi_driver visionox_vtdr6130_driver = {
.probe = visionox_vtdr6130_probe,
- .remove = visionox_vtdr6130_remove,
.driver = {
.name = "panel-visionox-vtdr6130",
.of_match_table = visionox_vtdr6130_of_match,
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Claude review: drm/panel: visionox-vtdr6130: switch to devm panel calls and drop remove
2026-06-04 12:41 ` [PATCH 2/2] drm/panel: visionox-vtdr6130: switch to devm panel calls and drop remove Neil Armstrong
@ 2026-06-04 20:24 ` Claude Code Review Bot
0 siblings, 0 replies; 8+ messages in thread
From: Claude Code Review Bot @ 2026-06-04 20:24 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
This patch converts `drm_panel_add()` + `mipi_dsi_attach()` to their devm-managed equivalents and removes the now-unnecessary `remove()` callback.
**Probe changes:**
```c
- drm_panel_add(&ctx->panel);
-
- ret = mipi_dsi_attach(dsi);
- if (ret < 0) {
- dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
- drm_panel_remove(&ctx->panel);
+ ret = devm_drm_panel_add(dev, &ctx->panel);
+ if (ret)
return ret;
- }
-
- return 0;
+
+ return devm_mipi_dsi_attach(dev, dsi);
```
Clean conversion. The devm ordering is correct — `devm_drm_panel_add()` is called first, so on teardown the DSI detach (registered second) will happen before the panel removal. This matches the manual teardown order in the old `remove()` callback. The error path simplification (dropping `drm_panel_remove` on attach failure) is correct since devm handles it.
**Remove callback deletion:**
```c
-static void visionox_vtdr6130_remove(struct mipi_dsi_device *dsi)
-{
- ...
-}
```
and
```c
static struct mipi_dsi_driver visionox_vtdr6130_driver = {
.probe = visionox_vtdr6130_probe,
- .remove = visionox_vtdr6130_remove,
```
Both `devm_drm_panel_add()` and `devm_mipi_dsi_attach()` are available in the tree (confirmed in headers). This is a standard cleanup seen across many panel drivers.
**Verdict:** Correct, clean conversion. No issues.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 8+ messages in thread
* Claude review: drm/panel: couple of visionox vtdr6140 driver enhancements
2026-06-04 12:41 [PATCH 0/2] drm/panel: couple of visionox vtdr6140 driver enhancements Neil Armstrong
2026-06-04 12:41 ` [PATCH 1/2] drm/panel: Enable DSC for Visionox VTDR6130 panel Neil Armstrong
2026-06-04 12:41 ` [PATCH 2/2] drm/panel: visionox-vtdr6130: switch to devm panel calls and drop remove Neil Armstrong
@ 2026-06-04 20:24 ` Claude Code Review Bot
2 siblings, 0 replies; 8+ messages in thread
From: Claude Code Review Bot @ 2026-06-04 20:24 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/panel: couple of visionox vtdr6140 driver enhancements
Author: Neil Armstrong <neil.armstrong@linaro.org>
Patches: 5
Reviewed: 2026-06-05T06:24:32.822781
---
This is a clean 2-patch series from Neil Armstrong (with Jun Nie as author of patch 1) that makes two improvements to the Visionox VTDR6130 panel driver:
1. Enables DSC (Display Stream Compression) v1.2 by populating the `drm_dsc_config` struct and sending the PPS to the panel.
2. Switches to devm-managed panel/DSI-attach calls and drops the manual `remove()` callback.
Both patches are straightforward, follow established patterns from other panel drivers (e.g., `panel-visionox-r66451`, `panel-lg-sw43408`), and are correct. The DSC parameters match the PPS blob already hardcoded in the 0x70 vendor register (version 1.2, 2400x1080, slice 40x540), confirming consistency. The devm conversion is a standard modernization.
**Series looks good to merge.** One minor observation below but nothing blocking.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 8+ messages in thread