* [PATCH 1/2] drm/mipi-dsi: add flag for sending all DSC slices in one packet
2026-03-18 7:32 [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet Alexander Koskovich
@ 2026-03-18 7:32 ` Alexander Koskovich
2026-03-18 9:44 ` Dmitry Baryshkov
2026-03-18 7:33 ` [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Alexander Koskovich
2026-05-21 7:33 ` [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet Maxime Ripard
2 siblings, 1 reply; 8+ messages in thread
From: Alexander Koskovich @ 2026-03-18 7:32 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten
Cc: dri-devel, linux-kernel, linux-arm-msm, freedreno,
Alexander Koskovich
The MIPI DSI v1.3 spec defines two modes for transporting compressed
pixel data: one slice per packet or multiple slice widths in a single
packet (Section 8.8.24 Figure 40).
Add a MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag that panel drivers can
set to indicate that all DSC slices for a line should be packed into a
single packet. When unset should default to 1 slice per packet.
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
include/drm/drm_mipi_dsi.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 3aba7b380c8d..d3ad8c5d3ebe 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -138,6 +138,8 @@ struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node);
#define MIPI_DSI_MODE_LPM BIT(11)
/* transmit data ending at the same time for all lanes within one hsync */
#define MIPI_DSI_HS_PKT_END_ALIGNED BIT(12)
+/* pack all DSC slices for a line into a single packet */
+#define MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT BIT(13)
enum mipi_dsi_pixel_format {
MIPI_DSI_FMT_RGB888,
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/2] drm/mipi-dsi: add flag for sending all DSC slices in one packet
2026-03-18 7:32 ` [PATCH 1/2] drm/mipi-dsi: add flag for sending all DSC slices in one packet Alexander Koskovich
@ 2026-03-18 9:44 ` Dmitry Baryshkov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2026-03-18 9:44 UTC (permalink / raw)
To: Alexander Koskovich, Douglas Anderson
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, dri-devel, linux-kernel,
linux-arm-msm, freedreno
On Wed, Mar 18, 2026 at 07:32:58AM +0000, Alexander Koskovich wrote:
> The MIPI DSI v1.3 spec defines two modes for transporting compressed
> pixel data: one slice per packet or multiple slice widths in a single
> packet (Section 8.8.24 Figure 40).
>
> Add a MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag that panel drivers can
> set to indicate that all DSC slices for a line should be packed into a
> single packet. When unset should default to 1 slice per packet.
>
> Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
> ---
> include/drm/drm_mipi_dsi.h | 2 ++
> 1 file changed, 2 insertions(+)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
However I'd also like to hear an optinion from somebody else with the
higher authority.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2026-03-18 7:32 [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet Alexander Koskovich
2026-03-18 7:32 ` [PATCH 1/2] drm/mipi-dsi: add flag for sending all DSC slices in one packet Alexander Koskovich
@ 2026-03-18 7:33 ` Alexander Koskovich
2026-03-18 9:39 ` Dmitry Baryshkov
2026-05-21 7:33 ` [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet Maxime Ripard
2 siblings, 1 reply; 8+ messages in thread
From: Alexander Koskovich @ 2026-03-18 7:33 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten
Cc: dri-devel, linux-kernel, linux-arm-msm, freedreno,
Alexander Koskovich
Some panels support multiple slice to be sent in a single DSC packet and
this feature is a must for specific panels, such as the JDI LPM026M648C.
Use the MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag to derive slice_per_pkt
from slice_count, note that most panels are expected to just work with
just one slice per packet.
This change was originally authored by Jonathan Marek:
https://lore.kernel.org/all/20231114174218.19765-3-jonathan@marek.ca
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index db6da99375a1..758b076ee4bf 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;
@@ -927,17 +928,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);
@@ -1088,12 +1082,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) |
@@ -1702,8 +1692,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;
+ if (dsi->mode_flags & MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT)
+ msm_host->dsc_slice_per_pkt = dsi->dsc->slice_count;
+ else
+ msm_host->dsc_slice_per_pkt = 1;
+ }
ret = dsi_dev_attach(msm_host->pdev);
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2026-03-18 7:33 ` [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Alexander Koskovich
@ 2026-03-18 9:39 ` Dmitry Baryshkov
2026-05-21 7:44 ` Neil Armstrong
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2026-03-18 9:39 UTC (permalink / raw)
To: Alexander Koskovich
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, dri-devel, linux-kernel,
linux-arm-msm, freedreno
On Wed, Mar 18, 2026 at 07:33:03AM +0000, Alexander Koskovich wrote:
> Some panels support multiple slice to be sent in a single DSC packet and
> this feature is a must for specific panels, such as the JDI LPM026M648C.
>
> Use the MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag to derive slice_per_pkt
> from slice_count, note that most panels are expected to just work with
> just one slice per packet.
>
> This change was originally authored by Jonathan Marek:
> https://lore.kernel.org/all/20231114174218.19765-3-jonathan@marek.ca
This is a wrong way to give attribution. Either please retain the author
and Jonathan's SoB or use Co-developed-by and still Jonathan's SoB.
The patch looks good to me.
>
> Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> 1 file changed, 10 insertions(+), 15 deletions(-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2026-03-18 9:39 ` Dmitry Baryshkov
@ 2026-05-21 7:44 ` Neil Armstrong
2026-05-21 9:03 ` Alexander Koskovich
0 siblings, 1 reply; 8+ messages in thread
From: Neil Armstrong @ 2026-05-21 7:44 UTC (permalink / raw)
To: Dmitry Baryshkov, Alexander Koskovich
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, dri-devel, linux-kernel,
linux-arm-msm, freedreno
On 3/18/26 10:39, Dmitry Baryshkov wrote:
> On Wed, Mar 18, 2026 at 07:33:03AM +0000, Alexander Koskovich wrote:
>> Some panels support multiple slice to be sent in a single DSC packet and
>> this feature is a must for specific panels, such as the JDI LPM026M648C.
>>
>> Use the MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag to derive slice_per_pkt
>> from slice_count, note that most panels are expected to just work with
>> just one slice per packet.
>>
>> This change was originally authored by Jonathan Marek:
>> https://lore.kernel.org/all/20231114174218.19765-3-jonathan@marek.ca
>
> This is a wrong way to give attribution. Either please retain the author
> and Jonathan's SoB or use Co-developed-by and still Jonathan's SoB.
Please retain `Signed-off-by: Jonathan Marek <jonathan@marek.ca>` since the only
major difference with the original patch is moving the drm_mipi_dsi.h change to
another patch.
>
> The patch looks good to me.
>
>>
>> Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
>> ---
>> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
>> 1 file changed, 10 insertions(+), 15 deletions(-)
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1
2026-05-21 7:44 ` Neil Armstrong
@ 2026-05-21 9:03 ` Alexander Koskovich
0 siblings, 0 replies; 8+ messages in thread
From: Alexander Koskovich @ 2026-05-21 9:03 UTC (permalink / raw)
To: Neil Armstrong
Cc: Dmitry Baryshkov, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, dri-devel, linux-kernel, linux-arm-msm, freedreno
On Thursday, May 21st, 2026 at 3:50 AM, Neil Armstrong <neil.armstrong@linaro.org> wrote:
> On 3/18/26 10:39, Dmitry Baryshkov wrote:
> > On Wed, Mar 18, 2026 at 07:33:03AM +0000, Alexander Koskovich wrote:
> >> Some panels support multiple slice to be sent in a single DSC packet and
> >> this feature is a must for specific panels, such as the JDI LPM026M648C.
> >>
> >> Use the MIPI_DSI_MODE_DSC_ALL_SLICES_IN_PKT flag to derive slice_per_pkt
> >> from slice_count, note that most panels are expected to just work with
> >> just one slice per packet.
> >>
> >> This change was originally authored by Jonathan Marek:
> >> https://lore.kernel.org/all/20231114174218.19765-3-jonathan@marek.ca
> >
> > This is a wrong way to give attribution. Either please retain the author
> > and Jonathan's SoB or use Co-developed-by and still Jonathan's SoB.
>
> Please retain `Signed-off-by: Jonathan Marek <jonathan@marek.ca>` since the only
> major difference with the original patch is moving the drm_mipi_dsi.h change to
> another patch.
Yeah, made sure to add his Signed-off-by to v2:
https://lore.kernel.org/linux-arm-msm/20260318-dsi-dsc-slice-per-pkt-v2-2-0a1b316f8250@pm.me
>
> >
> > The patch looks good to me.
> >
> >>
> >> Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
> >> ---
> >> drivers/gpu/drm/msm/dsi/dsi_host.c | 25 ++++++++++---------------
> >> 1 file changed, 10 insertions(+), 15 deletions(-)
> >>
> >
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet
2026-03-18 7:32 [PATCH 0/2] drm/msm/dsi: support multiple DSC slices per packet Alexander Koskovich
2026-03-18 7:32 ` [PATCH 1/2] drm/mipi-dsi: add flag for sending all DSC slices in one packet Alexander Koskovich
2026-03-18 7:33 ` [PATCH 2/2] drm/msm/dsi: support DSC configurations with slice_per_pkt > 1 Alexander Koskovich
@ 2026-05-21 7:33 ` Maxime Ripard
2 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2026-05-21 7:33 UTC (permalink / raw)
To: Alexander Koskovich
Cc: dri-devel, freedreno, linux-arm-msm, linux-kernel, Abhinav Kumar,
David Airlie, Dmitry Baryshkov, Jessica Zhang, Maarten Lankhorst,
Marijn Suijten, Maxime Ripard, Rob Clark, Sean Paul,
Simona Vetter, Thomas Zimmermann
On Wed, 18 Mar 2026 07:32:53 +0000, Alexander Koskovich wrote:
> This series adds support for sending multiple DSC slices in a single
> DSI packet, which is required by some panels such as the JDI LPM026M648C.
>
> The MSM DRM change was originally authored by Jonathan Marek [1], changed to
> use an 'all slices in packet' flag which derives slice_per_pkt from slice_count
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 8+ messages in thread