From nobody Mon Sep 28 23:55:25 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDF5246F4A6; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; cv=none; b=cMEAsedT21qQL2okAomVm27RleEjdo64I52Xo2xI+4qW+xIBha0vuDzdL0suumw/8WCcZuVIP6gqj4OdiP9krSrwDYA1AWe8MpIZnUiAFC/xM1ZX6gNaazTlTllUmMRLw6ykWAUfpUMeLFe8yvueft+xRChMi2fKCL6fRe9X5IQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; c=relaxed/simple; bh=Gv1Ja9rXOy+qt4Q/cn2nHzoCvAUeO/JKq+rbKEBiDXg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IkScyZeClo7EfU5cEmV9YRSuV8CTEN2PVnqWceIP9UIwcrOB4vazbe7r8UkdVpDKzyoZOlf/TJG5EjO4t5rVJnI6hK4EYRdmcw5uWO6vgFAJY9Q+nsxHQPjXkvgY5TTXad7xxM9IWzhHw8EHQDXZu1evZoLbAxiXA7iu5vUTvAQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I8wfFn+s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I8wfFn+s" Received: by smtp.kernel.org (Postfix) with ESMTPS id 84001C2BCF4; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1786731445; bh=Gv1Ja9rXOy+qt4Q/cn2nHzoCvAUeO/JKq+rbKEBiDXg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=I8wfFn+sv02WU0/0WmnNPNBdd1Q5AreHmD5FS9guoaNreL6Mhsw3UdXlRt68xIY2o 6ceaWR9rCYzTJIRgxhVdCHuLKzUw8NypcuObNtTw8rumuMJCA4/tL9zPqgvD84PK9u jFNY7Oec4ZzWEH4YywXjpJQm7/Qzrwa5cJ9r3/Mlrbkb8k8AQlQZb4A2u5DqRDiybP yPUI9t2AN+GSOep5bguo4owgc4h11J/vfGZF3/qoEDIHAmWN5sFfybS6gVlRdnlTD1 lG0QO7Z2tuS/XWdhIl2nFhuk5AzzFlINxP4iOzQzX1p1i1lskl6S+fzCz5/PPYRosB IGDry10yRPZjg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64A0BC5CFCF; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 14 Aug 2026 13:17:15 -0500 Subject: [PATCH 1/4] dt-bindings: display: visionox,vtdr6130: Add Retroid Pocket 6 panel Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260814-rp6-panel-v1-1-111c1aeccf0f@gmail.com> References: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> In-Reply-To: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Aaron Kling X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786731444; l=1399; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=cQAQT+SLMV+AccWuQQKaYy2+/aNZWvo6kpA1OLjfeeY=; b=A+OJcGc0F92v2IjBPJqtFUxJPBwVQP3I5db3lJXiaBz0ehSB6z9WkgxJyWku6MwVq9Xs2tiUp Gu2NF5e4thSDn7/DDNVVnVojfvHStxAXVgJgh1TocmUg1RXOynWzqA2 X-Developer-Key: i=webgeek1234@gmail.com; a=ed25519; pk=TQwd6q26txw7bkK7B8qtI/kcAohZc7bHHGSD7domdrU= X-Endpoint-Received: by B4 Relay for webgeek1234@gmail.com/20250217 with auth_id=342 X-Original-From: Aaron Kling Reply-To: webgeek1234@gmail.com From: Aaron Kling 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 Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/display/panel/visionox,vtdr6130.yaml | 8 ++++= ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/visionox,vtdr6= 130.yaml b/Documentation/devicetree/bindings/display/panel/visionox,vtdr613= 0.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: =20 properties: compatible: - const: visionox,vtdr6130 + oneOf: + - const: visionox,vtdr6130 + - items: + - const: retroidpocket,rp6-panel + - const: visionox,vtdr6130 =20 reg: maxItems: 1 @@ -25,13 +29,13 @@ properties: vdd-supply: true port: true reset-gpios: true + rotation: true =20 required: - compatible - reg - vddio-supply - vci-supply - - vdd-supply - reset-gpios - port =20 --=20 2.54.0 From nobody Mon Sep 28 23:55:25 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE01647884D; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; cv=none; b=arkPTMXnzbh6BuWdMLBasoVoOFVawLl4C9+5yCI2KEaeAI6RowSz8eBzhtWp/wflnSMggNC5RsQFQCUaA3HOeOqrfPxD72OTC31MV5z/5bQGL6r4KkMXfDVTqAUzxx+Mfm+X5F4bCW4czBxAzos7+U1QanF8JzWmIVikViy/Yyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; c=relaxed/simple; bh=ni83lAkjW3cN40ar+5EYINhjWhYIukoZMP7+kR2Mdoc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OKcRaAqKCcGGkSN/7K7g3oIb1I25fjVKNNNulc78NPSP/UgsaWw7079sAyZENEvA3KkXqouffkFIEJJY/Dz0pZT3bak8sVDdGUT0EE9UapEgWxrl8yLzmrvOnfzuF9eivgmpUPcjmvBIEyFZtwlF9oLyyT/qwpOdPy+py73DTkI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eQ/bzyuj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eQ/bzyuj" Received: by smtp.kernel.org (Postfix) with ESMTPS id 8F165C2BCF7; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1786731445; bh=ni83lAkjW3cN40ar+5EYINhjWhYIukoZMP7+kR2Mdoc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=eQ/bzyujoUCVHp2AS7DA9uIZgH/i8uKpzes8X6en8XldPbcFgPlV+SskUkS/MsQ7v zJTLogeeY7Mf2ShNk6QY3jrRUa1/8w6lR1ua5oe1RR6ZfBg0rIfdhVJVMtP4WClzkG 6RuyCUKBQKqFyVns4r4A7TD8qUsKJ9eFYXU03yg2hoGlnhJv9LYE3wlXw1kFI+n7Zh Yzv+U7hYlQSbnVIggULakAyuLZOzAOEfV98r6ctsGIEURaZ1wyQoVVXoxlwl3yY0cw aO2To36ZKAb6DvMqcanZfHKGIJNGHyGx5qq6dx7rzyxTTXXODHHy/jDSwVjBKqYagx YprXpb6i5mvqQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70A5AC5CFC1; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 14 Aug 2026 13:17:16 -0500 Subject: [PATCH 2/4] drm/panel: visionox-vtdr6130: Add panel orientation support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260814-rp6-panel-v1-2-111c1aeccf0f@gmail.com> References: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> In-Reply-To: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Aaron Kling X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786731444; l=2151; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=4JX6sGMnacRMev7Y2NB1fqlDR3ay0oZY4tGf8LDcUXo=; b=6/+fhseOqGwuzVTrK8mjJIk6IAvTfvSSDevDcYlE1IDi9uaZS7uCpilQC+CPlK7cCfl6sbb+N N4OQ1jIWz4eAZiG+Tbtne8i+mM4rorRL50C7rVSj4vfqtJFVmrukTq0 X-Developer-Key: i=webgeek1234@gmail.com; a=ed25519; pk=TQwd6q26txw7bkK7B8qtI/kcAohZc7bHHGSD7domdrU= X-Endpoint-Received: by B4 Relay for webgeek1234@gmail.com/20250217 with auth_id=342 X-Original-From: Aaron Kling Reply-To: webgeek1234@gmail.com From: Aaron Kling Fetch orientation from the device tree if provided. Signed-off-by: Aaron Kling Reviewed-by: Neil Armstrong --- 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 #include #include +#include #include #include =20 @@ -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; }; =20 static const struct regulator_bulk_data visionox_vtdr6130_supplies[] =3D { @@ -218,10 +220,18 @@ static int visionox_vtdr6130_get_modes(struct drm_pan= el *panel, return 1; } =20 +static enum drm_panel_orientation visionox_vtdr6130_get_orientation(struct= drm_panel *panel) +{ + struct visionox_vtdr6130 *ctx =3D to_visionox_vtdr6130(panel); + + return ctx->orientation; +} + static const struct drm_panel_funcs visionox_vtdr6130_panel_funcs =3D { .prepare =3D visionox_vtdr6130_prepare, .unprepare =3D visionox_vtdr6130_unprepare, .get_modes =3D visionox_vtdr6130_get_modes, + .get_orientation =3D visionox_vtdr6130_get_orientation, }; =20 static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl) @@ -293,6 +303,12 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_dev= ice *dsi) MIPI_DSI_CLOCK_NON_CONTINUOUS; ctx->panel.prepare_prev_first =3D true; =20 + ret =3D 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 =3D visionox_vtdr6130_create_backlight(dsi); if (IS_ERR(ctx->panel.backlight)) return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), --=20 2.54.0 From nobody Mon Sep 28 23:55:25 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDDDC353A75; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; cv=none; b=PsLPaHflm8/Q81BV4hHR6x+XKd1iMUEk8yFGRD8oqZOf+Hheb4JJ52o+lUxh3lMhBX1mEDv1P7dcMTLcrVcbJz42BkVWkOyiqtsZVSqc72PwrNG4vmFVXtCEHGFuSzV4kgKoi8N5AL1f+fFXslQEM547OkCOMF98tsMdpRCZyCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; c=relaxed/simple; bh=WYFvB3Li1+6xn+zfnX9sd8rDHAr1cCTWibX8WJb+s1E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XxCLnhqMAG8YcveTpmisOVhdsDb0RVgjpjI1QRh8m0cyFliOynlqNJ5nzJDZ/uQ3bVQtI3MlDcwrd7kZ7kC4eVoUYajkqwiQB8tYG7RfS90wQe9MZcav1Sjb7rMQ3IMApQGXkecMT2G9h+uoziWAYSHi4+jMOMzQ8GaZWFvlap8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jXHsQVhD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jXHsQVhD" Received: by smtp.kernel.org (Postfix) with ESMTPS id 9A286C2BCF6; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1786731445; bh=WYFvB3Li1+6xn+zfnX9sd8rDHAr1cCTWibX8WJb+s1E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=jXHsQVhDzAE8ZB+X1KWQoqSTfFjq7DYG3J+3PFJnmAEMM8Qx+3h8sJ9ZmGeWX19sV qQVreji2pI+R3JlqkGemtwn5CN7nlRI0Z/AjAw4krkqxWAYg/rb3jOUMCY3IS49cdE y3gBie0rtWLqzzo1nrv3dBwhMTsvFCFa457ft7HFaTWa+MGRXaML75wy7L5cAK4os3 boxtnNd2GWO8Uw5SYdOwSqlA9Pqi6s7j58XoRXFL8ap/2o1ouuuJxFxjIimkjz69do xMwZRrDk6Cthc4SYv8ufQpbd0aowhbtVOd9NZv6xkK7RDfciRMIRpNwplkC8i3r2Av iNTk5YwsUzHVg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DEBEC5DF6A; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 14 Aug 2026 13:17:17 -0500 Subject: [PATCH 3/4] drm/panel: visionox-vtdr6130: Modularize panel config Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260814-rp6-panel-v1-3-111c1aeccf0f@gmail.com> References: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> In-Reply-To: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Aaron Kling X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786731444; l=5467; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=DCitivrRVpNuYH4Jt4HFt8eBqH1HZ4CWSQVXa+YmjUU=; b=Z4WxlA+rHdTHwk1JjtkjjZrFN8y0j6keSVeVkhdu6FCpmSBUtSA2d5OWFy5gKaKHhPcPJzfyg 2rRXcgU7y1uDi/INWgHUuKPdRG1DHwL5a65oO5rNshz3AC+cm12jaG3 X-Developer-Key: i=webgeek1234@gmail.com; a=ed25519; pk=TQwd6q26txw7bkK7B8qtI/kcAohZc7bHHGSD7domdrU= X-Endpoint-Received: by B4 Relay for webgeek1234@gmail.com/20250217 with auth_id=342 X-Original-From: Aaron Kling Reply-To: webgeek1234@gmail.com From: Aaron Kling 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 --- 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 @@ =20 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; }; =20 static const struct regulator_bulk_data visionox_vtdr6130_supplies[] =3D { @@ -162,7 +179,7 @@ static int visionox_vtdr6130_prepare(struct drm_panel *= panel) =20 visionox_vtdr6130_reset(ctx); =20 - ret =3D visionox_vtdr6130_on(ctx); + ret =3D 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_pan= el *panel) return 0; } =20 -static const struct drm_display_mode visionox_vtdr6130_mode =3D { - .clock =3D (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000, - .hdisplay =3D 1080, - .hsync_start =3D 1080 + 20, - .hsync_end =3D 1080 + 20 + 2, - .htotal =3D 1080 + 20 + 2 + 20, - .vdisplay =3D 2400, - .vsync_start =3D 2400 + 20, - .vsync_end =3D 2400 + 20 + 2, - .vtotal =3D 2400 + 20 + 2 + 18, +static const struct drm_display_mode visionox_vtdr6130_modes[] =3D { + { + .clock =3D (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000, + .hdisplay =3D 1080, + .hsync_start =3D 1080 + 20, + .hsync_end =3D 1080 + 20 + 2, + .htotal =3D 1080 + 20 + 2 + 20, + .vdisplay =3D 2400, + .vsync_start =3D 2400 + 20, + .vsync_end =3D 2400 + 20 + 2, + .vtotal =3D 2400 + 20 + 2 + 18, + }, +}; + +static struct visionox_vtdr6130_desc visionox_vtdr6130_panel_desc =3D { + .modes =3D visionox_vtdr6130_modes, + .num_modes =3D ARRAY_SIZE(visionox_vtdr6130_modes), .width_mm =3D 71, .height_mm =3D 157, + .bpc =3D 8, + .lanes =3D 4, + .format =3D MIPI_DSI_FMT_RGB888, + .mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET | + MIPI_DSI_CLOCK_NON_CONTINUOUS, + .init_sequence =3D visionox_vtdr6130_on, + .dsc =3D { + .dsc_version_major =3D 0x1, + .dsc_version_minor =3D 0x2, + .slice_height =3D 40, + .slice_width =3D 540, + .slice_count =3D 2, + .bits_per_component =3D 8, + .bits_per_pixel =3D 8 << 4, + .block_pred_enable =3D true, + }, }; =20 static int visionox_vtdr6130_get_modes(struct drm_panel *panel, struct drm_connector *connector) { + struct visionox_vtdr6130 *ctx =3D to_visionox_vtdr6130(panel); struct drm_display_mode *mode; =20 - mode =3D drm_mode_duplicate(connector->dev, &visionox_vtdr6130_mode); + mode =3D drm_mode_duplicate(connector->dev, ctx->desc->modes); if (!mode) return -ENOMEM; =20 drm_mode_set_name(mode); =20 mode->type =3D DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; - connector->display_info.width_mm =3D mode->width_mm; - connector->display_info.height_mm =3D mode->height_mm; + connector->display_info.width_mm =3D ctx->desc->width_mm; + connector->display_info.height_mm =3D ctx->desc->height_mm; drm_mode_probed_add(connector, mode); =20 return 1; @@ -284,23 +325,17 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_de= vice *dsi) return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), "Failed to get reset-gpios\n"); =20 + ctx->desc =3D (struct visionox_vtdr6130_desc *)of_device_get_match_data(d= ev); + if (!ctx->desc) + return -ENODEV; + ctx->dsi =3D dsi; mipi_dsi_set_drvdata(dsi, ctx); =20 - ctx->dsc.dsc_version_major =3D 0x1; - ctx->dsc.dsc_version_minor =3D 0x2; - ctx->dsc.slice_height =3D 40; - ctx->dsc.slice_width =3D 540; - ctx->dsc.slice_count =3D 2; - ctx->dsc.bits_per_component =3D 8; - ctx->dsc.bits_per_pixel =3D 8 << 4; - ctx->dsc.block_pred_enable =3D true; - - dsi->dsc =3D &ctx->dsc; - dsi->lanes =3D 4; - dsi->format =3D MIPI_DSI_FMT_RGB888; - dsi->mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET | - MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->dsc =3D &ctx->desc->dsc; + dsi->lanes =3D ctx->desc->lanes; + dsi->format =3D ctx->desc->format; + dsi->mode_flags =3D ctx->desc->mode_flags; ctx->panel.prepare_prev_first =3D true; =20 ret =3D drm_of_get_panel_orientation(dev->of_node, &ctx->orientation); @@ -322,7 +357,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_devi= ce *dsi) } =20 static const struct of_device_id visionox_vtdr6130_of_match[] =3D { - { .compatible =3D "visionox,vtdr6130" }, + { .compatible =3D "visionox,vtdr6130", .data =3D &visionox_vtdr6130_panel= _desc }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, visionox_vtdr6130_of_match); --=20 2.54.0 From nobody Mon Sep 28 23:55:25 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE09F47ECCE; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; cv=none; b=mkLwa7hokuJOtbjU1mocXFxlmVtJK83SIl+KqzaCxKPw/2nnqEYGC6EaC8zhaf+1KMTiFzCkbsbIOQ5ylUqhdSDFr55ISQepGhuWsQJ+3aRm22KuDaJB2q1kXG9XbRH0nTYrhZ8vPwSeqZRBvrZPDTesjwVGUv6RxsKbSKjFN1Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786731445; c=relaxed/simple; bh=1MPr4rGoFxfu9TCrLGTGX7zedHFXd2bdnPYvUds2ZtQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JUrqAIFiVpc0g8IVVZnpbuutq8N/I9N59zV/qt9bemgt3LuNARaS7UWZhQ2l+sLBwVG9RfPM6X4dyFE1LJHlhkbycCpYqIsGRkhrhqcDfVtJS1YQLB7Nf+Q61gAgsRZ6TkvC8FGX6pS+DLg31y6wyGP2FAzO2UX0Cnk6l/9NRMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AMaSB3Oq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AMaSB3Oq" Received: by smtp.kernel.org (Postfix) with ESMTPS id A7BABC2BCFD; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1786731445; bh=1MPr4rGoFxfu9TCrLGTGX7zedHFXd2bdnPYvUds2ZtQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=AMaSB3OqASGKiW/5XBx+yppEL7QgWgzT4Sxa9qZtBafaW8+RovCdbN1r0GR/PRqJE SwCs2exAxnJXv0Pl9PrrDcKaxCU+19zYZfeo19EH5RlhBEXlwUM3NoX654dizq1qXk /4z03g+eg3IW77dXnGx3UdiVRmBQL6D8Ktg68HUVkZvfj9Sd9OTY6hL0acmjuJoM37 5Bafktfm/hX+a1c3qQq4VwVgqZ9LhBrU8oIew/GkZZKl4aOX8N2CjZdoc+J/tUFRuE kOwTk4qwnh8MZmuhJ6dDnB5VEtsRnYNUng7hSugSgghS/CW/uIX5gLiYd1zYKvc6P1 0TvWGdf618TYQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AE04C5DF67; Fri, 14 Aug 2026 18:17:25 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 14 Aug 2026 13:17:18 -0500 Subject: [PATCH 4/4] drm/panel: visionox-vtdr6130: Add Retroid Pocket 6 panel Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260814-rp6-panel-v1-4-111c1aeccf0f@gmail.com> References: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> In-Reply-To: <20260814-rp6-panel-v1-0-111c1aeccf0f@gmail.com> To: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Aaron Kling X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786731444; l=5955; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=ScONlIwrZwNMIN+M+MGr8r32XLjgu4rOUqB4e+erUgM=; b=p9lT/EMgzOHfrzYKT9P7Pdttysxrovh1I7+q7zIQ9X2FyuG0ekb4kXgPVFrv3g2hWGRg6zNXb WgaXolNh38XCru0gvJoR5DLNz1+kx+nPy+Oen6YGukigzDwdeMuZuMH X-Developer-Key: i=webgeek1234@gmail.com; a=ed25519; pk=TQwd6q26txw7bkK7B8qtI/kcAohZc7bHHGSD7domdrU= X-Endpoint-Received: by B4 Relay for webgeek1234@gmail.com/20250217 with auth_id=342 X-Original-From: Aaron Kling Reply-To: webgeek1234@gmail.com From: Aaron Kling Add support for the 1080x1920 panel used in the Retroid Pocket 6. Signed-off-by: Aaron Kling Reviewed-by: Neil Armstrong --- 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_vtdr= 6130 *ctx) usleep_range(10000, 11000); } =20 +static int retroidpocket_rp6_on(struct visionox_vtdr6130 *ctx) +{ + struct mipi_dsi_device *dsi =3D ctx->dsi; + struct mipi_dsi_multi_context dsi_ctx =3D { .dsi =3D dsi }; + struct drm_dsc_picture_parameter_set pps; + + dsi->mode_flags |=3D 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 =3D ctx->dsi; @@ -204,6 +280,43 @@ static int visionox_vtdr6130_unprepare(struct drm_pane= l *panel) return 0; } =20 +static const struct drm_display_mode retroidpocket_rp6_modes[] =3D { + { + .clock =3D (1080 + 22 + 2 + 16) * (1920 + 16 + 2 + 20) * 120 / 1000, + .hdisplay =3D 1080, + .hsync_start =3D 1080 + 22, + .hsync_end =3D 1080 + 22 + 2, + .htotal =3D 1080 + 22 + 2 + 16, + .vdisplay =3D 1920, + .vsync_start =3D 1920 + 16, + .vsync_end =3D 1920 + 16 + 2, + .vtotal =3D 1920 + 16 + 2 + 20, + }, +}; + +static struct visionox_vtdr6130_desc retroidpocket_rp6_panel_desc =3D { + .modes =3D retroidpocket_rp6_modes, + .num_modes =3D ARRAY_SIZE(retroidpocket_rp6_modes), + .width_mm =3D 69, + .height_mm =3D 122, + .bpc =3D 8, + .lanes =3D 4, + .format =3D MIPI_DSI_FMT_RGB888, + .mode_flags =3D MIPI_DSI_MODE_NO_EOT_PACKET | + MIPI_DSI_CLOCK_NON_CONTINUOUS, + .init_sequence =3D retroidpocket_rp6_on, + .dsc =3D { + .dsc_version_major =3D 0x1, + .dsc_version_minor =3D 0x1, + .slice_height =3D 12, + .slice_width =3D 540, + .slice_count =3D 2, + .bits_per_component =3D 8, + .bits_per_pixel =3D 8 << 4, + .block_pred_enable =3D true, + }, +}; + static const struct drm_display_mode visionox_vtdr6130_modes[] =3D { { .clock =3D (1080 + 20 + 2 + 20) * (2400 + 20 + 2 + 18) * 144 / 1000, @@ -357,6 +470,7 @@ static int visionox_vtdr6130_probe(struct mipi_dsi_devi= ce *dsi) } =20 static const struct of_device_id visionox_vtdr6130_of_match[] =3D { + { .compatible =3D "retroidpocket,rp6-panel", .data =3D &retroidpocket_rp6= _panel_desc }, { .compatible =3D "visionox,vtdr6130", .data =3D &visionox_vtdr6130_panel= _desc }, { /* sentinel */ } }; --=20 2.54.0