* [PATCH 0/4] drm/panel: Support Retroid Pocket 6 panel
@ 2026-08-14 18:17 Aaron Kling via B4 Relay
2026-08-14 18:17 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-08-14 18:17 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel, Aaron Kling
This panel uses a Visionox VTDR6130 DDIC. There is an existing driver
for this ddic, however it is currently hardcoded for a panel used on
several Qualcomm devkits. This series sets up the driver to support
multiple panels, then adds the RP6 panel. It also adds support for
rotation as the RP6 panel is mounted sideways.
This depends on the Retroid Pocket dt series [0] for the vendor prefix
patch. That series depends on the AYN dt series [1] to apply cleanly.
[0] https://lore.kernel.org/linux-arm-msm/20260808-rp-qcs8550-v1-0-a5a365ba3dc5@gmail.com/
[1] https://lore.kernel.org/linux-arm-msm/20260727-ayn-qcs8550-v9-0-e3db456e10e5@gmail.com/
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
Aaron Kling (4):
dt-bindings: display: visionox,vtdr6130: Add Retroid Pocket 6 panel
drm/panel: visionox-vtdr6130: Add panel orientation support
drm/panel: visionox-vtdr6130: Modularize panel config
drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel
.../bindings/display/panel/visionox,vtdr6130.yaml | 8 +-
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 225 ++++++++++++++++++---
2 files changed, 201 insertions(+), 32 deletions(-)
---
base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6
change-id: 20260318-rp6-panel-861840540616
prerequisite-change-id: 20260217-ayn-qcs8550-16c07b63de26:v9
prerequisite-patch-id: 17ba304f7a8a08cc78f98e198db9c51f4786a22c
prerequisite-patch-id: 21873631f5dcdb9bbbdb5c20c3f5e9816cc405f9
prerequisite-patch-id: bf7b5dea0097cbbdf04929a4246d1fc65c607ea8
prerequisite-patch-id: d7f546eddc96a4f31a1e681abddbc96bd68abb32
prerequisite-patch-id: d40d784ad8efbb1204c024408be2067725a06cf2
prerequisite-patch-id: 25bbd55199a8250a912ef542b31f43dd5ccdbc90
prerequisite-change-id: 20260808-rp-qcs8550-85c84760f6f3:v1
prerequisite-patch-id: 17ba304f7a8a08cc78f98e198db9c51f4786a22c
prerequisite-patch-id: 21873631f5dcdb9bbbdb5c20c3f5e9816cc405f9
prerequisite-patch-id: bf7b5dea0097cbbdf04929a4246d1fc65c607ea8
prerequisite-patch-id: d7f546eddc96a4f31a1e681abddbc96bd68abb32
prerequisite-patch-id: d40d784ad8efbb1204c024408be2067725a06cf2
prerequisite-patch-id: 25bbd55199a8250a912ef542b31f43dd5ccdbc90
prerequisite-patch-id: c79dacb2a8ca1298387bc9bc4a543de97c670a50
prerequisite-patch-id: 9c058fb9b13442f5434b8aaa2f1907eff1b43684
prerequisite-patch-id: c13130099b60aa7c412181e99070718eb2c68ecd
prerequisite-patch-id: d0dad3c4fa9c4b98e6cc53bbd0874df9113ab5f6
Best regards,
--
Aaron Kling <webgeek1234@gmail.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add Retroid Pocket 6 panel
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 via B4 Relay
2026-08-20 6:48 ` Krzysztof Kozlowski
2026-08-14 18:17 ` [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support Aaron Kling via B4 Relay
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-08-14 18:17 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
The vtdr6130 is a display driver integrated circuit, a common chip used
for various panels. One such panel is used in the Retroid Pocket 6.
The RP6 panel only lists the regulators vddio and vci, so drop vdd as a
required property. The panel is rotated 270 degrees to natural, so also
add rotation as an allowed property.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
.../devicetree/bindings/display/panel/visionox,vtdr6130.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/visionox,vtdr6130.yaml b/Documentation/devicetree/bindings/display/panel/visionox,vtdr6130.yaml
index c99f4146f1bb0..682f30dc9ee43 100644
--- a/Documentation/devicetree/bindings/display/panel/visionox,vtdr6130.yaml
+++ b/Documentation/devicetree/bindings/display/panel/visionox,vtdr6130.yaml
@@ -14,7 +14,11 @@ allOf:
properties:
compatible:
- const: visionox,vtdr6130
+ oneOf:
+ - const: visionox,vtdr6130
+ - items:
+ - const: retroidpocket,rp6-panel
+ - const: visionox,vtdr6130
reg:
maxItems: 1
@@ -25,13 +29,13 @@ properties:
vdd-supply: true
port: true
reset-gpios: true
+ rotation: true
required:
- compatible
- reg
- vddio-supply
- vci-supply
- - vdd-supply
- reset-gpios
- port
--
2.54.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support
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 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
@ 2026-08-14 18:17 ` Aaron Kling via B4 Relay
2026-08-26 9:58 ` Neil Armstrong
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 ` [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Aaron Kling via B4 Relay
3 siblings, 1 reply; 10+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-08-14 18:17 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
Fetch orientation from the device tree if provided.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index 6733e0e1d0612..b66d6c7128c75 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -11,6 +11,7 @@
#include <drm/display/drm_dsc.h>
#include <drm/display/drm_dsc_helper.h>
#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_of.h>
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
@@ -22,6 +23,7 @@ struct visionox_vtdr6130 {
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
+ enum drm_panel_orientation orientation;
};
static const struct regulator_bulk_data visionox_vtdr6130_supplies[] = {
@@ -218,10 +220,18 @@ static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
return 1;
}
+static enum drm_panel_orientation visionox_vtdr6130_get_orientation(struct drm_panel *panel)
+{
+ struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
+
+ return ctx->orientation;
+}
+
static const struct drm_panel_funcs visionox_vtdr6130_panel_funcs = {
.prepare = visionox_vtdr6130_prepare,
.unprepare = visionox_vtdr6130_unprepare,
.get_modes = visionox_vtdr6130_get_modes,
+ .get_orientation = visionox_vtdr6130_get_orientation,
};
static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
@@ -293,6 +303,12 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
MIPI_DSI_CLOCK_NON_CONTINUOUS;
ctx->panel.prepare_prev_first = true;
+ ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
+ if (ret < 0) {
+ dev_err(dev, "Failed to get orientation %d\n", ret);
+ return ret;
+ }
+
ctx->panel.backlight = visionox_vtdr6130_create_backlight(dsi);
if (IS_ERR(ctx->panel.backlight))
return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
--
2.54.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config
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 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
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 via B4 Relay
2026-08-26 9:53 ` Neil Armstrong
2026-08-14 18:17 ` [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Aaron Kling via B4 Relay
3 siblings, 1 reply; 10+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-08-14 18:17 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
The vtdr6130 is a DDIC, a common chip that is used by multiple panels.
Prepare the driver for more panels.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 95 +++++++++++++++++--------
1 file changed, 65 insertions(+), 30 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index b66d6c7128c75..805c9846c2a0b 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -19,11 +19,28 @@
struct visionox_vtdr6130 {
struct drm_panel panel;
- struct drm_dsc_config dsc;
+ struct drm_connector *connector;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
enum drm_panel_orientation orientation;
+ struct visionox_vtdr6130_desc *desc;
+};
+
+struct visionox_vtdr6130_desc {
+ unsigned int width_mm;
+ unsigned int height_mm;
+
+ unsigned int bpc;
+ unsigned int lanes;
+ unsigned long mode_flags;
+ enum mipi_dsi_pixel_format format;
+
+ const struct drm_display_mode *modes;
+ unsigned int num_modes;
+ int (*init_sequence)(struct visionox_vtdr6130 *ctx);
+
+ struct drm_dsc_config dsc;
};
static const struct regulator_bulk_data visionox_vtdr6130_supplies[] = {
@@ -162,7 +179,7 @@ static int visionox_vtdr6130_prepare(struct drm_panel *panel)
visionox_vtdr6130_reset(ctx);
- ret = visionox_vtdr6130_on(ctx);
+ ret = ctx->desc->init_sequence(ctx);
if (ret < 0) {
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(visionox_vtdr6130_supplies),
@@ -187,34 +204,58 @@ static int visionox_vtdr6130_unprepare(struct drm_panel *panel)
return 0;
}
-static const struct drm_display_mode visionox_vtdr6130_mode = {
- .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
- .hdisplay = 1080,
- .hsync_start = 1080 + 20,
- .hsync_end = 1080 + 20 + 2,
- .htotal = 1080 + 20 + 2 + 20,
- .vdisplay = 2400,
- .vsync_start = 2400 + 20,
- .vsync_end = 2400 + 20 + 2,
- .vtotal = 2400 + 20 + 2 + 18,
+static const struct drm_display_mode visionox_vtdr6130_modes[] = {
+ {
+ .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
+ .hdisplay = 1080,
+ .hsync_start = 1080 + 20,
+ .hsync_end = 1080 + 20 + 2,
+ .htotal = 1080 + 20 + 2 + 20,
+ .vdisplay = 2400,
+ .vsync_start = 2400 + 20,
+ .vsync_end = 2400 + 20 + 2,
+ .vtotal = 2400 + 20 + 2 + 18,
+ },
+};
+
+static struct visionox_vtdr6130_desc visionox_vtdr6130_panel_desc = {
+ .modes = visionox_vtdr6130_modes,
+ .num_modes = ARRAY_SIZE(visionox_vtdr6130_modes),
.width_mm = 71,
.height_mm = 157,
+ .bpc = 8,
+ .lanes = 4,
+ .format = MIPI_DSI_FMT_RGB888,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS,
+ .init_sequence = visionox_vtdr6130_on,
+ .dsc = {
+ .dsc_version_major = 0x1,
+ .dsc_version_minor = 0x2,
+ .slice_height = 40,
+ .slice_width = 540,
+ .slice_count = 2,
+ .bits_per_component = 8,
+ .bits_per_pixel = 8 << 4,
+ .block_pred_enable = true,
+ },
};
static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
+ struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
struct drm_display_mode *mode;
- mode = drm_mode_duplicate(connector->dev, &visionox_vtdr6130_mode);
+ mode = drm_mode_duplicate(connector->dev, ctx->desc->modes);
if (!mode)
return -ENOMEM;
drm_mode_set_name(mode);
mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
- connector->display_info.width_mm = mode->width_mm;
- connector->display_info.height_mm = mode->height_mm;
+ connector->display_info.width_mm = ctx->desc->width_mm;
+ connector->display_info.height_mm = ctx->desc->height_mm;
drm_mode_probed_add(connector, mode);
return 1;
@@ -284,23 +325,17 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset-gpios\n");
+ ctx->desc = (struct visionox_vtdr6130_desc *)of_device_get_match_data(dev);
+ if (!ctx->desc)
+ return -ENODEV;
+
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 |
- MIPI_DSI_CLOCK_NON_CONTINUOUS;
+ dsi->dsc = &ctx->desc->dsc;
+ dsi->lanes = ctx->desc->lanes;
+ dsi->format = ctx->desc->format;
+ dsi->mode_flags = ctx->desc->mode_flags;
ctx->panel.prepare_prev_first = true;
ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
@@ -322,7 +357,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
}
static const struct of_device_id visionox_vtdr6130_of_match[] = {
- { .compatible = "visionox,vtdr6130" },
+ { .compatible = "visionox,vtdr6130", .data = &visionox_vtdr6130_panel_desc },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, visionox_vtdr6130_of_match);
--
2.54.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel
2026-08-14 18:17 [PATCH 0/4] drm/panel: Support Retroid Pocket 6 panel Aaron Kling via B4 Relay
` (2 preceding siblings ...)
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 via B4 Relay
2026-08-26 9:54 ` Neil Armstrong
3 siblings, 1 reply; 10+ messages in thread
From: Aaron Kling via B4 Relay @ 2026-08-14 18:17 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel, Aaron Kling
From: Aaron Kling <webgeek1234@gmail.com>
Add support for the 1080x1920 panel used in the Retroid Pocket 6.
Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
---
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 114 ++++++++++++++++++++++++
1 file changed, 114 insertions(+)
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
@@ -64,6 +64,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);
+ 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);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x6c, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x6d, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x70, 0x11, 0x00, 0x00, 0x89,
+ 0x30, 0x80, 0x07, 0x80, 0x04, 0x38, 0x00,
+ 0x14, 0x02, 0x1c, 0x02, 0x1c, 0x02, 0x00,
+ 0x02, 0x25, 0x00, 0x20, 0x01, 0xd5, 0x00,
+ 0x07, 0x00, 0x0d, 0x05, 0x7a, 0x05, 0x16,
+ 0x18, 0x00, 0x10, 0xf0, 0x03, 0x0c, 0x20,
+ 0x00, 0x06, 0x0b, 0x0b, 0x33, 0x0e, 0x1c,
+ 0x2a, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70,
+ 0x77, 0x79, 0x7b, 0x7d, 0x7e, 0x01, 0x02,
+ 0x01, 0x00, 0x09, 0x40, 0x09, 0xbe, 0x19,
+ 0xfc, 0x19, 0xfa, 0x19, 0xf8, 0x1a, 0x38,
+ 0x1a, 0x78, 0x1a, 0xb6, 0x2a, 0xb6, 0x2a,
+ 0xf4, 0x2a, 0xf4, 0x4b, 0x34, 0x63, 0x74,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb1, 0x02, 0x15, 0x00, 0x14,
+ 0x00, 0x20, 0x00, 0x02, 0x16, 0x00, 0x14,
+ 0x07, 0xb4, 0x00, 0x02, 0x16, 0x00, 0x14,
+ 0x00, 0x10, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb2, 0x03, 0x33);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb4, 0x0a, 0x72, 0x00, 0x00,
+ 0x0a, 0x72, 0x00, 0x00, 0x0a, 0x72, 0x00,
+ 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb5, 0x00, 0x1e, 0x1e, 0x1e,
+ 0x1e, 0x1e, 0x1e, 0x06, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0x00, 0x00, 0x08, 0x1e,
+ 0x1e, 0x1e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbc, 0x10, 0x00, 0x00, 0x08,
+ 0x11, 0x1e, 0x7c, 0x1e, 0x7c, 0x1e, 0x7c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbe, 0x10, 0x10, 0x00, 0x0c,
+ 0x22, 0x1e, 0x62, 0x1e, 0x62, 0x1e, 0x62);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x80);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x65, 0x13);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfd, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x81);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x83);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x65, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf8, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x00);
+
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 150);
+
+ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 50);
+
+ drm_dsc_pps_payload_pack(&pps, dsi->dsc);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+ mipi_dsi_compression_mode_multi(&dsi_ctx, true);
+
+ return dsi_ctx.accum_err;
+}
+
static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
@@ -204,6 +280,43 @@ static int visionox_vtdr6130_unprepare(struct drm_panel *panel)
return 0;
}
+static const struct drm_display_mode retroidpocket_rp6_modes[] = {
+ {
+ .clock = (1080 + 22 + 2 + 16) * (1920 + 16 + 2 + 20) * 120 / 1000,
+ .hdisplay = 1080,
+ .hsync_start = 1080 + 22,
+ .hsync_end = 1080 + 22 + 2,
+ .htotal = 1080 + 22 + 2 + 16,
+ .vdisplay = 1920,
+ .vsync_start = 1920 + 16,
+ .vsync_end = 1920 + 16 + 2,
+ .vtotal = 1920 + 16 + 2 + 20,
+ },
+};
+
+static struct visionox_vtdr6130_desc retroidpocket_rp6_panel_desc = {
+ .modes = retroidpocket_rp6_modes,
+ .num_modes = ARRAY_SIZE(retroidpocket_rp6_modes),
+ .width_mm = 69,
+ .height_mm = 122,
+ .bpc = 8,
+ .lanes = 4,
+ .format = MIPI_DSI_FMT_RGB888,
+ .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS,
+ .init_sequence = retroidpocket_rp6_on,
+ .dsc = {
+ .dsc_version_major = 0x1,
+ .dsc_version_minor = 0x1,
+ .slice_height = 12,
+ .slice_width = 540,
+ .slice_count = 2,
+ .bits_per_component = 8,
+ .bits_per_pixel = 8 << 4,
+ .block_pred_enable = true,
+ },
+};
+
static const struct drm_display_mode visionox_vtdr6130_modes[] = {
{
.clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
@@ -357,6 +470,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
}
static const struct of_device_id visionox_vtdr6130_of_match[] = {
+ { .compatible = "retroidpocket,rp6-panel", .data = &retroidpocket_rp6_panel_desc },
{ .compatible = "visionox,vtdr6130", .data = &visionox_vtdr6130_panel_desc },
{ /* sentinel */ }
};
--
2.54.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add Retroid Pocket 6 panel
2026-08-14 18:17 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
@ 2026-08-20 6:48 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-20 6:48 UTC (permalink / raw)
To: Aaron Kling
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, dri-devel, devicetree,
linux-kernel
On Fri, Aug 14, 2026 at 01:17:15PM -0500, Aaron Kling wrote:
> The vtdr6130 is a display driver integrated circuit, a common chip used
> for various panels. One such panel is used in the Retroid Pocket 6.
>
> The RP6 panel only lists the regulators vddio and vci, so drop vdd as a
> required property. The panel is rotated 270 degrees to natural, so also
> add rotation as an allowed property.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> .../devicetree/bindings/display/panel/visionox,vtdr6130.yaml | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config
2026-08-14 18:17 ` [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config Aaron Kling via B4 Relay
@ 2026-08-26 9:53 ` Neil Armstrong
2026-08-26 17:30 ` Aaron Kling
0 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2026-08-26 9:53 UTC (permalink / raw)
To: webgeek1234, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel
On 8/14/26 20:17, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@gmail.com>
>
> The vtdr6130 is a DDIC, a common chip that is used by multiple panels.
> Prepare the driver for more panels.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 95 +++++++++++++++++--------
> 1 file changed, 65 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index b66d6c7128c75..805c9846c2a0b 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> @@ -19,11 +19,28 @@
>
> struct visionox_vtdr6130 {
> struct drm_panel panel;
> - struct drm_dsc_config dsc;
> + struct drm_connector *connector;
Why ? connector is unused in this patch.
> struct mipi_dsi_device *dsi;
> struct gpio_desc *reset_gpio;
> struct regulator_bulk_data *supplies;
> enum drm_panel_orientation orientation;
> + struct visionox_vtdr6130_desc *desc;
> +};
> +
> +struct visionox_vtdr6130_desc {
> + unsigned int width_mm;
> + unsigned int height_mm;
> +
> + unsigned int bpc;
> + unsigned int lanes;
> + unsigned long mode_flags;
> + enum mipi_dsi_pixel_format format;
> +
> + const struct drm_display_mode *modes;
> + unsigned int num_modes;
> + int (*init_sequence)(struct visionox_vtdr6130 *ctx);
> +
> + struct drm_dsc_config dsc;
> };
>
> static const struct regulator_bulk_data visionox_vtdr6130_supplies[] = {
> @@ -162,7 +179,7 @@ static int visionox_vtdr6130_prepare(struct drm_panel *panel)
>
> visionox_vtdr6130_reset(ctx);
>
> - ret = visionox_vtdr6130_on(ctx);
> + ret = ctx->desc->init_sequence(ctx);
> if (ret < 0) {
> gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> regulator_bulk_disable(ARRAY_SIZE(visionox_vtdr6130_supplies),
> @@ -187,34 +204,58 @@ static int visionox_vtdr6130_unprepare(struct drm_panel *panel)
> return 0;
> }
>
> -static const struct drm_display_mode visionox_vtdr6130_mode = {
> - .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
> - .hdisplay = 1080,
> - .hsync_start = 1080 + 20,
> - .hsync_end = 1080 + 20 + 2,
> - .htotal = 1080 + 20 + 2 + 20,
> - .vdisplay = 2400,
> - .vsync_start = 2400 + 20,
> - .vsync_end = 2400 + 20 + 2,
> - .vtotal = 2400 + 20 + 2 + 18,
> +static const struct drm_display_mode visionox_vtdr6130_modes[] = {
> + {
> + .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
> + .hdisplay = 1080,
> + .hsync_start = 1080 + 20,
> + .hsync_end = 1080 + 20 + 2,
> + .htotal = 1080 + 20 + 2 + 20,
> + .vdisplay = 2400,
> + .vsync_start = 2400 + 20,
> + .vsync_end = 2400 + 20 + 2,
> + .vtotal = 2400 + 20 + 2 + 18,
> + },
> +};
> +
> +static struct visionox_vtdr6130_desc visionox_vtdr6130_panel_desc = {
> + .modes = visionox_vtdr6130_modes,
> + .num_modes = ARRAY_SIZE(visionox_vtdr6130_modes),
> .width_mm = 71,
> .height_mm = 157,
Why did you move the width/height out of the mode ?
Leave it in the mode, since you don't even use the same mode for the Retroid 6 panel
> + .bpc = 8,
> + .lanes = 4,
> + .format = MIPI_DSI_FMT_RGB888,
> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET |
> + MIPI_DSI_CLOCK_NON_CONTINUOUS,
> + .init_sequence = visionox_vtdr6130_on,
> + .dsc = {
> + .dsc_version_major = 0x1,
> + .dsc_version_minor = 0x2,
> + .slice_height = 40,
> + .slice_width = 540,
> + .slice_count = 2,
> + .bits_per_component = 8,
> + .bits_per_pixel = 8 << 4,
> + .block_pred_enable = true,
> + },
> };
>
> static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
> struct drm_connector *connector)
> {
> + struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
> struct drm_display_mode *mode;
>
> - mode = drm_mode_duplicate(connector->dev, &visionox_vtdr6130_mode);
> + mode = drm_mode_duplicate(connector->dev, ctx->desc->modes);
> if (!mode)
> return -ENOMEM;
>
> drm_mode_set_name(mode);
>
> mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> - connector->display_info.width_mm = mode->width_mm;
> - connector->display_info.height_mm = mode->height_mm;
> + connector->display_info.width_mm = ctx->desc->width_mm;
> + connector->display_info.height_mm = ctx->desc->height_mm;
Drop this change, take them from the mode.
> drm_mode_probed_add(connector, mode);
>
> return 1;
> @@ -284,23 +325,17 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
> "Failed to get reset-gpios\n");
>
> + ctx->desc = (struct visionox_vtdr6130_desc *)of_device_get_match_data(dev);
> + if (!ctx->desc)
> + return -ENODEV;
> +
> 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 |
> - MIPI_DSI_CLOCK_NON_CONTINUOUS;
> + dsi->dsc = &ctx->desc->dsc;
> + dsi->lanes = ctx->desc->lanes;
> + dsi->format = ctx->desc->format;
> + dsi->mode_flags = ctx->desc->mode_flags;
> ctx->panel.prepare_prev_first = true;
>
> ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
> @@ -322,7 +357,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> }
>
> static const struct of_device_id visionox_vtdr6130_of_match[] = {
> - { .compatible = "visionox,vtdr6130" },
> + { .compatible = "visionox,vtdr6130", .data = &visionox_vtdr6130_panel_desc },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, visionox_vtdr6130_of_match);
>
Thanks,
Neil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel
2026-08-14 18:17 ` [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Aaron Kling via B4 Relay
@ 2026-08-26 9:54 ` Neil Armstrong
0 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2026-08-26 9:54 UTC (permalink / raw)
To: webgeek1234, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel
On 8/14/26 20:17, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@gmail.com>
>
> Add support for the 1080x1920 panel used in the Retroid Pocket 6.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 114 ++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
>
> 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
> @@ -64,6 +64,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);
> + 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);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x6c, 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x6d, 0x00);
> +
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x70, 0x11, 0x00, 0x00, 0x89,
> + 0x30, 0x80, 0x07, 0x80, 0x04, 0x38, 0x00,
> + 0x14, 0x02, 0x1c, 0x02, 0x1c, 0x02, 0x00,
> + 0x02, 0x25, 0x00, 0x20, 0x01, 0xd5, 0x00,
> + 0x07, 0x00, 0x0d, 0x05, 0x7a, 0x05, 0x16,
> + 0x18, 0x00, 0x10, 0xf0, 0x03, 0x0c, 0x20,
> + 0x00, 0x06, 0x0b, 0x0b, 0x33, 0x0e, 0x1c,
> + 0x2a, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70,
> + 0x77, 0x79, 0x7b, 0x7d, 0x7e, 0x01, 0x02,
> + 0x01, 0x00, 0x09, 0x40, 0x09, 0xbe, 0x19,
> + 0xfc, 0x19, 0xfa, 0x19, 0xf8, 0x1a, 0x38,
> + 0x1a, 0x78, 0x1a, 0xb6, 0x2a, 0xb6, 0x2a,
> + 0xf4, 0x2a, 0xf4, 0x4b, 0x34, 0x63, 0x74,
> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
> +
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x10);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb1, 0x02, 0x15, 0x00, 0x14,
> + 0x00, 0x20, 0x00, 0x02, 0x16, 0x00, 0x14,
> + 0x07, 0xb4, 0x00, 0x02, 0x16, 0x00, 0x14,
> + 0x00, 0x10, 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x14);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb2, 0x03, 0x33);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb4, 0x0a, 0x72, 0x00, 0x00,
> + 0x0a, 0x72, 0x00, 0x00, 0x0a, 0x72, 0x00,
> + 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb5, 0x00, 0x1e, 0x1e, 0x1e,
> + 0x1e, 0x1e, 0x1e, 0x06, 0x01);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0x00, 0x00, 0x08, 0x1e,
> + 0x1e, 0x1e);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbc, 0x10, 0x00, 0x00, 0x08,
> + 0x11, 0x1e, 0x7c, 0x1e, 0x7c, 0x1e, 0x7c);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbe, 0x10, 0x10, 0x00, 0x0c,
> + 0x22, 0x1e, 0x62, 0x1e, 0x62, 0x1e, 0x62);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x80);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x65, 0x13);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfd, 0x01);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x81);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf9, 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x83);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x65, 0x04);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf8, 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xaa, 0x00);
> + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x5a, 0x00);
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 150);
> +
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 50);
> +
> + drm_dsc_pps_payload_pack(&pps, dsi->dsc);
> + mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
> + mipi_dsi_compression_mode_multi(&dsi_ctx, true);
> +
> + return dsi_ctx.accum_err;
> +}
> +
> static int visionox_vtdr6130_on(struct visionox_vtdr6130 *ctx)
> {
> struct mipi_dsi_device *dsi = ctx->dsi;
> @@ -204,6 +280,43 @@ static int visionox_vtdr6130_unprepare(struct drm_panel *panel)
> return 0;
> }
>
> +static const struct drm_display_mode retroidpocket_rp6_modes[] = {
> + {
> + .clock = (1080 + 22 + 2 + 16) * (1920 + 16 + 2 + 20) * 120 / 1000,
> + .hdisplay = 1080,
> + .hsync_start = 1080 + 22,
> + .hsync_end = 1080 + 22 + 2,
> + .htotal = 1080 + 22 + 2 + 16,
> + .vdisplay = 1920,
> + .vsync_start = 1920 + 16,
> + .vsync_end = 1920 + 16 + 2,
> + .vtotal = 1920 + 16 + 2 + 20,
> + },
> +};
> +
> +static struct visionox_vtdr6130_desc retroidpocket_rp6_panel_desc = {
> + .modes = retroidpocket_rp6_modes,
> + .num_modes = ARRAY_SIZE(retroidpocket_rp6_modes),
> + .width_mm = 69,
> + .height_mm = 122,
With the dimension in the mode:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
> + .bpc = 8,
> + .lanes = 4,
> + .format = MIPI_DSI_FMT_RGB888,
> + .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET |
> + MIPI_DSI_CLOCK_NON_CONTINUOUS,
> + .init_sequence = retroidpocket_rp6_on,
> + .dsc = {
> + .dsc_version_major = 0x1,
> + .dsc_version_minor = 0x1,
> + .slice_height = 12,
> + .slice_width = 540,
> + .slice_count = 2,
> + .bits_per_component = 8,
> + .bits_per_pixel = 8 << 4,
> + .block_pred_enable = true,
> + },
> +};
> +
> static const struct drm_display_mode visionox_vtdr6130_modes[] = {
> {
> .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
> @@ -357,6 +470,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> }
>
> static const struct of_device_id visionox_vtdr6130_of_match[] = {
> + { .compatible = "retroidpocket,rp6-panel", .data = &retroidpocket_rp6_panel_desc },
> { .compatible = "visionox,vtdr6130", .data = &visionox_vtdr6130_panel_desc },
> { /* sentinel */ }
> };
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support
2026-08-14 18:17 ` [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support Aaron Kling via B4 Relay
@ 2026-08-26 9:58 ` Neil Armstrong
0 siblings, 0 replies; 10+ messages in thread
From: Neil Armstrong @ 2026-08-26 9:58 UTC (permalink / raw)
To: webgeek1234, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: dri-devel, devicetree, linux-kernel
On 8/14/26 20:17, Aaron Kling via B4 Relay wrote:
> From: Aaron Kling <webgeek1234@gmail.com>
>
> Fetch orientation from the device tree if provided.
>
> Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> ---
> drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> index 6733e0e1d0612..b66d6c7128c75 100644
> --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> @@ -11,6 +11,7 @@
> #include <drm/display/drm_dsc.h>
> #include <drm/display/drm_dsc_helper.h>
> #include <drm/drm_mipi_dsi.h>
> +#include <drm/drm_of.h>
> #include <drm/drm_modes.h>
> #include <drm/drm_panel.h>
>
> @@ -22,6 +23,7 @@ struct visionox_vtdr6130 {
> struct mipi_dsi_device *dsi;
> struct gpio_desc *reset_gpio;
> struct regulator_bulk_data *supplies;
> + enum drm_panel_orientation orientation;
> };
>
> static const struct regulator_bulk_data visionox_vtdr6130_supplies[] = {
> @@ -218,10 +220,18 @@ static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
> return 1;
> }
>
> +static enum drm_panel_orientation visionox_vtdr6130_get_orientation(struct drm_panel *panel)
> +{
> + struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
> +
> + return ctx->orientation;
> +}
> +
> static const struct drm_panel_funcs visionox_vtdr6130_panel_funcs = {
> .prepare = visionox_vtdr6130_prepare,
> .unprepare = visionox_vtdr6130_unprepare,
> .get_modes = visionox_vtdr6130_get_modes,
> + .get_orientation = visionox_vtdr6130_get_orientation,
> };
>
> static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
> @@ -293,6 +303,12 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> MIPI_DSI_CLOCK_NON_CONTINUOUS;
> ctx->panel.prepare_prev_first = true;
>
> + ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
> + if (ret < 0) {
> + dev_err(dev, "Failed to get orientation %d\n", ret);
> + return ret;
> + }
> +
> ctx->panel.backlight = visionox_vtdr6130_create_backlight(dsi);
> if (IS_ERR(ctx->panel.backlight))
> return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config
2026-08-26 9:53 ` Neil Armstrong
@ 2026-08-26 17:30 ` Aaron Kling
0 siblings, 0 replies; 10+ messages in thread
From: Aaron Kling @ 2026-08-26 17:30 UTC (permalink / raw)
To: Neil Armstrong
Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, dri-devel, devicetree,
linux-kernel
On Wed, Aug 26, 2026 at 4:53 AM Neil Armstrong
<neil.armstrong@linaro.org> wrote:
>
> On 8/14/26 20:17, Aaron Kling via B4 Relay wrote:
> > From: Aaron Kling <webgeek1234@gmail.com>
> >
> > The vtdr6130 is a DDIC, a common chip that is used by multiple panels.
> > Prepare the driver for more panels.
> >
> > Signed-off-by: Aaron Kling <webgeek1234@gmail.com>
> > ---
> > drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 95 +++++++++++++++++--------
> > 1 file changed, 65 insertions(+), 30 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> > index b66d6c7128c75..805c9846c2a0b 100644
> > --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> > +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
> > @@ -19,11 +19,28 @@
> >
> > struct visionox_vtdr6130 {
> > struct drm_panel panel;
> > - struct drm_dsc_config dsc;
> > + struct drm_connector *connector;
>
> Why ? connector is unused in this patch.
I forgot to strip this when removing multiple mode support. Will fix.
> > struct mipi_dsi_device *dsi;
> > struct gpio_desc *reset_gpio;
> > struct regulator_bulk_data *supplies;
> > enum drm_panel_orientation orientation;
> > + struct visionox_vtdr6130_desc *desc;
> > +};
> > +
> > +struct visionox_vtdr6130_desc {
> > + unsigned int width_mm;
> > + unsigned int height_mm;
> > +
> > + unsigned int bpc;
> > + unsigned int lanes;
> > + unsigned long mode_flags;
> > + enum mipi_dsi_pixel_format format;
> > +
> > + const struct drm_display_mode *modes;
> > + unsigned int num_modes;
> > + int (*init_sequence)(struct visionox_vtdr6130 *ctx);
> > +
> > + struct drm_dsc_config dsc;
> > };
> >
> > static const struct regulator_bulk_data visionox_vtdr6130_supplies[] = {
> > @@ -162,7 +179,7 @@ static int visionox_vtdr6130_prepare(struct drm_panel *panel)
> >
> > visionox_vtdr6130_reset(ctx);
> >
> > - ret = visionox_vtdr6130_on(ctx);
> > + ret = ctx->desc->init_sequence(ctx);
> > if (ret < 0) {
> > gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> > regulator_bulk_disable(ARRAY_SIZE(visionox_vtdr6130_supplies),
> > @@ -187,34 +204,58 @@ static int visionox_vtdr6130_unprepare(struct drm_panel *panel)
> > return 0;
> > }
> >
> > -static const struct drm_display_mode visionox_vtdr6130_mode = {
> > - .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
> > - .hdisplay = 1080,
> > - .hsync_start = 1080 + 20,
> > - .hsync_end = 1080 + 20 + 2,
> > - .htotal = 1080 + 20 + 2 + 20,
> > - .vdisplay = 2400,
> > - .vsync_start = 2400 + 20,
> > - .vsync_end = 2400 + 20 + 2,
> > - .vtotal = 2400 + 20 + 2 + 18,
> > +static const struct drm_display_mode visionox_vtdr6130_modes[] = {
> > + {
> > + .clock = (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000,
> > + .hdisplay = 1080,
> > + .hsync_start = 1080 + 20,
> > + .hsync_end = 1080 + 20 + 2,
> > + .htotal = 1080 + 20 + 2 + 20,
> > + .vdisplay = 2400,
> > + .vsync_start = 2400 + 20,
> > + .vsync_end = 2400 + 20 + 2,
> > + .vtotal = 2400 + 20 + 2 + 18,
> > + },
> > +};
> > +
> > +static struct visionox_vtdr6130_desc visionox_vtdr6130_panel_desc = {
> > + .modes = visionox_vtdr6130_modes,
> > + .num_modes = ARRAY_SIZE(visionox_vtdr6130_modes),
> > .width_mm = 71,
> > .height_mm = 157,
>
> Why did you move the width/height out of the mode ?
>
> Leave it in the mode, since you don't even use the same mode for the Retroid 6 panel
It was moved to support multiple modes, because duplicating the
dimensions across modes is wasteful. This can be deferred to when
multiple modes are supported.
But on that note, has anything happened with implementing the atomic
changes which were going to be a better way to handle multiple modes?
If not, is the handling you asked to be removed from the icna35xx
change [0] still a hard block? Because that does work now to support
multiple modes and I'm currently carrying downstream changes across
several panel drivers to support those. And I'd really like to
eliminate as many downstream changes as I can.
> > + .bpc = 8,
> > + .lanes = 4,
> > + .format = MIPI_DSI_FMT_RGB888,
> > + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET |
> > + MIPI_DSI_CLOCK_NON_CONTINUOUS,
> > + .init_sequence = visionox_vtdr6130_on,
> > + .dsc = {
> > + .dsc_version_major = 0x1,
> > + .dsc_version_minor = 0x2,
> > + .slice_height = 40,
> > + .slice_width = 540,
> > + .slice_count = 2,
> > + .bits_per_component = 8,
> > + .bits_per_pixel = 8 << 4,
> > + .block_pred_enable = true,
> > + },
> > };
> >
> > static int visionox_vtdr6130_get_modes(struct drm_panel *panel,
> > struct drm_connector *connector)
> > {
> > + struct visionox_vtdr6130 *ctx = to_visionox_vtdr6130(panel);
> > struct drm_display_mode *mode;
> >
> > - mode = drm_mode_duplicate(connector->dev, &visionox_vtdr6130_mode);
> > + mode = drm_mode_duplicate(connector->dev, ctx->desc->modes);
> > if (!mode)
> > return -ENOMEM;
> >
> > drm_mode_set_name(mode);
> >
> > mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> > - connector->display_info.width_mm = mode->width_mm;
> > - connector->display_info.height_mm = mode->height_mm;
> > + connector->display_info.width_mm = ctx->desc->width_mm;
> > + connector->display_info.height_mm = ctx->desc->height_mm;
>
> Drop this change, take them from the mode.
Ack.
> > drm_mode_probed_add(connector, mode);
> >
> > return 1;
> > @@ -284,23 +325,17 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> > return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
> > "Failed to get reset-gpios\n");
> >
> > + ctx->desc = (struct visionox_vtdr6130_desc *)of_device_get_match_data(dev);
> > + if (!ctx->desc)
> > + return -ENODEV;
> > +
> > 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 |
> > - MIPI_DSI_CLOCK_NON_CONTINUOUS;
> > + dsi->dsc = &ctx->desc->dsc;
> > + dsi->lanes = ctx->desc->lanes;
> > + dsi->format = ctx->desc->format;
> > + dsi->mode_flags = ctx->desc->mode_flags;
> > ctx->panel.prepare_prev_first = true;
> >
> > ret = drm_of_get_panel_orientation(dev->of_node, &ctx->orientation);
> > @@ -322,7 +357,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_device *dsi)
> > }
> >
> > static const struct of_device_id visionox_vtdr6130_of_match[] = {
> > - { .compatible = "visionox,vtdr6130" },
> > + { .compatible = "visionox,vtdr6130", .data = &visionox_vtdr6130_panel_desc },
> > { /* sentinel */ }
> > };
> > MODULE_DEVICE_TABLE(of, visionox_vtdr6130_of_match);
> >
>
> Thanks,
> Neil
>
Aaron
[0] https://lore.kernel.org/dri-devel/6dd8f137-a4df-4602-9536-b73abff5e7d1@linaro.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-08-26 17:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add " Aaron Kling via B4 Relay
2026-08-20 6:48 ` Krzysztof Kozlowski
2026-08-14 18:17 ` [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support Aaron Kling via B4 Relay
2026-08-26 9:58 ` Neil Armstrong
2026-08-14 18:17 ` [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config Aaron Kling via B4 Relay
2026-08-26 9:53 ` Neil Armstrong
2026-08-26 17:30 ` Aaron Kling
2026-08-14 18:17 ` [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Aaron Kling via B4 Relay
2026-08-26 9:54 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®