* [PATCH 0/2] drm/panel: Add support for Novatek NT37802
@ 2026-11-04 9:11 Jayant Shekhar
2026-11-04 9:11 ` [PATCH 1/2] dt-bindings: display: panel: Add " Jayant Shekhar
2026-11-04 9:11 ` [PATCH 2/2] drm/panel: Add driver for " Jayant Shekhar
0 siblings, 2 replies; 7+ messages in thread
From: Jayant Shekhar @ 2026-11-04 9:11 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jayant Shekhar
Cc: dri-devel, devicetree, linux-kernel, Jayant Shekhar
Add support for the Novatek NT37802 AMOLED DSI command-mode panel used
with the Maili/Pebble platform.
This series first documents the panel's Devicetree binding, then adds a
DRM panel driver and enables it in arm64 defconfig. The driver provides
the 1440x3200@120Hz mode with DSC 1.2 over four DSI lanes, sequences
the panel supplies and reset GPIO, and exposes DCS brightness control.
Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
---
Jayant Shekhar (2):
dt-bindings: display: panel: Add Novatek NT37802
drm/panel: Add driver for Novatek NT37802
.../bindings/display/panel/novatek,nt37802.yaml | 69 +++
arch/arm64/configs/defconfig | 1 +
drivers/gpu/drm/panel/Kconfig | 16 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-novatek-nt37802.c | 544 +++++++++++++++++++++
5 files changed, 631 insertions(+)
---
base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97
change-id: 20261104-jshekhar-nt37802-a5a079c4cdce
Best regards,
--
Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] dt-bindings: display: panel: Add Novatek NT37802
2026-11-04 9:11 [PATCH 0/2] drm/panel: Add support for Novatek NT37802 Jayant Shekhar
@ 2026-11-04 9:11 ` Jayant Shekhar
2026-11-04 9:20 ` sashiko-bot
2026-11-04 15:32 ` Krzysztof Kozlowski
2026-11-04 9:11 ` [PATCH 2/2] drm/panel: Add driver for " Jayant Shekhar
1 sibling, 2 replies; 7+ messages in thread
From: Jayant Shekhar @ 2026-11-04 9:11 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jayant Shekhar
Cc: dri-devel, devicetree, linux-kernel, Jayant Shekhar
Document the Novatek NT37802 AMOLED DSI command-mode panel.
Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
---
.../bindings/display/panel/novatek,nt37802.yaml | 69 ++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml
new file mode 100644
index 000000000000..14a59a9b0fec
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/novatek,nt37802.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Novatek NT37802 AMOLED DSI Command-Mode Panel
+
+maintainers:
+ - Jayant Shekhar <jshekhar@oss.qualcomm.com>
+
+description:
+ The Novatek NT37802 command-mode AMOLED panel described by the Maili/Pebble
+ platform. The downstream panel description identifies the module as CSOT.
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ const: novatek,nt37802
+
+ reg:
+ maxItems: 1
+ description: DSI virtual channel number
+
+ exvdd-supply: true
+ vci-supply: true
+ vdd-supply: true
+ vddio-supply: true
+ reset-gpios: true
+ port: true
+
+required:
+ - compatible
+ - reg
+ - exvdd-supply
+ - vci-supply
+ - vdd-supply
+ - vddio-supply
+ - reset-gpios
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "novatek,nt37802";
+ reg = <0>;
+ reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+ vddio-supply = <&vreg_l12b_1p8>;
+ vdd-supply = <&vreg_l11b_1p2>;
+ vci-supply = <&vreg_l13b_3p0>;
+ exvdd-supply = <&display_panel_vdd>;
+
+ port {
+ endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+ };
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] drm/panel: Add driver for Novatek NT37802
2026-11-04 9:11 [PATCH 0/2] drm/panel: Add support for Novatek NT37802 Jayant Shekhar
2026-11-04 9:11 ` [PATCH 1/2] dt-bindings: display: panel: Add " Jayant Shekhar
@ 2026-11-04 9:11 ` Jayant Shekhar
2026-11-04 9:35 ` sashiko-bot
2026-11-04 15:30 ` Krzysztof Kozlowski
1 sibling, 2 replies; 7+ messages in thread
From: Jayant Shekhar @ 2026-11-04 9:11 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jayant Shekhar
Cc: dri-devel, devicetree, linux-kernel, Jayant Shekhar
Add a DRM panel driver for the Novatek NT37802 AMOLED DSI command-mode
panel used on the Maili/Pebble platform with a CSOT module.
The panel runs at 1440x3200@120Hz over four DSI lanes and uses DSC
1.2 compression. The driver supports a reset GPIO and exposes DCS
brightness control.
Enable the driver as a module in the arm64 defconfig.
Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
---
arch/arm64/configs/defconfig | 1 +
drivers/gpu/drm/panel/Kconfig | 16 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-novatek-nt37802.c | 544 ++++++++++++++++++++++++++
4 files changed, 562 insertions(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 7b4985b29b21..46ae547d3f8f 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -1036,6 +1036,7 @@ CONFIG_DRM_PANEL_MANTIX_MLAF057WE51=m
CONFIG_DRM_PANEL_NOVATEK_NT36672A=m
CONFIG_DRM_PANEL_NOVATEK_NT36672E=m
CONFIG_DRM_PANEL_NOVATEK_NT37801=m
+CONFIG_DRM_PANEL_NOVATEK_NT37802=m
CONFIG_DRM_PANEL_RAYDIUM_RM67191=m
CONFIG_DRM_PANEL_RAYDIUM_RM692E5=m
CONFIG_DRM_PANEL_RENESAS_R63419=m
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 7a520b4d60fe..0f94915ee0fd 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -746,6 +746,22 @@ config DRM_PANEL_NOVATEK_NT37801
NT37810) AMOLED DSI Video Mode LCD panel module with 1440x3200
resolution.
+config DRM_PANEL_NOVATEK_NT37802
+ tristate "Novatek NT37802 AMOLED DSI command-mode panel"
+ depends on OF
+ depends on DRM_MIPI_DSI
+ depends on GPIOLIB
+ depends on BACKLIGHT_CLASS_DEVICE
+ select DRM_DISPLAY_DSC_HELPER
+ select DRM_DISPLAY_HELPER
+ select DRM_KMS_HELPER
+ help
+ Say Y here to enable support for the Novatek NT37802 AMOLED
+ DSI command-mode panel used with the CSOT module on the
+ Maili/Pebble platform. The panel has a 1440x3200 resolution
+ and uses DSC 1.2 compression, with DCS brightness control.
+ To compile this driver as a module, choose M here.
+
config DRM_PANEL_NOVATEK_NT39016
tristate "Novatek NT39016 RGB/SPI panel"
depends on OF && SPI
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index da5175909d54..b9cbbf5a9184 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -71,6 +71,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672E) += panel-novatek-nt36672e.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37700F) += panel-novatek-nt37700f.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37801) += panel-novatek-nt37801.o
+obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37802) += panel-novatek-nt37802.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT51021) += panel-novatek-nt51021.o
obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.o
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37802.c b/drivers/gpu/drm/panel/panel-novatek-nt37802.c
new file mode 100644
index 000000000000..632520f04ffa
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-novatek-nt37802.c
@@ -0,0 +1,544 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Novatek NT37802 AMOLED DSI command-mode panel.
+ */
+
+#include <linux/backlight.h>
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/regulator/consumer.h>
+
+#include <drm/display/drm_dsc.h>
+#include <drm/display/drm_dsc_helper.h>
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+#include <drm/drm_probe_helper.h>
+
+#include <video/mipi_display.h>
+
+struct nt37802_cmd {
+ u8 len;
+ u8 data[32];
+};
+
+#define NT37802_CMD(...) \
+ { .len = sizeof((u8[]){ __VA_ARGS__ }), .data = { __VA_ARGS__ } }
+
+struct novatek_nt37802 {
+ struct drm_panel panel;
+ struct mipi_dsi_device *dsi;
+ struct drm_dsc_config dsc;
+ struct gpio_desc *reset_gpio;
+ struct regulator_bulk_data *supplies;
+ bool prepared;
+ bool enabled;
+};
+
+enum nt37802_supply {
+ NT37802_SUPPLY_VDDIO,
+ NT37802_SUPPLY_VDD,
+ NT37802_SUPPLY_VCI,
+ NT37802_SUPPLY_EXVDD,
+};
+
+static const struct regulator_bulk_data novatek_nt37802_supplies[] = {
+ [NT37802_SUPPLY_VDDIO] = { .supply = "vddio", .init_load_uA = 154000 },
+ [NT37802_SUPPLY_VDD] = { .supply = "vdd", .init_load_uA = 220000 },
+ [NT37802_SUPPLY_VCI] = { .supply = "vci", .init_load_uA = 10000 },
+ [NT37802_SUPPLY_EXVDD] = { .supply = "exvdd" },
+};
+
+static int novatek_nt37802_set_supply_voltages(struct novatek_nt37802 *ctx)
+{
+ int ret;
+
+ ret = regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VDDIO].consumer,
+ 1800000, 2000000);
+ if (ret)
+ return ret;
+
+ ret = regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VDD].consumer,
+ 1100000, 1950000);
+ if (ret)
+ return ret;
+
+ return regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VCI].consumer,
+ 3000000, 3544000);
+}
+
+static int novatek_nt37802_enable_supplies(struct novatek_nt37802 *ctx)
+{
+ int ret;
+
+ ret = regulator_enable(ctx->supplies[NT37802_SUPPLY_VDDIO].consumer);
+ if (ret)
+ return ret;
+
+ msleep(20);
+
+ ret = regulator_enable(ctx->supplies[NT37802_SUPPLY_VDD].consumer);
+ if (ret)
+ goto disable_vddio;
+
+ ret = regulator_enable(ctx->supplies[NT37802_SUPPLY_VCI].consumer);
+ if (ret)
+ goto disable_vdd;
+
+ ret = regulator_enable(ctx->supplies[NT37802_SUPPLY_EXVDD].consumer);
+ if (ret)
+ goto disable_vci;
+
+ msleep(20);
+
+ return 0;
+
+disable_vci:
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VCI].consumer);
+disable_vdd:
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VDD].consumer);
+disable_vddio:
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VDDIO].consumer);
+
+ return ret;
+}
+
+static void novatek_nt37802_disable_supplies(struct novatek_nt37802 *ctx)
+{
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_EXVDD].consumer);
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VCI].consumer);
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VDD].consumer);
+ regulator_disable(ctx->supplies[NT37802_SUPPLY_VDDIO].consumer);
+}
+
+static inline struct novatek_nt37802 *
+to_novatek_nt37802(struct drm_panel *panel)
+{
+ return container_of(panel, struct novatek_nt37802, panel);
+}
+
+static const struct nt37802_cmd nt37802_init_cmds[] = {
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x08),
+ NT37802_CMD(0xc1, 0x8e, 0xff, 0xee, 0xff, 0xff, 0xee, 0xff,
+ 0xff, 0xee, 0xff, 0xff, 0xee, 0xff, 0xff, 0xee,
+ 0xff, 0xff, 0xff, 0x7f, 0xff, 0x0e, 0xff),
+ NT37802_CMD(0x6f, 0x20),
+ NT37802_CMD(0xc1, 0x3f, 0xfd, 0xff),
+ NT37802_CMD(0x6f, 0x23),
+ NT37802_CMD(0xc1, 0x0e, 0xff, 0xee, 0xff, 0xff, 0xee, 0xff,
+ 0xff, 0xee, 0xff, 0xff, 0xee, 0xff, 0xff, 0xee,
+ 0xff, 0xff, 0xdf, 0x7f, 0x11),
+ NT37802_CMD(0x2a, 0x00, 0x00, 0x05, 0x9f),
+ NT37802_CMD(0x2b, 0x00, 0x00, 0x0c, 0x7f),
+ NT37802_CMD(0x90, 0x03, 0x43),
+ NT37802_CMD(0x91, 0xab, 0xa8, 0x00, 0x14, 0xc2, 0x00, 0x02,
+ 0x68, 0x02, 0x2e, 0x00, 0x0a, 0x05, 0x0e, 0x03, 0xd1, 0x10, 0xf0),
+ NT37802_CMD(0x35, 0x00),
+ NT37802_CMD(0x51, 0x0f, 0xff),
+ NT37802_CMD(0x6f, 0x04),
+ NT37802_CMD(0x51, 0x0f, 0xff),
+ NT37802_CMD(0x53, 0x20),
+ NT37802_CMD(0x6f, 0x01),
+ NT37802_CMD(0x8b, 0x00),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x04),
+ NT37802_CMD(0xc0, 0x20),
+ NT37802_CMD(0x8c, 0x00, 0x00, 0x11),
+ NT37802_CMD(0xff, 0xaa, 0x55, 0xa5, 0x81),
+ NT37802_CMD(0x6f, 0x21),
+ NT37802_CMD(0xf5, 0x03),
+ NT37802_CMD(0x6f, 0x43),
+ NT37802_CMD(0xf5, 0x01, 0x02, 0x01, 0x04, 0x00, 0x01, 0x02, 0x00,
+ 0x00, 0x00, 0x43, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10,
+ 0x05, 0x00, 0x11, 0x31, 0x12, 0x11),
+ NT37802_CMD(0x6f, 0x1d),
+ NT37802_CMD(0xfb, 0x64, 0x07, 0x80),
+ NT37802_CMD(0x6f, 0x07),
+ NT37802_CMD(0xfc, 0x04),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01),
+ NT37802_CMD(0x6f, 0x02),
+ NT37802_CMD(0xd6, 0x03),
+ NT37802_CMD(0xff, 0xaa, 0x55, 0xa5, 0x84),
+ NT37802_CMD(0x6f, 0x9a),
+ NT37802_CMD(0xf3, 0x0f),
+ NT37802_CMD(0x6f, 0x02),
+ NT37802_CMD(0x2f, 0x32),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x03),
+ NT37802_CMD(0xc8, 0x01, 0xff, 0xfb),
+ NT37802_CMD(0xff, 0xaa, 0x55, 0xa5, 0x80),
+ NT37802_CMD(0x6f, 0x22),
+ NT37802_CMD(0xfe, 0x06),
+ NT37802_CMD(0x6d, 0x00),
+ NT37802_CMD(0x68, 0x20),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0x6f, 0x31),
+ NT37802_CMD(0xc0, 0x01, 0x00),
+ NT37802_CMD(0x6f, 0x35),
+ NT37802_CMD(0xc0, 0x23, 0x20),
+ NT37802_CMD(0x6f, 0x01),
+ NT37802_CMD(0x5f, 0x40),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0x6f, 0x78),
+ NT37802_CMD(0xb0, 0x11, 0x00, 0x2a, 0x00, 0xc2, 0x01, 0xda, 0x03, 0x7c,
+ 0x05, 0xb1, 0x08, 0x80, 0x0b, 0xee, 0x0f, 0xff,
+ 0x05, 0x55, 0x05, 0x56, 0x05, 0x55),
+ NT37802_CMD(0x6f, 0x6f),
+ NT37802_CMD(0xb0, 0x02, 0xd0, 0x05, 0xa0, 0x02, 0xd0),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x03),
+ NT37802_CMD(0x6f, 0x04),
+ NT37802_CMD(0xc7, 0xfd),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0xc7, 0x33),
+ NT37802_CMD(0xa3, 0x83, 0x01, 0x9b, 0x01, 0x9b, 0x02, 0x00, 0xc0, 0x09, 0x09, 0x00),
+ NT37802_CMD(0x6f, 0x53),
+ NT37802_CMD(0xa3, 0x02, 0x00, 0xc0, 0x09, 0x09, 0x55),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0xb5, 0x80, 0x02, 0x38, 0xc8, 0x00, 0x00, 0xff, 0x0c,
+ 0x60, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00),
+ NT37802_CMD(0x6f, 0x10),
+ NT37802_CMD(0xb5, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
+ 0x11, 0x2b, 0x00, 0x00, 0x00, 0x11, 0x2b, 0x00),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0x6f, 0x08),
+ NT37802_CMD(0xd5, 0x08),
+ NT37802_CMD(0xd5, 0x4e, 0x10),
+ NT37802_CMD(0x6f, 0x02),
+ NT37802_CMD(0xd5, 0x01),
+ NT37802_CMD(0x6f, 0xd9),
+ NT37802_CMD(0xd5, 0x7f, 0x7f),
+ NT37802_CMD(0x6f, 0x4e),
+ NT37802_CMD(0xd5, 0x02),
+ NT37802_CMD(0x6f, 0x4f),
+ NT37802_CMD(0xd5, 0x05, 0x07),
+ NT37802_CMD(0x6f, 0x52),
+ NT37802_CMD(0xd5, 0x11, 0x02),
+ NT37802_CMD(0x6f, 0x55),
+ NT37802_CMD(0xd5, 0x01),
+ NT37802_CMD(0x6f, 0x56),
+ NT37802_CMD(0xd5, 0x07),
+ NT37802_CMD(0x6f, 0x59),
+ NT37802_CMD(0xd5, 0x70),
+ NT37802_CMD(0x6f, 0x5c),
+ NT37802_CMD(0xd5, 0x03),
+ NT37802_CMD(0x6f, 0x5d),
+ NT37802_CMD(0xd5, 0x02, 0x03, 0x07),
+ NT37802_CMD(0x6f, 0x63),
+ NT37802_CMD(0xd5, 0x08, 0x60, 0x07),
+ NT37802_CMD(0x6f, 0x69),
+ NT37802_CMD(0xd5, 0x01),
+ NT37802_CMD(0x6f, 0x6a),
+ NT37802_CMD(0xd5, 0x07),
+ NT37802_CMD(0x6f, 0x70),
+ NT37802_CMD(0xd5, 0x16),
+ NT37802_CMD(0x6f, 0xb8),
+ NT37802_CMD(0xd5, 0x02),
+ NT37802_CMD(0x6f, 0xb9),
+ NT37802_CMD(0xd5, 0x1c, 0x1f),
+ NT37802_CMD(0x6f, 0xbc),
+ NT37802_CMD(0xd5, 0x5d, 0x02),
+ NT37802_CMD(0x6f, 0xbf),
+ NT37802_CMD(0xd5, 0x01),
+ NT37802_CMD(0x6f, 0xc0),
+ NT37802_CMD(0xd5, 0x1f),
+ NT37802_CMD(0x6f, 0xc3),
+ NT37802_CMD(0xd5, 0x00),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01),
+ NT37802_CMD(0x6f, 0x04),
+ NT37802_CMD(0xb2, 0x30),
+ NT37802_CMD(0x6f, 0x25),
+ NT37802_CMD(0xd8, 0x30),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x00),
+ NT37802_CMD(0x6f, 0xd1),
+ NT37802_CMD(0xd5, 0x13),
+ NT37802_CMD(0x6f, 0xd2),
+ NT37802_CMD(0xd5, 0x56),
+ NT37802_CMD(0x6f, 0x03),
+ NT37802_CMD(0xb5, 0x35),
+ NT37802_CMD(0xf0, 0x55, 0xaa, 0x52, 0x08, 0x01),
+ NT37802_CMD(0x6f, 0x04),
+ NT37802_CMD(0xb2, 0x20),
+};
+
+static void novatek_nt37802_set_reset(struct novatek_nt37802 *ctx, int value)
+{
+ gpiod_set_value_cansleep(ctx->reset_gpio, value);
+}
+
+static void novatek_nt37802_reset(struct novatek_nt37802 *ctx)
+{
+ novatek_nt37802_set_reset(ctx, 0);
+ usleep_range(10000, 11000);
+ novatek_nt37802_set_reset(ctx, 1);
+ usleep_range(10000, 11000);
+ novatek_nt37802_set_reset(ctx, 0);
+ usleep_range(10000, 11000);
+ /* qcom,platform-reset-gpio-release-delay */
+ msleep(120);
+}
+
+static int novatek_nt37802_write_init(struct novatek_nt37802 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(nt37802_init_cmds); i++)
+ mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,
+ nt37802_init_cmds[i].data,
+ nt37802_init_cmds[i].len);
+
+ return dsi_ctx.accum_err;
+}
+
+static int novatek_nt37802_prepare(struct drm_panel *panel)
+{
+ struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+ struct drm_dsc_picture_parameter_set pps;
+ int ret;
+
+ if (ctx->prepared)
+ return 0;
+
+ ret = novatek_nt37802_enable_supplies(ctx);
+ if (ret)
+ return ret;
+
+ novatek_nt37802_reset(ctx);
+ ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
+ ret = novatek_nt37802_write_init(ctx);
+ if (ret) {
+ novatek_nt37802_set_reset(ctx, 1);
+ novatek_nt37802_disable_supplies(ctx);
+ return ret;
+ }
+
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 120);
+ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 120);
+
+ drm_dsc_pps_payload_pack(&pps, &ctx->dsc);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+ mipi_dsi_compression_mode_multi(&dsi_ctx, true);
+ if (dsi_ctx.accum_err) {
+ novatek_nt37802_set_reset(ctx, 1);
+ novatek_nt37802_disable_supplies(ctx);
+ return dsi_ctx.accum_err;
+ }
+
+ ctx->prepared = true;
+ return 0;
+}
+
+static int novatek_nt37802_enable(struct drm_panel *panel)
+{
+ struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
+
+ if (!ctx->prepared)
+ return -EPERM;
+
+ if (ctx->enabled)
+ return 0;
+
+ ctx->enabled = true;
+ return 0;
+}
+
+static int novatek_nt37802_disable(struct drm_panel *panel)
+{
+ struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ if (!ctx->enabled)
+ return 0;
+
+ /* The off sequence sends display-off in HS mode, then waits 10 ms. */
+ ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 10);
+
+ ctx->enabled = false;
+ return dsi_ctx.accum_err;
+}
+
+static int novatek_nt37802_unprepare(struct drm_panel *panel)
+{
+ struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ if (!ctx->prepared)
+ return 0;
+
+ ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 120);
+
+ /* Assert the active-low reset after the downstream sleep delay. */
+ novatek_nt37802_set_reset(ctx, 1);
+ ctx->prepared = false;
+ novatek_nt37802_disable_supplies(ctx);
+
+ return dsi_ctx.accum_err;
+}
+
+static const struct drm_display_mode novatek_nt37802_mode = {
+ /* (1440 + 32 + 16 + 32) * (3200 + 16 + 2 + 48) * 120 Hz */
+ .clock = (1440 + 32 + 16 + 32) * (3200 + 16 + 2 + 48) * 120 / 1000,
+ .hdisplay = 1440,
+ .hsync_start = 1440 + 32,
+ .hsync_end = 1440 + 32 + 16,
+ .htotal = 1440 + 32 + 16 + 32,
+ .vdisplay = 3200,
+ .vsync_start = 3200 + 16,
+ .vsync_end = 3200 + 16 + 2,
+ .vtotal = 3200 + 16 + 2 + 48,
+ .width_mm = 74,
+ .height_mm = 156,
+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+};
+
+static int novatek_nt37802_get_modes(struct drm_panel *panel,
+ struct drm_connector *connector)
+{
+ return drm_connector_helper_get_modes_fixed(connector,
+ &novatek_nt37802_mode);
+}
+
+static const struct drm_panel_funcs novatek_nt37802_panel_funcs = {
+ .prepare = novatek_nt37802_prepare,
+ .enable = novatek_nt37802_enable,
+ .disable = novatek_nt37802_disable,
+ .unprepare = novatek_nt37802_unprepare,
+ .get_modes = novatek_nt37802_get_modes,
+};
+
+static int novatek_nt37802_bl_update_status(struct backlight_device *bl)
+{
+ struct mipi_dsi_device *dsi = bl_get_data(bl);
+
+ return mipi_dsi_dcs_set_display_brightness_large(dsi,
+ backlight_get_brightness(bl));
+}
+
+static const struct backlight_ops novatek_nt37802_bl_ops = {
+ .update_status = novatek_nt37802_bl_update_status,
+};
+
+static struct backlight_device *
+novatek_nt37802_create_backlight(struct mipi_dsi_device *dsi)
+{
+ struct device *dev = &dsi->dev;
+ const struct backlight_properties props = {
+ .type = BACKLIGHT_RAW,
+ .brightness = 4095,
+ .max_brightness = 4095,
+ };
+
+ return devm_backlight_device_register(dev, dev_name(dev), dev, dsi,
+ &novatek_nt37802_bl_ops, &props);
+}
+
+static void novatek_nt37802_init_dsc(struct novatek_nt37802 *ctx)
+{
+ struct drm_dsc_config *dsc = &ctx->dsc;
+
+ dsc->dsc_version_major = 1;
+ dsc->dsc_version_minor = 2;
+ dsc->bits_per_component = 8;
+ dsc->bits_per_pixel = 8 << 4;
+ dsc->block_pred_enable = true;
+ dsc->slice_width = 720;
+ dsc->slice_height = 20;
+ dsc->slice_count = 2;
+}
+
+static int novatek_nt37802_probe(struct mipi_dsi_device *dsi)
+{
+ struct device *dev = &dsi->dev;
+ struct novatek_nt37802 *ctx;
+ int ret;
+
+ ctx = devm_drm_panel_alloc(dev, struct novatek_nt37802, panel,
+ &novatek_nt37802_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
+
+ ctx->dsi = dsi;
+ mipi_dsi_set_drvdata(dsi, ctx);
+
+ ret = devm_regulator_bulk_get_const(dev,
+ ARRAY_SIZE(novatek_nt37802_supplies),
+ novatek_nt37802_supplies,
+ &ctx->supplies);
+ if (ret)
+ return ret;
+
+ ret = novatek_nt37802_set_supply_voltages(ctx);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to set regulator voltages\n");
+
+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
+ "Failed to get reset GPIO\n");
+
+ novatek_nt37802_init_dsc(ctx);
+
+ dsi->lanes = 4;
+ dsi->format = MIPI_DSI_FMT_RGB888;
+ dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS;
+ ctx->panel.prepare_prev_first = true;
+
+ ctx->panel.backlight = novatek_nt37802_create_backlight(dsi);
+ if (IS_ERR(ctx->panel.backlight))
+ return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
+ "Failed to create backlight\n");
+
+ dsi->dsc = &ctx->dsc;
+ drm_panel_add(&ctx->panel);
+
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0) {
+ drm_panel_remove(&ctx->panel);
+ return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
+ }
+
+ return 0;
+}
+
+static void novatek_nt37802_remove(struct mipi_dsi_device *dsi)
+{
+ struct novatek_nt37802 *ctx = mipi_dsi_get_drvdata(dsi);
+ int ret;
+
+ ret = mipi_dsi_detach(dsi);
+ if (ret < 0)
+ dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
+
+ drm_panel_remove(&ctx->panel);
+}
+
+static const struct of_device_id novatek_nt37802_of_match[] = {
+ { .compatible = "novatek,nt37802" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, novatek_nt37802_of_match);
+
+static struct mipi_dsi_driver novatek_nt37802_driver = {
+ .probe = novatek_nt37802_probe,
+ .remove = novatek_nt37802_remove,
+ .driver = {
+ .name = "panel-novatek-nt37802",
+ .of_match_table = novatek_nt37802_of_match,
+ },
+};
+module_mipi_dsi_driver(novatek_nt37802_driver);
+
+MODULE_AUTHOR("Jayant Shekhar <jshekhar@oss.qualcomm.com>");
+MODULE_DESCRIPTION("Panel driver for the Novatek NT37802 AMOLED DSI panel");
+MODULE_LICENSE("GPL");
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: display: panel: Add Novatek NT37802
2026-11-04 9:11 ` [PATCH 1/2] dt-bindings: display: panel: Add " Jayant Shekhar
@ 2026-11-04 9:20 ` sashiko-bot
2026-11-04 15:32 ` Krzysztof Kozlowski
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-11-04 9:20 UTC (permalink / raw)
To: Jayant Shekhar; +Cc: dri-devel, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: display: panel: maintainer email mismatch in nt37802 schema
--
commit 5aac2d7c3f53fb607c4bdfc23eafa7cc910f9e16
Author: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
dt-bindings: display: panel: Add Novatek NT37802
This commit adds the Device Tree binding schema for the Novatek NT37802
AMOLED DSI command-mode panel.
> diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml
> new file mode 100644
> index 0000000000000..14a59a9b0feca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/novatek,nt37802.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Novatek NT37802 AMOLED DSI Command-Mode Panel
> +
> +maintainers:
> + - Jayant Shekhar <jshekhar@oss.qualcomm.com>
[Severity: Low]
Should the maintainer email address in the maintainers list match the
jayant.shekhar@oss.qualcomm.com address used in the commit Author and
Signed-off-by headers?
When scripts/get_maintainer.pl queries
Documentation/devicetree/bindings/display/panel/novatek,nt37802.yaml, it
extracts jshekhar@oss.qualcomm.com from the maintainers list instead of
jayant.shekhar@oss.qualcomm.com.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-jshekhar-nt37802-v1-0-58e5e7fb2556@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/panel: Add driver for Novatek NT37802
2026-11-04 9:11 ` [PATCH 2/2] drm/panel: Add driver for " Jayant Shekhar
@ 2026-11-04 9:35 ` sashiko-bot
2026-11-04 15:30 ` Krzysztof Kozlowski
1 sibling, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-11-04 9:35 UTC (permalink / raw)
To: Jayant Shekhar; +Cc: dri-devel, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Medium] drm/panel: nt37802: state desync on DSI errors in disable and unprepare
- [Medium] drm/panel: nt37802: asymmetric display-on/off across prepare and disable
- [Medium] drm/panel: bogus voltage ranges in novatek_nt37802_set_supply_voltages()
- [Low] drm/panel: nt37802: use mipi_dsi_dcs_write_seq_multi() for init commands
--
commit a4454941919dc768e5c78cce0316ea1f0954d638
Author: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
drm/panel: Add driver for Novatek NT37802
This commit adds a DRM panel driver for the Novatek NT37802 AMOLED DSI
command-mode panel running at 1440x3200@120Hz with DSC 1.2 compression
and enables it as a module in the arm64 defconfig.
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt37802.c b/drivers/gpu/drm/panel/panel-novatek-nt37802.c
> new file mode 100644
> index 0000000000000..632520f04ffad
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt37802.c
> @@ -0,0 +1,544 @@
[ ... ]
> +struct nt37802_cmd {
> + u8 len;
> + u8 data[32];
> +};
> +
> +#define NT37802_CMD(...) \
> + { .len = sizeof((u8[]){ __VA_ARGS__ }), .data = { __VA_ARGS__ } }
[ ... ]
> +static int novatek_nt37802_set_supply_voltages(struct novatek_nt37802 *ctx)
> +{
> + int ret;
> +
> + ret = regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VDDIO].consumer,
> + 1800000, 2000000);
> + if (ret)
> + return ret;
> +
> + ret = regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VDD].consumer,
> + 1100000, 1950000);
> + if (ret)
> + return ret;
> +
> + return regulator_set_voltage(ctx->supplies[NT37802_SUPPLY_VCI].consumer,
> + 3000000, 3544000);
> +}
[Severity: Medium]
Should the voltage constraints be defined in the board Device Tree via
regulator-min-microvolt and regulator-max-microvolt rather than calling
regulator_set_voltage() with wide ranges in
novatek_nt37802_set_supply_voltages()?
The upper bounds (2000000 uV, 1950000 uV, and 3544000 uV) appear to be
Qualcomm PMIC5 LDO hardware maximums from downstream
qcom,panel-supply-entries rather than exact panel requirements.
In drivers/regulator/core.c, regulator_set_voltage() selects the lowest
voltage permitted by the intersection of the consumer request and the
regulator's constraints:
regulator_set_voltage_unlocked()
regulator_balance_voltage()
regulator_get_optimal_voltage()
_regulator_do_set_voltage()
If a board's PMIC LDO constraints allow a voltage down to 1.1V while the
panel expects 1.2V on vdd, requesting (1100000, 1950000) will lower the
rail to 1.1V, and novatek_nt37802_probe() will also fail with -EINVAL on
boards using fixed regulators without voltage adjustment constraints.
[ ... ]
> +static int novatek_nt37802_write_init(struct novatek_nt37802 *ctx)
> +{
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> + unsigned int i;
> +
> + for (i = 0; i < ARRAY_SIZE(nt37802_init_cmds); i++)
> + mipi_dsi_dcs_write_buffer_multi(&dsi_ctx,
> + nt37802_init_cmds[i].data,
> + nt37802_init_cmds[i].len);
> +
> + return dsi_ctx.accum_err;
> +}
[Severity: Low]
This isn't a bug, but could novatek_nt37802_write_init() use
mipi_dsi_dcs_write_seq_multi() and standard DCS helpers (such as
mipi_dsi_dcs_set_column_address_multi(),
mipi_dsi_dcs_set_page_address_multi(), and mipi_dsi_dcs_set_tear_on_multi())
with the caller's struct mipi_dsi_multi_context instead of defining the
custom struct nt37802_cmd with a fixed 32-byte array for every entry in
nt37802_init_cmds?
> +
> +static int novatek_nt37802_prepare(struct drm_panel *panel)
> +{
> + struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> + struct drm_dsc_picture_parameter_set pps;
> + int ret;
> +
> + if (ctx->prepared)
> + return 0;
> +
> + ret = novatek_nt37802_enable_supplies(ctx);
> + if (ret)
> + return ret;
> +
> + novatek_nt37802_reset(ctx);
> + ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +
> + ret = novatek_nt37802_write_init(ctx);
> + if (ret) {
> + novatek_nt37802_set_reset(ctx, 1);
> + novatek_nt37802_disable_supplies(ctx);
> + return ret;
> + }
> +
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 120);
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + drm_dsc_pps_payload_pack(&pps, &ctx->dsc);
> + mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
> + mipi_dsi_compression_mode_multi(&dsi_ctx, true);
> + if (dsi_ctx.accum_err) {
> + novatek_nt37802_set_reset(ctx, 1);
> + novatek_nt37802_disable_supplies(ctx);
> + return dsi_ctx.accum_err;
> + }
> +
> + ctx->prepared = true;
> + return 0;
> +}
> +
> +static int novatek_nt37802_enable(struct drm_panel *panel)
> +{
> + struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
> +
> + if (!ctx->prepared)
> + return -EPERM;
> +
> + if (ctx->enabled)
> + return 0;
> +
> + ctx->enabled = true;
> + return 0;
> +}
> +
> +static int novatek_nt37802_disable(struct drm_panel *panel)
> +{
> + struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> + if (!ctx->enabled)
> + return 0;
> +
> + /* The off sequence sends display-off in HS mode, then waits 10 ms. */
> + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 10);
> +
> + ctx->enabled = false;
> + return dsi_ctx.accum_err;
> +}
[Severity: Medium]
What happens if drm_panel_disable() is followed by drm_panel_enable()
without an intervening unprepare and prepare cycle?
novatek_nt37802_prepare() sends both mipi_dsi_dcs_exit_sleep_mode_multi()
and mipi_dsi_dcs_set_display_on_multi(), while novatek_nt37802_enable()
does not send any DSI commands. On the teardown side,
novatek_nt37802_disable() sends mipi_dsi_dcs_set_display_off_multi() and
novatek_nt37802_unprepare() only sends
mipi_dsi_dcs_enter_sleep_mode_multi().
If a disable/enable cycle occurs without unprepare/prepare, the panel will
be left with the display turned off while the backlight is enabled;
conversely, if prepare is followed by unprepare without enable/disable,
the panel enters sleep mode without sending display-off.
Should mipi_dsi_dcs_set_display_off_multi() and
mipi_dsi_dcs_enter_sleep_mode_multi() both be handled in
novatek_nt37802_unprepare() (dropping the enable and disable callbacks,
similar to panel-novatek-nt37801.c), or should display-on be paired in
novatek_nt37802_enable() with display-off in novatek_nt37802_disable()?
> +
> +static int novatek_nt37802_unprepare(struct drm_panel *panel)
> +{
> + struct novatek_nt37802 *ctx = to_novatek_nt37802(panel);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> + if (!ctx->prepared)
> + return 0;
> +
> + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
> + mipi_dsi_msleep(&dsi_ctx, 120);
> +
> + /* Assert the active-low reset after the downstream sleep delay. */
> + novatek_nt37802_set_reset(ctx, 1);
> + ctx->prepared = false;
> + novatek_nt37802_disable_supplies(ctx);
> +
> + return dsi_ctx.accum_err;
> +}
[Severity: Medium]
Can a DSI error in novatek_nt37802_unprepare() or novatek_nt37802_disable()
permanently desynchronize ctx->prepared and ctx->enabled from the core
panel->prepared and panel->enabled state?
In drivers/gpu/drm/drm_panel.c, drm_panel_unprepare() and
drm_panel_disable() already track panel->prepared and panel->enabled, and
skip clearing them when the driver callback returns a negative error:
drivers/gpu/drm/drm_panel.c:drm_panel_unprepare() {
...
if (panel->funcs && panel->funcs->unprepare) {
ret = panel->funcs->unprepare(panel);
if (ret < 0)
goto exit;
}
panel->prepared = false;
...
}
If mipi_dsi_dcs_enter_sleep_mode_multi() fails in
novatek_nt37802_unprepare(), the driver still asserts reset, sets
ctx->prepared = false, disables all four regulators, and returns the
negative dsi_ctx.accum_err. Because drm_panel_unprepare() then leaves
panel->prepared set to true, the next drm_panel_prepare() call returns
early without calling novatek_nt37802_prepare() to re-enable the
regulators, and novatek_nt37802_enable() then fails with -EPERM because
ctx->prepared is false.
Similarly, in drm_panel_disable(), backlight_disable() runs before
panel->funcs->disable(). If mipi_dsi_dcs_set_display_off_multi() fails in
novatek_nt37802_disable(), ctx->enabled is cleared and the negative error
is returned, leaving panel->enabled set to true so subsequent
drm_panel_enable() calls return early without re-enabling the backlight.
Since struct drm_panel already maintains prepared and enabled state in the
core, can ctx->prepared and ctx->enabled be dropped, and should
novatek_nt37802_unprepare() return 0 after powering down the hardware (with
mipi_dsi_dcs_enter_sleep_mode_multi() already logging the DSI error)?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-jshekhar-nt37802-v1-0-58e5e7fb2556@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] drm/panel: Add driver for Novatek NT37802
2026-11-04 9:11 ` [PATCH 2/2] drm/panel: Add driver for " Jayant Shekhar
2026-11-04 9:35 ` sashiko-bot
@ 2026-11-04 15:30 ` Krzysztof Kozlowski
1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-04 15:30 UTC (permalink / raw)
To: Jayant Shekhar, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jayant Shekhar
Cc: dri-devel, devicetree, linux-kernel
On 04/11/2026 10:11, Jayant Shekhar wrote:
> Add a DRM panel driver for the Novatek NT37802 AMOLED DSI command-mode
> panel used on the Maili/Pebble platform with a CSOT module.
What is Maili? What is Pebble.. how anyone can guess it.
>
> The panel runs at 1440x3200@120Hz over four DSI lanes and uses DSC
> 1.2 compression. The driver supports a reset GPIO and exposes DCS
> brightness control.
>
> Enable the driver as a module in the arm64 defconfig.
>
> Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
> ---
> arch/arm64/configs/defconfig | 1 +
That's never part of other driver changes. Enable everything you need
for your hardware in one commit, with proper explanation.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: display: panel: Add Novatek NT37802
2026-11-04 9:11 ` [PATCH 1/2] dt-bindings: display: panel: Add " Jayant Shekhar
2026-11-04 9:20 ` sashiko-bot
@ 2026-11-04 15:32 ` Krzysztof Kozlowski
1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-04 15:32 UTC (permalink / raw)
To: Jayant Shekhar, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jayant Shekhar
Cc: dri-devel, devicetree, linux-kernel
On 04/11/2026 10:11, Jayant Shekhar wrote:
> Document the Novatek NT37802 AMOLED DSI command-mode panel.
>
> Signed-off-by: Jayant Shekhar <jayant.shekhar@oss.qualcomm.com>
> ---
> .../bindings/display/panel/novatek,nt37802.yaml | 69 ++++++++++++++++++++++
> 1 file changed, 69 insertions(+)
Why do you need new file and this does not fit nt37801?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-04 15:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 9:11 [PATCH 0/2] drm/panel: Add support for Novatek NT37802 Jayant Shekhar
2026-11-04 9:11 ` [PATCH 1/2] dt-bindings: display: panel: Add " Jayant Shekhar
2026-11-04 9:20 ` sashiko-bot
2026-11-04 15:32 ` Krzysztof Kozlowski
2026-11-04 9:11 ` [PATCH 2/2] drm/panel: Add driver for " Jayant Shekhar
2026-11-04 9:35 ` sashiko-bot
2026-11-04 15:30 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.