* [PATCH 0/3] drm/panel: Add support for Novatek NT36532 panel
@ 2025-10-01 13:59 Junjie Cao
2025-10-01 13:59 ` [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532 Junjie Cao
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Junjie Cao @ 2025-10-01 13:59 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie
Cc: Junjie Cao, dri-devel, devicetree, linux-kernel, linux-arm-msm,
freedreno
This series adds support for panels using the Novatek NT36532 Display
Driver IC, a dual-DSI, dual-DSC controller that requires DPU support
for 'slice_per_pkt = 2'.
Since the current DPU driver lacks this capability, PATCH 2/3 is picked
up from Jonathan Marek and Jun Nie [1].
[1]: https://lore.kernel.org/all/20250220-dual-dsi-v2-3-6c0038d5a2ef@linaro.org
Jun Nie (1):
drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
Junjie Cao (2):
dt-bindings: display: panel: Add Novatek NT36532
drm/panel: Add Novatek NT36532 panel driver
.../display/panel/novatek,nt36532.yaml | 83 ++++
MAINTAINERS | 7 +
drivers/gpu/drm/msm/dsi/dsi_host.c | 25 +-
drivers/gpu/drm/panel/Kconfig | 10 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
include/drm/drm_mipi_dsi.h | 2 +
7 files changed, 550 insertions(+), 15 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
base-commit: bf2602a3cb2381fb1a04bf1c39a290518d2538d1
--
2.48.1
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532
2025-10-01 13:59 [PATCH 0/3] drm/panel: Add support for Novatek NT36532 panel Junjie Cao
@ 2025-10-01 13:59 ` Junjie Cao
2025-10-02 18:32 ` Conor Dooley
2025-10-01 13:59 ` [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Junjie Cao
2025-10-01 13:59 ` [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver Junjie Cao
2 siblings, 1 reply; 19+ messages in thread
From: Junjie Cao @ 2025-10-01 13:59 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie
Cc: Junjie Cao, dri-devel, devicetree, linux-kernel, linux-arm-msm,
freedreno
NT36532 is a driver IC used to drive MIPI-DSI panels. It is found
in OnePlus Pad 2 tablets with CSOT panels.
Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
---
.../display/panel/novatek,nt36532.yaml | 83 +++++++++++++++++++
1 file changed, 83 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
new file mode 100644
index 000000000000..ca4b16459a72
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/novatek,nt36532.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Novatek NT36532 based DSI display Panels
+
+maintainers:
+ - Junjie Cao <caojunjie650@gmail.com>
+
+description: |
+ The NT36532 IC from Novatek is a Driver IC used to drive MIPI-DSI panels.
+
+allOf:
+ - $ref: panel-common-dual.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - csot,ppc100hb1-1
+ - const: novatek,nt36532
+
+ reg:
+ maxItems: 1
+
+ reset-gpios:
+ maxItems: 1
+ description: phandle of gpio for reset line - This should be 8mA
+
+ vddio-supply:
+ description: regulator that supplies the I/O voltage
+
+ ports: true
+
+required:
+ - compatible
+ - reg
+ - vddio-supply
+ - reset-gpios
+ - ports
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "csot,ppc100hb1-1", "novatek,nt36532";
+ reg = <0>;
+
+ reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+ vddio-supply = <&vreg_l12b_1p8>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ panel_in_0: endpoint {
+ remote-endpoint = <&dsi0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ panel_in_1: endpoint {
+ remote-endpoint = <&dsi1_out>;
+ };
+ };
+ };
+ };
+ };
+
+...
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-01 13:59 [PATCH 0/3] drm/panel: Add support for Novatek NT36532 panel Junjie Cao
2025-10-01 13:59 ` [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532 Junjie Cao
@ 2025-10-01 13:59 ` Junjie Cao
2025-10-02 2:03 ` Dmitry Baryshkov
2025-10-01 13:59 ` [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver Junjie Cao
2 siblings, 1 reply; 19+ messages in thread
From: Junjie Cao @ 2025-10-01 13:59 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie
Cc: Junjie Cao, dri-devel, devicetree, linux-kernel, linux-arm-msm,
freedreno
From: Jun Nie <jun.nie@linaro.org>
Some panels support multiple slice to be sent in a single DSC packet. And
this feature is a must for specific panels, such as JDI LPM026M648C. Add a
dsc_slice_per_pkt member into struct mipi_dsi_device and support the
feature in msm mdss driver.
Co-developed-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
include/drm/drm_mipi_dsi.h | 2 ++
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index e0de545d4077..773ce8520698 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -166,6 +166,7 @@ struct msm_dsi_host {
struct drm_display_mode *mode;
struct drm_dsc_config *dsc;
+ unsigned int dsc_slice_per_pkt;
/* connected device info */
unsigned int channel;
@@ -910,17 +911,10 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
slice_per_intf = dsc->slice_count;
total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf;
- bytes_per_pkt = dsc->slice_chunk_size; /* * slice_per_pkt; */
+ bytes_per_pkt = dsc->slice_chunk_size * msm_host->dsc_slice_per_pkt;
eol_byte_num = total_bytes_per_intf % 3;
-
- /*
- * Typically, pkt_per_line = slice_per_intf * slice_per_pkt.
- *
- * Since the current driver only supports slice_per_pkt = 1,
- * pkt_per_line will be equal to slice per intf for now.
- */
- pkt_per_line = slice_per_intf;
+ pkt_per_line = slice_per_intf / msm_host->dsc_slice_per_pkt;
if (is_cmd_mode) /* packet data type */
reg = DSI_COMMAND_COMPRESSION_MODE_CTRL_STREAM0_DATATYPE(MIPI_DSI_DCS_LONG_WRITE);
@@ -1069,12 +1063,8 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
else
/*
* When DSC is enabled, WC = slice_chunk_size * slice_per_pkt + 1.
- * Currently, the driver only supports default value of slice_per_pkt = 1
- *
- * TODO: Expand mipi_dsi_device struct to hold slice_per_pkt info
- * and adjust DSC math to account for slice_per_pkt.
*/
- wc = msm_host->dsc->slice_chunk_size + 1;
+ wc = msm_host->dsc->slice_chunk_size * msm_host->dsc_slice_per_pkt + 1;
dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_CTRL,
DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT(wc) |
@@ -1683,8 +1673,13 @@ static int dsi_host_attach(struct mipi_dsi_host *host,
msm_host->lanes = dsi->lanes;
msm_host->format = dsi->format;
msm_host->mode_flags = dsi->mode_flags;
- if (dsi->dsc)
+ if (dsi->dsc) {
msm_host->dsc = dsi->dsc;
+ msm_host->dsc_slice_per_pkt = dsi->dsc_slice_per_pkt;
+ /* for backwards compatibility, assume 1 if not set */
+ if (!msm_host->dsc_slice_per_pkt)
+ msm_host->dsc_slice_per_pkt = 1;
+ }
ret = dsi_dev_attach(msm_host->pdev);
if (ret)
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 3aba7b380c8d..2ddec7931bd0 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -180,6 +180,7 @@ struct mipi_dsi_device_info {
* be set to the real limits of the hardware, zero is only accepted for
* legacy drivers
* @dsc: panel/bridge DSC pps payload to be sent
+ * @dsc_slice_per_pkt: number of DSC slices to be sent as in a single packet
*/
struct mipi_dsi_device {
struct mipi_dsi_host *host;
@@ -194,6 +195,7 @@ struct mipi_dsi_device {
unsigned long hs_rate;
unsigned long lp_rate;
struct drm_dsc_config *dsc;
+ unsigned int dsc_slice_per_pkt;
};
/**
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-01 13:59 [PATCH 0/3] drm/panel: Add support for Novatek NT36532 panel Junjie Cao
2025-10-01 13:59 ` [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532 Junjie Cao
2025-10-01 13:59 ` [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Junjie Cao
@ 2025-10-01 13:59 ` Junjie Cao
2025-10-02 2:04 ` Dmitry Baryshkov
2 siblings, 1 reply; 19+ messages in thread
From: Junjie Cao @ 2025-10-01 13:59 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie
Cc: Junjie Cao, dri-devel, devicetree, linux-kernel, linux-arm-msm,
freedreno
Add a driver for panels using the Novatek NT36532 Display Driver IC,
including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
tablets.
Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
---
MAINTAINERS | 7 +
drivers/gpu/drm/panel/Kconfig | 10 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
4 files changed, 455 insertions(+)
create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 0c8281ea4cc6..1394b26269b8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7914,6 +7914,13 @@ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml
F: drivers/gpu/drm/panel/panel-novatek-nt36523.c
+DRM DRIVER FOR NOVATEK NT36532 PANELS
+M: Junjie Cao <caojunjie650@gmail.com>
+S: Maintained
+T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
+F: Documentation/devicetree/bindings/display/panel/novatek,nt36532.yaml
+F: drivers/gpu/drm/panel/panel-novatek-nt36532.c
+
DRM DRIVER FOR NOVATEK NT36672A PANELS
M: Sumit Semwal <sumit.semwal@linaro.org>
S: Maintained
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 407c5f6a268b..a2ef5be43c96 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -520,6 +520,16 @@ config DRM_PANEL_NOVATEK_NT36523
around the Novatek NT36523 display controller, such as some
Boe panels used in Xiaomi Mi Pad 5 and 5 Pro tablets.
+config DRM_PANEL_NOVATEK_NT36532
+ tristate "Novatek NT36532-based MIPI-DSI panels"
+ depends on OF
+ depends on DRM_MIPI_DSI
+ help
+ Say Y here if you want to enable support for the panels built
+ around the Novatek NT36532 display controller, such as some
+ CSOT panels used in OnePlus Pad 2 tablets. These panels are
+ typically dual-DSI and may use DSC (Display Stream Compression).
+
config DRM_PANEL_NOVATEK_NT36672A
tristate "Novatek NT36672A DSI panel"
depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index 3615a761b44f..56b4e362890c 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) += panel-novatek-nt35950.o
obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36523) += panel-novatek-nt36523.o
+obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36532) += panel-novatek-nt36532.o
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_NT37801) += panel-novatek-nt37801.o
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36532.c b/drivers/gpu/drm/panel/panel-novatek-nt36532.c
new file mode 100644
index 000000000000..a2f550801f34
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36532.c
@@ -0,0 +1,437 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Novatek NT36532 DriverIC panels driver
+ * Based on the template generated by linux-mdss-dsi-panel-driver-generator
+ *
+ * Copyright (c) 2025 Junjie Cao <caojunjie650@gmail.com>
+ */
+
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_graph.h>
+#include <linux/regulator/consumer.h>
+#include <linux/mod_devicetable.h>
+
+#include <video/mipi_display.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>
+
+struct nt36532 {
+ struct drm_panel panel;
+ struct mipi_dsi_device *dsi[2];
+ const struct panel_info *panel_info;
+ struct gpio_desc *reset_gpio;
+ struct regulator_bulk_data *supplies;
+};
+
+struct panel_info {
+ unsigned int width_mm;
+ unsigned int height_mm;
+
+ unsigned int lanes;
+ enum mipi_dsi_pixel_format format;
+ unsigned long mode_flags;
+
+ const struct drm_display_mode display_mode;
+
+ unsigned int dsc_slice_per_pkt;
+ struct drm_dsc_config * const dsc_cfg;
+
+ int (*init_sequence)(struct nt36532 *ctx);
+
+ bool is_dual_dsi;
+};
+
+static const struct regulator_bulk_data nt36532_supplies[] = {
+ { .supply = "vddio" }, /* 1.8v */
+};
+
+static inline struct nt36532 *to_nt36532(struct drm_panel *panel)
+{
+ return container_of(panel, struct nt36532, panel);
+}
+
+static void nt36532_reset(struct nt36532 *ctx)
+{
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+ usleep_range(10000, 10100);
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ usleep_range(5000, 5100);
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+ usleep_range(15000, 15100);
+}
+
+static int nt36532_prepare(struct drm_panel *panel)
+{
+ struct nt36532 *ctx = to_nt36532(panel);
+ int ret;
+
+ ret = regulator_bulk_enable(ARRAY_SIZE(nt36532_supplies),
+ ctx->supplies);
+ if (ret < 0)
+ return ret;
+
+ nt36532_reset(ctx);
+
+ ret = ctx->panel_info->init_sequence(ctx);
+ if (ret < 0) {
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ regulator_bulk_disable(ARRAY_SIZE(nt36532_supplies),
+ ctx->supplies);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int nt36532_off(struct nt36532 *ctx)
+{
+ struct mipi_dsi_device *dsi = ctx->dsi[0];
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
+
+ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 10100);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 65);
+
+ return dsi_ctx.accum_err;
+}
+
+static int nt36532_unprepare(struct drm_panel *panel)
+{
+ struct nt36532 *ctx = to_nt36532(panel);
+ struct device *dev = &ctx->dsi[0]->dev;
+ int ret;
+
+ ret = nt36532_off(ctx);
+ if (ret < 0)
+ dev_err(dev, "Failed to un-initialize panel: %d\n", ret);
+
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ regulator_bulk_disable(ARRAY_SIZE(nt36532_supplies), ctx->supplies);
+
+ return 0;
+}
+
+static int nt36532_get_modes(struct drm_panel *panel,
+ struct drm_connector *connector)
+{
+ struct nt36532 *ctx = to_nt36532(panel);
+ const struct panel_info *panel_info = ctx->panel_info;
+
+ return drm_connector_helper_get_modes_fixed(connector,
+ &panel_info->display_mode);
+}
+
+static const struct drm_panel_funcs nt36532_panel_funcs = {
+ .prepare = nt36532_prepare,
+ .unprepare = nt36532_unprepare,
+ .get_modes = nt36532_get_modes,
+};
+
+static int nt36532_probe(struct mipi_dsi_device *dsi)
+{
+ struct mipi_dsi_device_info dsi_info = {"nt36532-secondary", 0, NULL};
+ const struct panel_info *panel_info;
+ struct mipi_dsi_host *dsi1_host;
+ struct device *dev = &dsi->dev;
+ struct device_node *dsi1;
+ struct nt36532 *ctx;
+ int num_dsi = 1;
+ int ret, i;
+
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ return -ENOMEM;
+
+ ret = devm_regulator_bulk_get_const(&dsi->dev,
+ ARRAY_SIZE(nt36532_supplies),
+ nt36532_supplies, &ctx->supplies);
+ if (ret < 0)
+ return ret;
+
+ 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-gpios\n");
+
+ ctx->panel_info = of_device_get_match_data(dev);
+ panel_info = ctx->panel_info;
+ if (!panel_info)
+ return -ENODEV;
+
+ if (panel_info->is_dual_dsi) {
+ num_dsi = 2;
+ dsi1 = of_graph_get_remote_node(dsi->dev.of_node, 1, -1);
+ if (!dsi1) {
+ dev_err(dev, "cannot get secondary DSI node.\n");
+ return -ENODEV;
+ }
+
+ dsi1_host = of_find_mipi_dsi_host_by_node(dsi1);
+ of_node_put(dsi1);
+ if (!dsi1_host)
+ return dev_err_probe(dev, -EPROBE_DEFER,
+ "cannot get secondary DSI host\n");
+
+ dsi_info.node = dsi1;
+
+ ctx->dsi[1] = devm_mipi_dsi_device_register_full(dev, dsi1_host,
+ &dsi_info);
+ if (IS_ERR(ctx->dsi[1])) {
+ dev_err(dev, "cannot get secondary DSI device\n");
+ return PTR_ERR(ctx->dsi[1]);
+ }
+
+ mipi_dsi_set_drvdata(ctx->dsi[1], ctx);
+ }
+
+ ctx->dsi[0] = dsi;
+ mipi_dsi_set_drvdata(dsi, ctx);
+
+ drm_panel_init(&ctx->panel, dev, &nt36532_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+
+ ctx->panel.prepare_prev_first = true;
+
+ drm_panel_add(&ctx->panel);
+
+ for (i = 0; i < num_dsi; i++) {
+ ctx->dsi[i]->lanes = panel_info->lanes;
+ ctx->dsi[i]->format = panel_info->format;
+ ctx->dsi[i]->mode_flags = panel_info->mode_flags;
+ ctx->dsi[i]->dsc = panel_info->dsc_cfg;
+ ctx->dsi[i]->dsc_slice_per_pkt = panel_info->dsc_slice_per_pkt;
+ ret = devm_mipi_dsi_attach(dev, ctx->dsi[i]);
+ 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 nt36532_remove(struct mipi_dsi_device *dsi)
+{
+ struct nt36532 *ctx = mipi_dsi_get_drvdata(dsi);
+
+ drm_panel_remove(&ctx->panel);
+}
+
+static int csot_init_sequence(struct nt36532 *ctx)
+{
+ struct mipi_dsi_device *dsi = ctx->dsi[0];
+ struct drm_dsc_picture_parameter_set pps;
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x22);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_LUT, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbc,
+ 0x00, 0x00, 0x03, 0x22, 0x00, 0x41);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x00, 0x60);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x07, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x08, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x09, 0x5a);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x10, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x11, 0x03);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x12, 0xe1);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x15, 0xa9);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x16, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x0a, 0x8e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x0b, 0x8e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x0c, 0x8e);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x0d, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x19, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1a, 0x04);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1b, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1c, 0x0c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1d, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1e, 0x14);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x1f, 0x18);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x20, 0x1c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x21, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x22, 0x24);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x23, 0x28);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x24, 0x2c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x25, 0x30);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_GAMMA_CURVE, 0x34);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x27, 0x38);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x28, 0x3c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x2a, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x2b, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_PARTIAL_ROWS, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_PARTIAL_COLUMNS,
+ 0xfd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x32, 0xfc);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x33, 0xfa);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x34, 0xf8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x35, 0xf6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_ADDRESS_MODE, 0xf4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x37, 0xf2);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x38, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x39, 0xee);
+ mipi_dsi_dcs_set_pixel_format_multi(&dsi_ctx, 0xec);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x3b, 0xea);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_3D_CONTROL, 0xe9);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x3f, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_VSYNC_TIMING, 0xe7);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x41, 0xe6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_GET_SCANLINE, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x46, 0xf9);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x47, 0xf6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x48, 0xf2);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x49, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4a, 0xec);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4b, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4c, 0xe4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4d, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4e, 0xde);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x4f, 0xd9);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x50, 0xd6);
+ mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0x00d4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x52, 0xc2);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY,
+ 0xd0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x54, 0xcd);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x58, 0xff);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x59, 0xf6);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x5a, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x5b, 0xeb);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x5c, 0xe8);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x5d, 0xe5);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS,
+ 0xe3);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x5f, 0xe0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x60, 0xde);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x61, 0xda);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x62, 0xd7);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x63, 0xd4);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x64, 0xd2);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x65, 0xd0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x66, 0xcc);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x67, 0xc8);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x27);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_PARTIAL_ROWS, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_SET_PARTIAL_COLUMNS,
+ 0x2a, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xd0, 0x31);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xd1, 0x54);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xde, 0x40);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xdf, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc4, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0xf0);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfa, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x76, 0x16);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x23);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xba, 0xaa, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbb, 0xa0, 0x2a);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x27);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x01, 0x8c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x10);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xfb, 0x01);
+ mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0xff07);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY,
+ 0x2c);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0x00);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x3b,
+ 0x03, 0xd2, 0x1a, 0x04, 0x04, 0x00);
+
+ /* Enable DSC */
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x90, 0x03);
+ drm_dsc_pps_payload_pack(&pps, ctx->panel_info->dsc_cfg);
+ mipi_dsi_picture_parameter_set_multi(&dsi_ctx, &pps);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x9d, 0x01);
+
+ /* Program refresh rate control registers */
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb2, 0x91);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb3, 0x41);
+
+ 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_usleep_range(&dsi_ctx, 10000, 10100);
+
+ return dsi_ctx.accum_err;
+}
+
+static const struct drm_display_mode csot_display_mode = {
+ /* 120Hz, the typical value */
+ .clock = (1500 + 118 + 20 + 100) * 2 * (2120 + 26 + 2 + 208) * 120 / 1000,
+ .hdisplay = 1500 * 2,
+ .hsync_start = (1500 + 118) * 2,
+ .hsync_end = (1500 + 118 + 20) * 2,
+ .htotal = (1500 + 118 + 20 + 100) * 2,
+ .vdisplay = 2120,
+ .vsync_start = 2120 + 26,
+ .vsync_end = 2120 + 26 + 2,
+ .vtotal = 2120 + 26 + 2 + 208,
+};
+
+static struct drm_dsc_config csot_dsc_cfg = {
+ .dsc_version_major = 1,
+ .dsc_version_minor = 2,
+ .slice_height = 20,
+ .slice_width = 750,
+ .slice_count = 2,
+ .bits_per_component = 8,
+ .bits_per_pixel = 8 << 4,
+ .block_pred_enable = true,
+};
+
+static const struct panel_info csot_panel_info = {
+ .width_mm = 250,
+ .height_mm = 177,
+ .lanes = 4,
+ .format = MIPI_DSI_FMT_RGB888,
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
+ MIPI_DSI_MODE_LPM,
+ .display_mode = csot_display_mode,
+ .dsc_slice_per_pkt = 2,
+ .dsc_cfg = &csot_dsc_cfg,
+ .init_sequence = csot_init_sequence,
+ .is_dual_dsi = true,
+};
+
+static const struct of_device_id nt36532_of_match[] = {
+ { .compatible = "csot,ppc100hb1-1", .data = &csot_panel_info },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, nt36532_of_match);
+
+static struct mipi_dsi_driver nt36532_driver = {
+ .probe = nt36532_probe,
+ .remove = nt36532_remove,
+ .driver = {
+ .name = "panel-novatek-nt36532",
+ .of_match_table = nt36532_of_match,
+ },
+};
+module_mipi_dsi_driver(nt36532_driver);
+
+MODULE_AUTHOR("Junjie Cao <caojunjie650@gmail.com>");
+MODULE_DESCRIPTION("DRM driver for Novatek NT36532 based MIPI DSI panels");
+MODULE_LICENSE("GPL");
--
2.48.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-01 13:59 ` [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Junjie Cao
@ 2025-10-02 2:03 ` Dmitry Baryshkov
2025-10-13 2:09 ` 曹俊杰
[not found] ` <CAK6c68jBwykcWZm3ckm3nwab-X9Are4rD-eauE4rXA2+XvuX1w@mail.gmail.com>
0 siblings, 2 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:03 UTC (permalink / raw)
To: Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> From: Jun Nie <jun.nie@linaro.org>
>
> Some panels support multiple slice to be sent in a single DSC packet. And
> this feature is a must for specific panels, such as JDI LPM026M648C. Add a
> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> feature in msm mdss driver.
>
> Co-developed-by: Jonathan Marek <jonathan@marek.ca>
> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> include/drm/drm_mipi_dsi.h | 2 ++
> 2 files changed, 12 insertions(+), 15 deletions(-)
Please extract the generic part, so that it can be merged through a
generic tree.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-01 13:59 ` [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver Junjie Cao
@ 2025-10-02 2:04 ` Dmitry Baryshkov
2025-10-06 9:24 ` Konrad Dybcio
2025-10-13 2:09 ` 曹俊杰
0 siblings, 2 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-02 2:04 UTC (permalink / raw)
To: Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
> Add a driver for panels using the Novatek NT36532 Display Driver IC,
> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
> tablets.
>
> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
> ---
> MAINTAINERS | 7 +
> drivers/gpu/drm/panel/Kconfig | 10 +
> drivers/gpu/drm/panel/Makefile | 1 +
> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
> 4 files changed, 455 insertions(+)
> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
>
> +
> +static const struct panel_info csot_panel_info = {
> + .width_mm = 250,
> + .height_mm = 177,
> + .lanes = 4,
> + .format = MIPI_DSI_FMT_RGB888,
> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
> + MIPI_DSI_MODE_LPM,
> + .display_mode = csot_display_mode,
> + .dsc_slice_per_pkt = 2,
As this is not a part of the standard, what if the DSI host doesn't
support this feature?
> + .dsc_cfg = &csot_dsc_cfg,
> + .init_sequence = csot_init_sequence,
> + .is_dual_dsi = true,
> +};
> +
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532
2025-10-01 13:59 ` [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532 Junjie Cao
@ 2025-10-02 18:32 ` Conor Dooley
0 siblings, 0 replies; 19+ messages in thread
From: Conor Dooley @ 2025-10-02 18:32 UTC (permalink / raw)
To: Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
[-- Attachment #1: Type: text/plain, Size: 52 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-02 2:04 ` Dmitry Baryshkov
@ 2025-10-06 9:24 ` Konrad Dybcio
2025-10-06 10:02 ` Dmitry Baryshkov
2025-10-13 2:09 ` 曹俊杰
1 sibling, 1 reply; 19+ messages in thread
From: Konrad Dybcio @ 2025-10-06 9:24 UTC (permalink / raw)
To: Dmitry Baryshkov, Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On 10/2/25 4:04 AM, Dmitry Baryshkov wrote:
> On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
>> Add a driver for panels using the Novatek NT36532 Display Driver IC,
>> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
>> tablets.
>>
>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
>> ---
>> MAINTAINERS | 7 +
>> drivers/gpu/drm/panel/Kconfig | 10 +
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
>> 4 files changed, 455 insertions(+)
>> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
>>
>> +
>> +static const struct panel_info csot_panel_info = {
>> + .width_mm = 250,
>> + .height_mm = 177,
>> + .lanes = 4,
>> + .format = MIPI_DSI_FMT_RGB888,
>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
>> + MIPI_DSI_MODE_LPM,
>> + .display_mode = csot_display_mode,
>> + .dsc_slice_per_pkt = 2,
>
> As this is not a part of the standard, what if the DSI host doesn't
> support this feature?
Shouldn't the core gracefully throw something like an -EINVAL?
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-06 9:24 ` Konrad Dybcio
@ 2025-10-06 10:02 ` Dmitry Baryshkov
2025-10-06 10:10 ` Konrad Dybcio
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-06 10:02 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Junjie Cao, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Sean Paul, Marijn Suijten,
Antonino Maniscalco, Jonathan Marek, Eugene Lepshy, Jun Nie,
dri-devel, devicetree, linux-kernel, linux-arm-msm, freedreno
On Mon, Oct 06, 2025 at 11:24:35AM +0200, Konrad Dybcio wrote:
> On 10/2/25 4:04 AM, Dmitry Baryshkov wrote:
> > On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
> >> Add a driver for panels using the Novatek NT36532 Display Driver IC,
> >> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
> >> tablets.
> >>
> >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
> >> ---
> >> MAINTAINERS | 7 +
> >> drivers/gpu/drm/panel/Kconfig | 10 +
> >> drivers/gpu/drm/panel/Makefile | 1 +
> >> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
> >> 4 files changed, 455 insertions(+)
> >> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
> >>
> >> +
> >> +static const struct panel_info csot_panel_info = {
> >> + .width_mm = 250,
> >> + .height_mm = 177,
> >> + .lanes = 4,
> >> + .format = MIPI_DSI_FMT_RGB888,
> >> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
> >> + MIPI_DSI_MODE_LPM,
> >> + .display_mode = csot_display_mode,
> >> + .dsc_slice_per_pkt = 2,
> >
> > As this is not a part of the standard, what if the DSI host doesn't
> > support this feature?
>
> Shouldn't the core gracefully throw something like an -EINVAL?
There is no 'core' here. Each DSI DRM host manages DSC on their own.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-06 10:02 ` Dmitry Baryshkov
@ 2025-10-06 10:10 ` Konrad Dybcio
2025-10-06 10:39 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Konrad Dybcio @ 2025-10-06 10:10 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Junjie Cao, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Sean Paul, Marijn Suijten,
Antonino Maniscalco, Jonathan Marek, Eugene Lepshy, Jun Nie,
dri-devel, devicetree, linux-kernel, linux-arm-msm, freedreno
On 10/6/25 12:02 PM, Dmitry Baryshkov wrote:
> On Mon, Oct 06, 2025 at 11:24:35AM +0200, Konrad Dybcio wrote:
>> On 10/2/25 4:04 AM, Dmitry Baryshkov wrote:
>>> On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
>>>> Add a driver for panels using the Novatek NT36532 Display Driver IC,
>>>> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
>>>> tablets.
>>>>
>>>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
>>>> ---
>>>> MAINTAINERS | 7 +
>>>> drivers/gpu/drm/panel/Kconfig | 10 +
>>>> drivers/gpu/drm/panel/Makefile | 1 +
>>>> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
>>>> 4 files changed, 455 insertions(+)
>>>> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
>>>>
>>>> +
>>>> +static const struct panel_info csot_panel_info = {
>>>> + .width_mm = 250,
>>>> + .height_mm = 177,
>>>> + .lanes = 4,
>>>> + .format = MIPI_DSI_FMT_RGB888,
>>>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
>>>> + MIPI_DSI_MODE_LPM,
>>>> + .display_mode = csot_display_mode,
>>>> + .dsc_slice_per_pkt = 2,
>>>
>>> As this is not a part of the standard, what if the DSI host doesn't
>>> support this feature?
>>
>> Shouldn't the core gracefully throw something like an -EINVAL?
>
> There is no 'core' here. Each DSI DRM host manages DSC on their own.
drm_dsc_helper?
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-06 10:10 ` Konrad Dybcio
@ 2025-10-06 10:39 ` Dmitry Baryshkov
2025-10-06 10:49 ` Konrad Dybcio
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-06 10:39 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Junjie Cao, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Sean Paul, Marijn Suijten,
Antonino Maniscalco, Jonathan Marek, Eugene Lepshy, Jun Nie,
dri-devel, devicetree, linux-kernel, linux-arm-msm, freedreno
On Mon, Oct 06, 2025 at 12:10:05PM +0200, Konrad Dybcio wrote:
> On 10/6/25 12:02 PM, Dmitry Baryshkov wrote:
> > On Mon, Oct 06, 2025 at 11:24:35AM +0200, Konrad Dybcio wrote:
> >> On 10/2/25 4:04 AM, Dmitry Baryshkov wrote:
> >>> On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
> >>>> Add a driver for panels using the Novatek NT36532 Display Driver IC,
> >>>> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
> >>>> tablets.
> >>>>
> >>>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
> >>>> ---
> >>>> MAINTAINERS | 7 +
> >>>> drivers/gpu/drm/panel/Kconfig | 10 +
> >>>> drivers/gpu/drm/panel/Makefile | 1 +
> >>>> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
> >>>> 4 files changed, 455 insertions(+)
> >>>> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
> >>>>
> >>>> +
> >>>> +static const struct panel_info csot_panel_info = {
> >>>> + .width_mm = 250,
> >>>> + .height_mm = 177,
> >>>> + .lanes = 4,
> >>>> + .format = MIPI_DSI_FMT_RGB888,
> >>>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
> >>>> + MIPI_DSI_MODE_LPM,
> >>>> + .display_mode = csot_display_mode,
> >>>> + .dsc_slice_per_pkt = 2,
> >>>
> >>> As this is not a part of the standard, what if the DSI host doesn't
> >>> support this feature?
> >>
> >> Shouldn't the core gracefully throw something like an -EINVAL?
> >
> > There is no 'core' here. Each DSI DRM host manages DSC on their own.
>
> drm_dsc_helper?
No, that's just for calculating PPS and some other values. It's one of
the problems of the DSI model, which I tried to solve a year ago, but
failed up to now to do it completely and clearly. The DSI device can't
check host's capabilities. It declares what it needs inside struct
mipi_dsi_device and hopes for the best.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-06 10:39 ` Dmitry Baryshkov
@ 2025-10-06 10:49 ` Konrad Dybcio
0 siblings, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2025-10-06 10:49 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Junjie Cao, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Sean Paul, Marijn Suijten,
Antonino Maniscalco, Jonathan Marek, Eugene Lepshy, Jun Nie,
dri-devel, devicetree, linux-kernel, linux-arm-msm, freedreno
On 10/6/25 12:39 PM, Dmitry Baryshkov wrote:
> On Mon, Oct 06, 2025 at 12:10:05PM +0200, Konrad Dybcio wrote:
>> On 10/6/25 12:02 PM, Dmitry Baryshkov wrote:
>>> On Mon, Oct 06, 2025 at 11:24:35AM +0200, Konrad Dybcio wrote:
>>>> On 10/2/25 4:04 AM, Dmitry Baryshkov wrote:
>>>>> On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
>>>>>> Add a driver for panels using the Novatek NT36532 Display Driver IC,
>>>>>> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
>>>>>> tablets.
>>>>>>
>>>>>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
>>>>>> ---
>>>>>> MAINTAINERS | 7 +
>>>>>> drivers/gpu/drm/panel/Kconfig | 10 +
>>>>>> drivers/gpu/drm/panel/Makefile | 1 +
>>>>>> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
>>>>>> 4 files changed, 455 insertions(+)
>>>>>> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
>>>>>>
>>>>>> +
>>>>>> +static const struct panel_info csot_panel_info = {
>>>>>> + .width_mm = 250,
>>>>>> + .height_mm = 177,
>>>>>> + .lanes = 4,
>>>>>> + .format = MIPI_DSI_FMT_RGB888,
>>>>>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
>>>>>> + MIPI_DSI_MODE_LPM,
>>>>>> + .display_mode = csot_display_mode,
>>>>>> + .dsc_slice_per_pkt = 2,
>>>>>
>>>>> As this is not a part of the standard, what if the DSI host doesn't
>>>>> support this feature?
>>>>
>>>> Shouldn't the core gracefully throw something like an -EINVAL?
>>>
>>> There is no 'core' here. Each DSI DRM host manages DSC on their own.
>>
>> drm_dsc_helper?
>
> No, that's just for calculating PPS and some other values. It's one of
> the problems of the DSI model, which I tried to solve a year ago, but
> failed up to now to do it completely and clearly. The DSI device can't
> check host's capabilities. It declares what it needs inside struct
> mipi_dsi_device and hopes for the best.
Alright, thanks for the explanation
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-02 2:03 ` Dmitry Baryshkov
@ 2025-10-13 2:09 ` 曹俊杰
[not found] ` <CAK6c68jBwykcWZm3ckm3nwab-X9Are4rD-eauE4rXA2+XvuX1w@mail.gmail.com>
1 sibling, 0 replies; 19+ messages in thread
From: 曹俊杰 @ 2025-10-13 2:09 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月2日周四 10:04写道:
>On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
>> From: Jun Nie <jun.nie@linaro.org>
>>
>> Some panels support multiple slice to be sent in a single DSC packet. And
>> this feature is a must for specific panels, such as JDI LPM026M648C. Add a
>> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
>> feature in msm mdss driver.
>>
>> Co-developed-by: Jonathan Marek <jonathan@marek.ca>
>> Signed-off-by: Jonathan Marek <jonathan@marek.ca>
>> Signed-off-by: Jun Nie <jun.nie@linaro.org>
>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
>> ---
>> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
>> include/drm/drm_mipi_dsi.h | 2 ++
>> 2 files changed, 12 insertions(+), 15 deletions(-)
>
>Please extract the generic part, so that it can be merged through a
>generic tree.
>
Sorry, I don't get it. The generic part, generic tree? Do you mean
the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
tablets that are equipped with qcom chips. I don't know if these
panels are used on other platforms, and if it is necessary to do it
in drm.
>--
>With best wishes
>Dmitry
Regards,
Junjie
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver
2025-10-02 2:04 ` Dmitry Baryshkov
2025-10-06 9:24 ` Konrad Dybcio
@ 2025-10-13 2:09 ` 曹俊杰
1 sibling, 0 replies; 19+ messages in thread
From: 曹俊杰 @ 2025-10-13 2:09 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月2日周四 10:05写道:
>On Wed, Oct 01, 2025 at 09:59:14PM +0800, Junjie Cao wrote:
>> Add a driver for panels using the Novatek NT36532 Display Driver IC,
>> including support for the CSOT PPC100HB1-1, found in the OnePlus Pad 2
>> tablets.
>>
>> Signed-off-by: Junjie Cao <caojunjie650@gmail.com>
>> ---
>> MAINTAINERS | 7 +
>> drivers/gpu/drm/panel/Kconfig | 10 +
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-novatek-nt36532.c | 437 ++++++++++++++++++
>> 4 files changed, 455 insertions(+)
>> create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36532.c
>>
>> +
>> +static const struct panel_info csot_panel_info = {
>> + .width_mm = 250,
>> + .height_mm = 177,
>> + .lanes = 4,
>> + .format = MIPI_DSI_FMT_RGB888,
>> + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS |
>> + MIPI_DSI_MODE_LPM,
>> + .display_mode = csot_display_mode,
>> + .dsc_slice_per_pkt = 2,
>
>As this is not a part of the standard, what if the DSI host doesn't
>support this feature?
>
Without it, parameters will not be calculated correctly, garbled then.
>> + .dsc_cfg = &csot_dsc_cfg,
>> + .init_sequence = csot_init_sequence,
>> + .is_dual_dsi = true,
>> +};
>> +
>
>--
>With best wishes
>Dmitry
Regards,
Junjie
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
[not found] ` <CAK6c68jBwykcWZm3ckm3nwab-X9Are4rD-eauE4rXA2+XvuX1w@mail.gmail.com>
@ 2025-10-13 9:39 ` Dmitry Baryshkov
2025-10-13 11:04 ` Junjie Cao
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-13 9:39 UTC (permalink / raw)
To: 曹俊杰
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On 13/10/2025 04:52, 曹俊杰 wrote:
> >Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com
> <mailto:dmitry.baryshkov@oss.qualcomm.com>> 于2025年10月2日周四 10:04写道:
> >On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> >> From: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> >>
> >> Some panels support multiple slice to be sent in a single DSC
> packet. And
> >> this feature is a must for specific panels, such as JDI LPM026M648C.
> Add a
> >> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> >> feature in msm mdss driver.
> >>
> >> Co-developed-by: Jonathan Marek <jonathan@marek.ca
> <mailto:jonathan@marek.ca>>
> >> Signed-off-by: Jonathan Marek <jonathan@marek.ca
> <mailto:jonathan@marek.ca>>
> >> Signed-off-by: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com
> <mailto:caojunjie650@gmail.com>>
> >> ---
> >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> >> include/drm/drm_mipi_dsi.h | 2 ++
> >> 2 files changed, 12 insertions(+), 15 deletions(-)
> >
> >Please extract the generic part, so that it can be merged through a
> >generic tree.
> >
>
> Sorry, I don't get it. The generic part, generic tree? Do you mean
> the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
> tablets that are equipped with qcom chips. I don't know if these
> panels are used on other platforms, and if it is necessary to do it
> in drm.
There are two changes here:
- MIPI DSI header change
- msm DSI driver
I've asked to split it to those two commits so that he change for
drm_mipi_dsi.h is more obvious for reviewers and so that it can be
merged through a drm-misc tree (or through drm-msm tree provided it gets
a necessary ack).
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-13 9:39 ` Dmitry Baryshkov
@ 2025-10-13 11:04 ` Junjie Cao
2025-10-13 12:31 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Junjie Cao @ 2025-10-13 11:04 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 17:39写道:
> On 13/10/2025 04:52, 曹俊杰 wrote:
> > >Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com
> > <mailto:dmitry.baryshkov@oss.qualcomm.com>> 于2025年10月2日周四 10:04写道:
> > >On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> > >> From: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > >>
> > >> Some panels support multiple slice to be sent in a single DSC
> > packet. And
> > >> this feature is a must for specific panels, such as JDI LPM026M648C.
> > Add a
> > >> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> > >> feature in msm mdss driver.
> > >>
> > >> Co-developed-by: Jonathan Marek <jonathan@marek.ca
> > <mailto:jonathan@marek.ca>>
> > >> Signed-off-by: Jonathan Marek <jonathan@marek.ca
> > <mailto:jonathan@marek.ca>>
> > >> Signed-off-by: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com
> > <mailto:caojunjie650@gmail.com>>
> > >> ---
> > >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> > >> include/drm/drm_mipi_dsi.h | 2 ++
> > >> 2 files changed, 12 insertions(+), 15 deletions(-)
> > >
> > >Please extract the generic part, so that it can be merged through a
> > >generic tree.
> > >
> >
> > Sorry, I don't get it. The generic part, generic tree? Do you mean
> > the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
> > tablets that are equipped with qcom chips. I don't know if these
> > panels are used on other platforms, and if it is necessary to do it
> > in drm.
>
> There are two changes here:
> - MIPI DSI header change
> - msm DSI driver
>
> I've asked to split it to those two commits so that he change for
> drm_mipi_dsi.h is more obvious for reviewers and so that it can be
> merged through a drm-misc tree (or through drm-msm tree provided it gets
> a necessary ack).
>
Thanks for your clear explanation.
I don't mind to add the field separately. But should I submit it
with the panel driver together? Otherwise, this field is unused
for a while.
However, as you mentioned, this is not a part of standard, neither
mipi dsi nor VESA DSC. Recently, only Qualcomm devices require it
to calculate parameters, then we use them to program registers. Why
don't we parse the field from devicetree?
>
> --
> With best wishes
> Dmitry
Regards,
Junjie
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-13 11:04 ` Junjie Cao
@ 2025-10-13 12:31 ` Dmitry Baryshkov
2025-10-13 13:17 ` Junjie Cao
0 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-13 12:31 UTC (permalink / raw)
To: Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On Mon, Oct 13, 2025 at 07:04:43PM +0800, Junjie Cao wrote:
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 17:39写道:
> > On 13/10/2025 04:52, 曹俊杰 wrote:
> > > >Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com
> > > <mailto:dmitry.baryshkov@oss.qualcomm.com>> 于2025年10月2日周四 10:04写道:
> > > >On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> > > >> From: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > >>
> > > >> Some panels support multiple slice to be sent in a single DSC
> > > packet. And
> > > >> this feature is a must for specific panels, such as JDI LPM026M648C.
> > > Add a
> > > >> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> > > >> feature in msm mdss driver.
> > > >>
> > > >> Co-developed-by: Jonathan Marek <jonathan@marek.ca
> > > <mailto:jonathan@marek.ca>>
> > > >> Signed-off-by: Jonathan Marek <jonathan@marek.ca
> > > <mailto:jonathan@marek.ca>>
> > > >> Signed-off-by: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com
> > > <mailto:caojunjie650@gmail.com>>
> > > >> ---
> > > >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> > > >> include/drm/drm_mipi_dsi.h | 2 ++
> > > >> 2 files changed, 12 insertions(+), 15 deletions(-)
> > > >
> > > >Please extract the generic part, so that it can be merged through a
> > > >generic tree.
> > > >
> > >
> > > Sorry, I don't get it. The generic part, generic tree? Do you mean
> > > the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
> > > tablets that are equipped with qcom chips. I don't know if these
> > > panels are used on other platforms, and if it is necessary to do it
> > > in drm.
> >
> > There are two changes here:
> > - MIPI DSI header change
> > - msm DSI driver
> >
> > I've asked to split it to those two commits so that he change for
> > drm_mipi_dsi.h is more obvious for reviewers and so that it can be
> > merged through a drm-misc tree (or through drm-msm tree provided it gets
> > a necessary ack).
> >
>
> Thanks for your clear explanation.
>
> I don't mind to add the field separately. But should I submit it
> with the panel driver together? Otherwise, this field is unused
> for a while.
>
> However, as you mentioned, this is not a part of standard, neither
> mipi dsi nor VESA DSC. Recently, only Qualcomm devices require it
> to calculate parameters, then we use them to program registers. Why
> don't we parse the field from devicetree?
Because the value is uniquelly identified by the panel's compat string.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-13 12:31 ` Dmitry Baryshkov
@ 2025-10-13 13:17 ` Junjie Cao
2025-10-13 14:34 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Junjie Cao @ 2025-10-13 13:17 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 20:31写道:
> On Mon, Oct 13, 2025 at 07:04:43PM +0800, Junjie Cao wrote:
> > Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 17:39写道:
> > > On 13/10/2025 04:52, 曹俊杰 wrote:
> > > > >Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com
> > > > <mailto:dmitry.baryshkov@oss.qualcomm.com>> 于2025年10月2日周四 10:04写道:
> > > > >On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> > > > >> From: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > > >>
> > > > >> Some panels support multiple slice to be sent in a single DSC
> > > > packet. And
> > > > >> this feature is a must for specific panels, such as JDI LPM026M648C.
> > > > Add a
> > > > >> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> > > > >> feature in msm mdss driver.
> > > > >>
> > > > >> Co-developed-by: Jonathan Marek <jonathan@marek.ca
> > > > <mailto:jonathan@marek.ca>>
> > > > >> Signed-off-by: Jonathan Marek <jonathan@marek.ca
> > > > <mailto:jonathan@marek.ca>>
> > > > >> Signed-off-by: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > > >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com
> > > > <mailto:caojunjie650@gmail.com>>
> > > > >> ---
> > > > >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> > > > >> include/drm/drm_mipi_dsi.h | 2 ++
> > > > >> 2 files changed, 12 insertions(+), 15 deletions(-)
> > > > >
> > > > >Please extract the generic part, so that it can be merged through a
> > > > >generic tree.
> > > > >
> > > >
> > > > Sorry, I don't get it. The generic part, generic tree? Do you mean
> > > > the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
> > > > tablets that are equipped with qcom chips. I don't know if these
> > > > panels are used on other platforms, and if it is necessary to do it
> > > > in drm.
> > >
> > > There are two changes here:
> > > - MIPI DSI header change
> > > - msm DSI driver
> > >
> > > I've asked to split it to those two commits so that he change for
> > > drm_mipi_dsi.h is more obvious for reviewers and so that it can be
> > > merged through a drm-misc tree (or through drm-msm tree provided it gets
> > > a necessary ack).
> > >
> >
> > Thanks for your clear explanation.
> >
> > I don't mind to add the field separately. But should I submit it
> > with the panel driver together? Otherwise, this field is unused
> > for a while.
> >
> > However, as you mentioned, this is not a part of standard, neither
> > mipi dsi nor VESA DSC. Recently, only Qualcomm devices require it
> > to calculate parameters, then we use them to program registers. Why
> > don't we parse the field from devicetree?
>
> Because the value is uniquelly identified by the panel's compat string.
>
Yes, it is panel specified.
But can we set it for every panel like
&mdss_dsi0 {
qcom,mdss-dsc-slice-per-pkt = <2>;
status = "okay";
panel: panel@0 {
compatible = "foo,bar";
reg = <0>;
};
};
or moving the property to panel node? We access it from child node.
> --
> With best wishes
> Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2025-10-13 13:17 ` Junjie Cao
@ 2025-10-13 14:34 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2025-10-13 14:34 UTC (permalink / raw)
To: Junjie Cao
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Sean Paul, Marijn Suijten, Antonino Maniscalco,
Jonathan Marek, Eugene Lepshy, Jun Nie, dri-devel, devicetree,
linux-kernel, linux-arm-msm, freedreno
On Mon, Oct 13, 2025 at 09:17:04PM +0800, Junjie Cao wrote:
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 20:31写道:
> > On Mon, Oct 13, 2025 at 07:04:43PM +0800, Junjie Cao wrote:
> > > Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 于2025年10月13日周一 17:39写道:
> > > > On 13/10/2025 04:52, 曹俊杰 wrote:
> > > > > >Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com
> > > > > <mailto:dmitry.baryshkov@oss.qualcomm.com>> 于2025年10月2日周四 10:04写道:
> > > > > >On Wed, Oct 01, 2025 at 09:59:13PM +0800, Junjie Cao wrote:
> > > > > >> From: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > > > >>
> > > > > >> Some panels support multiple slice to be sent in a single DSC
> > > > > packet. And
> > > > > >> this feature is a must for specific panels, such as JDI LPM026M648C.
> > > > > Add a
> > > > > >> dsc_slice_per_pkt member into struct mipi_dsi_device and support the
> > > > > >> feature in msm mdss driver.
> > > > > >>
> > > > > >> Co-developed-by: Jonathan Marek <jonathan@marek.ca
> > > > > <mailto:jonathan@marek.ca>>
> > > > > >> Signed-off-by: Jonathan Marek <jonathan@marek.ca
> > > > > <mailto:jonathan@marek.ca>>
> > > > > >> Signed-off-by: Jun Nie <jun.nie@linaro.org <mailto:jun.nie@linaro.org>>
> > > > > >> Signed-off-by: Junjie Cao <caojunjie650@gmail.com
> > > > > <mailto:caojunjie650@gmail.com>>
> > > > > >> ---
> > > > > >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> > > > > >> include/drm/drm_mipi_dsi.h | 2 ++
> > > > > >> 2 files changed, 12 insertions(+), 15 deletions(-)
> > > > > >
> > > > > >Please extract the generic part, so that it can be merged through a
> > > > > >generic tree.
> > > > > >
> > > > >
> > > > > Sorry, I don't get it. The generic part, generic tree? Do you mean
> > > > > the drm tree? `slice_per_pkt >= 2` is seen on the panels of these
> > > > > tablets that are equipped with qcom chips. I don't know if these
> > > > > panels are used on other platforms, and if it is necessary to do it
> > > > > in drm.
> > > >
> > > > There are two changes here:
> > > > - MIPI DSI header change
> > > > - msm DSI driver
> > > >
> > > > I've asked to split it to those two commits so that he change for
> > > > drm_mipi_dsi.h is more obvious for reviewers and so that it can be
> > > > merged through a drm-misc tree (or through drm-msm tree provided it gets
> > > > a necessary ack).
> > > >
> > >
> > > Thanks for your clear explanation.
> > >
> > > I don't mind to add the field separately. But should I submit it
> > > with the panel driver together? Otherwise, this field is unused
> > > for a while.
> > >
> > > However, as you mentioned, this is not a part of standard, neither
> > > mipi dsi nor VESA DSC. Recently, only Qualcomm devices require it
> > > to calculate parameters, then we use them to program registers. Why
> > > don't we parse the field from devicetree?
> >
> > Because the value is uniquelly identified by the panel's compat string.
> >
>
> Yes, it is panel specified.
> But can we set it for every panel like
>
> &mdss_dsi0 {
> qcom,mdss-dsc-slice-per-pkt = <2>;
>
> status = "okay";
>
> panel: panel@0 {
> compatible = "foo,bar";
> reg = <0>;
> };
> };
>
> or moving the property to panel node? We access it from child node.
Why do you need it in DT if the panel driver can provide this
information.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-10-13 14:34 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-01 13:59 [PATCH 0/3] drm/panel: Add support for Novatek NT36532 panel Junjie Cao
2025-10-01 13:59 ` [PATCH 1/3] dt-bindings: display: panel: Add Novatek NT36532 Junjie Cao
2025-10-02 18:32 ` Conor Dooley
2025-10-01 13:59 ` [PATCH 2/3] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Junjie Cao
2025-10-02 2:03 ` Dmitry Baryshkov
2025-10-13 2:09 ` 曹俊杰
[not found] ` <CAK6c68jBwykcWZm3ckm3nwab-X9Are4rD-eauE4rXA2+XvuX1w@mail.gmail.com>
2025-10-13 9:39 ` Dmitry Baryshkov
2025-10-13 11:04 ` Junjie Cao
2025-10-13 12:31 ` Dmitry Baryshkov
2025-10-13 13:17 ` Junjie Cao
2025-10-13 14:34 ` Dmitry Baryshkov
2025-10-01 13:59 ` [PATCH 3/3] drm/panel: Add Novatek NT36532 panel driver Junjie Cao
2025-10-02 2:04 ` Dmitry Baryshkov
2025-10-06 9:24 ` Konrad Dybcio
2025-10-06 10:02 ` Dmitry Baryshkov
2025-10-06 10:10 ` Konrad Dybcio
2025-10-06 10:39 ` Dmitry Baryshkov
2025-10-06 10:49 ` Konrad Dybcio
2025-10-13 2:09 ` 曹俊杰
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).