From nobody Mon Sep 28 23:55:24 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 9EE773E558C; Fri, 25 Sep 2026 07:08:21 +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=1790320101; cv=none; b=RPghhTCDzueiIW9OCLO78C5aYqSM436q1bvAsL53cBE93nHhVormy5I1b0708hcuwpcVQ0KpTThh2JqPZzpzuUC1lKZfvLVX8O67SFwRmCsWkf1V/+8tmYFpmO56y1l4vyxf+itwFHGla0DjGBpsf+B3W7jKnCTI3goiBL8yMn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790320101; c=relaxed/simple; bh=LJHpmpN4n2fBxLNW85aNGVYEQW9cS+9eIlZD1kckjfA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qRR9a9RS8uKA6JEZ5juPPk52GPlcVeT4dJsBGxXgoj4+wrIL0iiga9ujw8Pk7xDdyG7MKeZXvJAfj9ogJMQVCJ1LQt6RXdFtKJwMfEnBojhT/CdDG3825pX4cH37fDVSOHIlnwy/yESo3muwSIhrr/9EgBZ6cKpVt1b/Y6h11mI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YKCfbKpJ; 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="YKCfbKpJ" Received: by smtp.kernel.org (Postfix) with ESMTPS id 36B8CC2BCF4; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790320101; bh=LJHpmpN4n2fBxLNW85aNGVYEQW9cS+9eIlZD1kckjfA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=YKCfbKpJcWUQyRQqv2zmMyo990Y/8YUz8KlE61LhLA5AYmQ52GBH+jAC4XOo9sYul smvLNhJAMljmrj/hF9wx9dYf/yR7Svuk12eeykUA2/Wa3OMtqfpLtSMAgPPol+AhQG 7sTX33ZU/e2jbdMtOGJj5BEYwRP3U0hHH0LeZDUsJaBd02QNFYx4Z1uOhGqOBeWroo llAQoXJOMPV9SJ6QFwjtJRbtQS7pXQKj9YYQMOhu0SOs0AdQ4Xx49HPBgXhvgiRBGM SS6Zqqex57B1vNwyR5Mt5pWJmZIgtfALhVFURl93aQdP3M07ebMOqKdy2CNI8QWtkY YMc5+P2c/2k2w== 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 1891DC9830D; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 25 Sep 2026 02:08:19 -0500 Subject: [PATCH v2 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: <20260925-rp6-panel-v2-1-19c425e523de@gmail.com> References: <20260925-rp6-panel-v2-0-19c425e523de@gmail.com> In-Reply-To: <20260925-rp6-panel-v2-0-19c425e523de@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 , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1790320100; l=1472; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=CaFv5K6fLpukUu5HCZg1CekyTprxOvXYUWdp65fN9W4=; b=x2KA/yVp8ENHhH1eGMIPO0tkZ9gjdp/e6GlDCY17U4OW/K1BftQn7yW1B6uQLq4+saUI8+72j PtLsKVJj21EBxnxO+1wgaaSYz48EQkDZqdprq3QWaK/fuvw/5GV1OEr 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. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Aaron Kling --- .../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:24 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 9EDC93D75D1; Fri, 25 Sep 2026 07:08:21 +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=1790320101; cv=none; b=EHcbn6JvoyGlW6kfo89nlXrt3QEf+r8sGs0wpmamgyedUUKaWvvc4nvRCT1dw0+WM7ElciBXMGkShO2dQ1qu5EXIMzi4JsqW8StPgYCC5lOHSjJLVBUm29ewlD5RXbVwmRRDzGwBZRdOwz3F+e+mlIZDAFPAG3YF850+EtSj4Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790320101; c=relaxed/simple; bh=Ye1Lwu6HhMt9l1l+ih9pWPnf6Cac+RNhY9u/U+CqJrM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WXhGF8gj1poFQbAt6iMNJm2HvHRf704ERSs7aahVD1zVy2V1ejgx2Iw9j0rUN034HWdHknKJs5bkk1dBzFvISMvpQcE+Uzd/X9cqzDrCX8kJijyzYkyeDK7KzlpDBNCJwAMV1B0HBa4JKnvPG+oNeI8KI7xT3HW52WMz//xomWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lyGhofsf; 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="lyGhofsf" Received: by smtp.kernel.org (Postfix) with ESMTPS id 46D35C2BCF7; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790320101; bh=Ye1Lwu6HhMt9l1l+ih9pWPnf6Cac+RNhY9u/U+CqJrM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=lyGhofsf/D78UugMYMcJIxG6o5VmVwwWIVd8bMXMUHGOC39UW7rG6kq//qx9SoNDt cNQSgOQnJ3hdup6OfGilg8YJVHSsGEB8VZU8P0htbDQ6fU7pgwb4XIgOXhzFBipZcJ umb5YBe3anjq4gqXPXkUqoH9SgScHJZELZ7ffcs+PcFePSgnENFlgdFruArCcDJvG3 BGPxHTQcBDRfRtLBYRA9ziAHVYf2uQ2YFMjcXwW837r1CB29oVQLMSehYBWTNGedBF oHv5ccS5R01KNs8a1DpugLTaTfmzarCSFw+8viZcjeLzAIrOElPLVAwgIwVyIqMkVK JLepDiu8NWMNg== 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 27916C98326; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 25 Sep 2026 02:08:20 -0500 Subject: [PATCH v2 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: <20260925-rp6-panel-v2-2-19c425e523de@gmail.com> References: <20260925-rp6-panel-v2-0-19c425e523de@gmail.com> In-Reply-To: <20260925-rp6-panel-v2-0-19c425e523de@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=1790320100; l=2208; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=XYfhvMoyxwMtq/M1dOwLhFn0oqv6k+OlxjCG6KQEnFE=; b=ugTdYHBOlhgxveZ3vh05Cq9/fm4/x7uPDm7b3ziQhPe6yODtFtKzIESE7H/W+qaTGFQ6quPvC t47Uo0vVC37A+4sH5X+mVvp+UFrN8nFzV2zbFuBiwHojSsFTGKz8LrL 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. Reviewed-by: Neil Armstrong Signed-off-by: Aaron Kling --- 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:24 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 9EC6B356777; Fri, 25 Sep 2026 07:08:21 +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=1790320101; cv=none; b=niHrPZV7d9zXy4DjhzmikSNIo+yc5eUauVuJ2gSnji+oSkPvptYLEsqrqV8lfpnQQfdqCNLKjsx4O3B1MeO8i0s2g0YMiS3ZnkJWgM4hCIJX9cnmmi7CQR0Xpi7rfCZiKKS4USEIfZfe3+CKGcTaCSC5OttoR/yjIjjCyQpfOmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790320101; c=relaxed/simple; bh=cN3OlMdPtMW9M/6XwvF6ok0FDaDGuXphGzxIpOzDFnk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SJ3gIYjVuuSRVxSZwYlv6yzQtEc0JSOukRED+vOr1i9AvKZKoKZDzA+6FR+nFKJ39mOdiHmPDeUhKvljKuZpqY6fb/xRzVFcXSHT2FeRWXmF8//tiodpwug6D25hlnnUipo7n1UqAH7l5GfOV++Y40MEikfyeEr8DKe1mhHyOjA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WsUbazKP; 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="WsUbazKP" Received: by smtp.kernel.org (Postfix) with ESMTPS id 51FC4C2BCFC; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790320101; bh=cN3OlMdPtMW9M/6XwvF6ok0FDaDGuXphGzxIpOzDFnk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WsUbazKPOd61rHvhdKj1+C4TbpwAV6d4jbzmwD+DR7n0pYwtUVsECUQMPSMdbZhqN EFLvvcVgDF6kT9UgfR6qw2+caFzJGIiBpN95G3Jl/1khwYdwo5lsQZ33FhZLmgZghN LT20Vf9pIDHU3k9dxCq9D3kWwnP6CAnQs6BbfKrSh+63jkdRrQIcUgQv29dxHV1Ul9 /TZMm1udU3w9zttlwIOA7Lxk0RFOX5tBrmK28Zlx7kZRrjZZwF3JOm2nx0Zvt+mZTZ LVZDjSRDDMF/qx3FsNBVwFNbE5zdVEFHmqhNizqIzK9LmwVN3xD1777inHx7MKeOzc x2d+CHJYC2ArA== 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 36C7FC9830E; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 25 Sep 2026 02:08:21 -0500 Subject: [PATCH v2 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: <20260925-rp6-panel-v2-3-19c425e523de@gmail.com> References: <20260925-rp6-panel-v2-0-19c425e523de@gmail.com> In-Reply-To: <20260925-rp6-panel-v2-0-19c425e523de@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=1790320100; l=5035; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=oRgQFG+Me9dofHYSw/NC9OmBO4cg+QFRt96qK9Xmzh0=; b=BSv/bLFo8oSvDcDHQa9j91sG03LuCGd824UrK8gCRTp9mDI3SBPycLwD7zP05SWo2VCu57tT3 Zlb6ggdc7IOAMLqq486JROppBFel7RkhSdkJ8jDw5eA+cUtC3kXpSi2 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 Reviewed-by: Neil Armstrong --- drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 91 +++++++++++++++++----= ---- 1 file changed, 61 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..278f5acc2d661 100644 --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c @@ -19,11 +19,24 @@ =20 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; enum drm_panel_orientation orientation; + struct visionox_vtdr6130_desc *desc; +}; + +struct visionox_vtdr6130_desc { + 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 +175,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,26 +200,50 @@ 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, - .width_mm =3D 71, - .height_mm =3D 157, +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, + .width_mm =3D 71, + .height_mm =3D 157, + }, +}; + +static struct visionox_vtdr6130_desc visionox_vtdr6130_panel_desc =3D { + .modes =3D visionox_vtdr6130_modes, + .num_modes =3D ARRAY_SIZE(visionox_vtdr6130_modes), + .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 @@ -284,23 +321,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 +353,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:24 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 9EBD2126C02; Fri, 25 Sep 2026 07:08:21 +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=1790320101; cv=none; b=BwO4WmIXU4q1wAQG2V9+M9eagcYiBSLx9scbou04Os1j/Af6SBEPzJc8ZYQTC1R33GGLO9JGb+CM19zl/TeniP4oaYpUig8x9lTz1Yj5IH+8Ak+OCxdVSgKQcftgmsiATdJFaGXq0sVXp6ABAYjbC9jFqI0D8p9o6744SR1Dqwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790320101; c=relaxed/simple; bh=8etL+wAs3Ize3LP595qqpuZ9KDwh/FUcMQQ9FuaU0Lc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=W7Ftr5+EZLBWPP086xKDG6jBeP2XV1ofBxkkl8Qu+HjIhwyd2QssoF00QnKJCL49t3y1D/Pp1CdAkt1PwrcoDl7ftuzA5e4EVQoKwDU9b7/jSSApvUQnU7kpwAihuPxXHyHgueERnY2ykTXeWotPIsvIdkEKt1YpJnVglVhDRG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GgACLZmf; 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="GgACLZmf" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5D197C2BCFF; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1790320101; bh=8etL+wAs3Ize3LP595qqpuZ9KDwh/FUcMQQ9FuaU0Lc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=GgACLZmfAVKOvmdV1bh7w7e61ro2Kl609Z7toDiwX+U26Ef+eZ9J7b9uz1Nc+++ko djrgypZtsO3wiJqsq23nI51EUXQOzDOrBI5MAWp0GHjwkCWffkDhh7jZnd3SVUxDJa v+yc5hl1JWcJPdsa9jCd+JFivnxNxdPWdSS/9NCD2smL+E7pbQkEYEqX6VuTefrMQR o3ByUsqSHiN7wJJD4D6pOEQ9St/JSFc5V5a9i4sUfNC4s3G44iRwFUjt9rOD2QXLln M6qlWwBb/nHRvhJMLiUNpAnuXFU4uqOEBzYSL+zsDZ6lQKxbne2sVWcQQ1aRYa4fAn xbEnvhlVXa+Tg== 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 45D06C98328; Fri, 25 Sep 2026 07:08:21 +0000 (UTC) From: Aaron Kling via B4 Relay Date: Fri, 25 Sep 2026 02:08:22 -0500 Subject: [PATCH v2 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: <20260925-rp6-panel-v2-4-19c425e523de@gmail.com> References: <20260925-rp6-panel-v2-0-19c425e523de@gmail.com> In-Reply-To: <20260925-rp6-panel-v2-0-19c425e523de@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=1790320100; l=6014; i=webgeek1234@gmail.com; s=20250217; h=from:subject:message-id; bh=KK2X91MsaixtTJvsZhX3AF+6Xf7FsHhTOW13xw4bzA0=; b=n9gro6KbuHIq9LRGBxSsfQnTdP577N5Y5RXJjt7mTqOO/1RjkJmQpigYn3aYRBkAf+t2S2bB3 HdgDwMduGpFBQU1U3iENE8tOeqO07IwlG50kRABLqLYlj1ufqWSPu+v 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. Reviewed-by: Neil Armstrong Signed-off-by: Aaron Kling --- 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 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_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; @@ -200,6 +276,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, + .width_mm =3D 69, + .height_mm =3D 122, + }, +}; + +static struct visionox_vtdr6130_desc retroidpocket_rp6_panel_desc =3D { + .modes =3D retroidpocket_rp6_modes, + .num_modes =3D ARRAY_SIZE(retroidpocket_rp6_modes), + .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, @@ -353,6 +466,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