Skip to contentSkip to conversation

drm/msm/disp/dpu: add merge3d support for sc7280

PATCH Applied Mahadevan P 3 participants 11 messages Jan 1 – Mar 18

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/msm/disp/dpu: add merge3d support for sc7280

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

---
Changes in v2:
- Updated commit message for clarity (Dmitry).

---
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +12 -2
index 8f978b9c3452..2f8688224f34 100644
@@ -13,6 +13,7 @@ static const struct dpu_caps sc7280_dpu_caps = {
 	.has_dim_layer = true,
 	.has_idle_pc = true,
 	.max_linewidth = 2400,
+	.has_3d_merge = true,
 	.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
 };
 
@@ -134,17 +135,24 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {
 		.name = "pingpong_2", .id = PINGPONG_2,
 		.base = 0x6b000, .len = 0,
 		.sblk = &sc7280_pp_sblk,
-		.merge_3d = 0,
+		.merge_3d = MERGE_3D_1,
 		.intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
 	}, {
 		.name = "pingpong_3", .id = PINGPONG_3,
 		.base = 0x6c000, .len = 0,
 		.sblk = &sc7280_pp_sblk,
-		.merge_3d = 0,
+		.merge_3d = MERGE_3D_1,
 		.intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
 	},
 };
 
+static const struct dpu_merge_3d_cfg sc7280_merge_3d[] = {
+	{
+		.name = "merge_3d_1", .id = MERGE_3D_1,
+		.base = 0x4f000, .len = 0x8,
+	},
+};
+
 /* NOTE: sc7280 only has one DSC hard slice encoder */
 static const struct dpu_dsc_cfg sc7280_dsc[] = {
 	{
@@ -247,6 +255,8 @@ const struct dpu_mdss_cfg dpu_sc7280_cfg = {
 	.mixer = sc7280_lm,
 	.pingpong_count = ARRAY_SIZE(sc7280_pp),
 	.pingpong = sc7280_pp,
+	.merge_3d_count = ARRAY_SIZE(sc7280_merge_3d),
+	.merge_3d = sc7280_merge_3d,
 	.dsc_count = ARRAY_SIZE(sc7280_dsc),
 	.dsc = sc7280_dsc,
 	.wb_count = ARRAY_SIZE(sc7280_wb),

---
base-commit: efb26a23ed5f5dc3554886ab398f559dcb1de96b
change-id: 20251231-4k-969b53d2ea4c

Best regards,

Signature · 1 line
Mahadevan P <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 12 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Quoted 9 lines
Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

---
Changes in v2:
- Updated commit message for clarity (Dmitry).

---
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
In reply to Mahadevan P
Quoted 8 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

[...]

Applied to msm-next, thanks!

[1/1] drm/msm/disp/dpu: add merge3d support for sc7280

      https://gitlab.freedesktop.org/lumag/msm/-/commit/2892de3f4f98

Best regards,

Signature · 2 lines
With best wishes
Dmitry
#3 lore raw
In reply to Mahadevan P

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Regards
Luca

#regzbot introduced: 2892de3f4f985fa779c330468e2f341fdb762ccd

Quoted 61 lines

---
Changes in v2:
- Updated commit message for clarity (Dmitry).

---
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +12 -3
index 8f978b9c3452..2f8688224f34 100644
@@ -13,6 +13,7 @@ static const struct dpu_caps sc7280_dpu_caps = {
 	.has_dim_layer = true,
 	.has_idle_pc = true,
 	.max_linewidth = 2400,
+	.has_3d_merge = true,
 	.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
 };
 
@@ -134,17 +135,24 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {
 		.name = "pingpong_2", .id = PINGPONG_2,
 		.base = 0x6b000, .len = 0,
 		.sblk = &sc7280_pp_sblk,
-		.merge_3d = 0,
+		.merge_3d = MERGE_3D_1,
 		.intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
 	}, {
 		.name = "pingpong_3", .id = PINGPONG_3,
 		.base = 0x6c000, .len = 0,
 		.sblk = &sc7280_pp_sblk,
-		.merge_3d = 0,
+		.merge_3d = MERGE_3D_1,
 		.intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
 	},
 };
 
+static const struct dpu_merge_3d_cfg sc7280_merge_3d[] = {
+	{
+		.name = "merge_3d_1", .id = MERGE_3D_1,
+		.base = 0x4f000, .len = 0x8,
+	},
+};
+
 /* NOTE: sc7280 only has one DSC hard slice encoder */
 static const struct dpu_dsc_cfg sc7280_dsc[] = {
 	{
@@ -247,6 +255,8 @@ const struct dpu_mdss_cfg dpu_sc7280_cfg = {
 	.mixer = sc7280_lm,
 	.pingpong_count = ARRAY_SIZE(sc7280_pp),
 	.pingpong = sc7280_pp,
+	.merge_3d_count = ARRAY_SIZE(sc7280_merge_3d),
+	.merge_3d = sc7280_merge_3d,
 	.dsc_count = ARRAY_SIZE(sc7280_dsc),
 	.dsc = sc7280_dsc,
 	.wb_count = ARRAY_SIZE(sc7280_wb),
 
---

base-commit: efb26a23ed5f5dc3554886ab398f559dcb1de96b
change-id: 20251231-4k-969b53d2ea4c

Best regards,

#4 lore raw
Quoted 20 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

Quoted 7 lines

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Quoted 6 lines

Regards
Luca

#regzbot introduced: 2892de3f4f985fa779c330468e2f341fdb762ccd

Signature · 2 lines
With best wishes
Dmitry
#5 lore raw

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Working (patch reverted)

# cat /sys/kernel/debug/dri/1/state
plane[44]: plane-0
        crtc=crtc-0
        fb=71
                allocated by = phoc
                refcount=2
                format=XR24 little-endian (0x34325258)
                modifier=0x500000000000001
                size=1224x2700
                layers:
                        size[0]=1224x2700
                        pitch[0]=5120
                        offset[0]=0
                        obj[0]:
                                name=0
                                refcount=6
                                start=00103729
                                size=14680064
                                imported=no
        crtc-pos=1224x2700+0+0
        src-pos=1224.000000x2700.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=1
        sspp[0]=sspp_0
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=1224x2700+0+0
        dst[0]=1224x2700+0+0
plane[50]: plane-1
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_8
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
plane[56]: plane-2
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_9
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
plane[62]: plane-3
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_10
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
crtc[68]: crtc-0
        enable=1
        active=1
        self_refresh_active=0
        planes_changed=1
        mode_changed=0
        active_changed=0
        connectors_changed=0
        color_mgmt_changed=0
        plane_mask=1
        connector_mask=1
        encoder_mask=1
        mode: "1224x2700": 90 311156 1224 1256 1264 1272 2700 2708 2710 2718 0x48 0x0
        lm[0]=2
        ctl[0]=0
crtc[69]: crtc-1
        enable=0
        active=0
        self_refresh_active=0
        planes_changed=0
        mode_changed=0
        active_changed=0
        connectors_changed=0
        color_mgmt_changed=0
        plane_mask=0
        connector_mask=0
        encoder_mask=0
        mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
connector[34]: DSI-1
        crtc=crtc-0
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=0
        max_requested_bpc=0
        colorspace=Default
connector[36]: DP-1
        crtc=(null)
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=1
        max_requested_bpc=0
        colorspace=Default
connector[39]: Writeback-1
        crtc=(null)
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=0
        max_requested_bpc=0
        colorspace=Default
resource mapping:
        pingpong=# # 68 # - - - - - - - - - 
        mixer=# - 68 # - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

Broken (with the patch)

# cat /sys/kernel/debug/dri/1/state
plane[44]: plane-0
        crtc=crtc-0
        fb=72
                allocated by = phoc
                refcount=2
                format=XR24 little-endian (0x34325258)
                modifier=0x500000000000001
                size=1224x2700
                layers:
                        size[0]=1224x2700
                        pitch[0]=5120
                        offset[0]=0
                        obj[0]:
                                name=0
                                refcount=6
                                start=00103729
                                size=14680064
                                imported=no
        crtc-pos=1224x2700+0+0
        src-pos=1224.000000x2700.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=1
        sspp[0]=sspp_0
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=1224x2700+0+0
        dst[0]=1224x2700+0+0
plane[50]: plane-1
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_8
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
plane[56]: plane-2
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_9
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
plane[62]: plane-3
        crtc=(null)
        fb=0
        crtc-pos=0x0+0+0
        src-pos=0.000000x0.000000+0.000000+0.000000
        rotation=1
        normalized-zpos=0
        color-encoding=ITU-R BT.601 YCbCr
        color-range=YCbCr limited range
        color_mgmt_changed=0
        color-pipeline=0
        stage=0
        sspp[0]=sspp_10
        multirect_mode[0]=none
        multirect_index[0]=solo
        src[0]=0x0+0+0
        dst[0]=0x0+0+0
crtc[68]: crtc-0
        enable=1
        active=1
        self_refresh_active=0
        planes_changed=1
        mode_changed=0
        active_changed=0
        connectors_changed=0
        color_mgmt_changed=0
        plane_mask=1
        connector_mask=1
        encoder_mask=1
        mode: "1224x2700": 90 311156 1224 1256 1264 1272 2700 2708 2710 2718 0x48 0x0
        lm[0]=2
        ctl[0]=0
        lm[1]=3
        ctl[1]=0
crtc[69]: crtc-1
        enable=0
        active=0
        self_refresh_active=0
        planes_changed=0
        mode_changed=0
        active_changed=0
        connectors_changed=0
        color_mgmt_changed=0
        plane_mask=0
        connector_mask=0
        encoder_mask=0
        mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
connector[34]: DSI-1
        crtc=crtc-0
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=0
        max_requested_bpc=0
        colorspace=Default
connector[36]: DP-1
        crtc=(null)
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=1
        max_requested_bpc=0
        colorspace=Default
connector[39]: Writeback-1
        crtc=(null)
        self_refresh_aware=0
        interlace_allowed=0
        ycbcr_420_allowed=0
        max_requested_bpc=0
        colorspace=Default
resource mapping:
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 
#6 lore raw
Quoted 38 lines · Luca Weiss

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Broken (with the patch)

resource mapping:

Quoted 8 lines
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

I see. It tries to use two mixers with a single DSC. What about someting as simple as:

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -1
index 0f4921b1a892..cbb7caa194c1 100644
@@ -1410,7 +1410,8 @@ static struct msm_display_topology dpu_crtc_get_topology(
 		topology.num_lm = 2;
 	else if (topology.num_dsc == 2)
 		topology.num_lm = 2;
-	else if (dpu_kms->catalog->caps->has_3d_merge)
+	else if (dpu_kms->catalog->caps->has_3d_merge &&
+		 topology.num_dsc == 0)
 		topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
 	else
 		topology.num_lm = 1;
Signature · 2 lines
With best wishes
Dmitry
Tested-by
#7 lore raw
Quoted 56 lines · Dmitry Baryshkov
Quoted 38 lines · Luca Weiss

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Broken (with the patch)

resource mapping:

Quoted 8 lines
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

I see. It tries to use two mixers with a single DSC. What about someting as simple as:

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +0 -0
index 0f4921b1a892..cbb7caa194c1 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c static struct msm_display_topology dpu_crtc_get_topology( · line 1417

Quoted 9 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +2 -1
@@ -1410,7 +1410,8 @@ static struct msm_display_topology dpu_crtc_get_topology(
 		topology.num_lm = 2;
 	else if (topology.num_dsc == 2)
 		topology.num_lm = 2;
-	else if (dpu_kms->catalog->caps->has_3d_merge)
+	else if (dpu_kms->catalog->caps->has_3d_merge &&
+		 topology.num_dsc == 0)
 		topology.num_lm = (mode->hdisplay > MAX_HDISPLAY_SPLIT) ? 2 : 1;
 	else
 		topology.num_lm = 1;

Thanks Dmitry, this also resolves the issue!

Regards
Luca

#8 lore raw
In reply to Luca Weiss
Quoted 51 lines · Luca Weiss

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Working (patch reverted)

resource mapping:

        pingpong=# # 68 # - - - - - - - - - 
        mixer=# - 68 # - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

Broken (with the patch)

resource mapping:

Quoted 8 lines
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

As we have identified that the issue is what downstream calls DUALPIPE_3DMERGE_DSC topology, could you please also check several things (with the broken kernel):

- What is being returned by dpu_encoder_helper_get_3d_blend_mode() (in the broken config)?

- If there is any difference in working and broken configs between values being passed to (and programmed to the DSC) in dpu_encoder_prep_dsc() ?

- The same question for pclk calculation in dsi_host.c

Signature · 2 lines
With best wishes
Dmitry
#9 lore raw
Quoted 65 lines · Dmitry Baryshkov
Quoted 51 lines · Luca Weiss

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Working (patch reverted)

resource mapping:

        pingpong=# # 68 # - - - - - - - - - 
        mixer=# - 68 # - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

Broken (with the patch)

resource mapping:

Quoted 8 lines
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

As we have identified that the issue is what downstream calls DUALPIPE_3DMERGE_DSC topology, could you please also check several things (with the broken kernel):

Quoted 8 lines

- What is being returned by dpu_encoder_helper_get_3d_blend_mode() (in the broken config)?

- If there is any difference in working and broken configs between values being passed to (and programmed to the DSC) in dpu_encoder_prep_dsc() ?

- The same question for pclk calculation in dsi_host.c

Is this helpful?

Broken:

[    1.247165] dsi_calc_pclk:649 DBG pclk=111546490, bclk=83659867
[    1.490559] dpu_encoder_helper_get_3d_blend_mode:309 DBG BLEND_3D_H_ROW_INT
[    1.491008] dpu_encoder_prep_dsc:2061 DBG dsc_common_mode=0 initial_lines=1

Working:

[    0.998043] dsi_calc_pclk:649 DBG pclk=111546490, bclk=83659867
[    1.233836] dpu_encoder_helper_get_3d_blend_mode:313 DBG BLEND_3D_NONE
[    1.234277] dpu_encoder_prep_dsc:2061 DBG dsc_common_mode=0 initial_lines=1

Or do you need some more things? There's a lot of data being passed into dpu_encoder_dsc_pipe_cfg() for example so I'm not sure which values are relevant for this.

Regards
Luca

#10 lore raw
Quoted 82 lines · Luca Weiss
Quoted 65 lines · Dmitry Baryshkov
Quoted 51 lines · Luca Weiss

Hi Dmitry,

Quoted 24 lines · Dmitry Baryshkov
Quoted 23 lines · Luca Weiss

Hi Mahadevan,

Quoted 7 lines · Mahadevan P

On SC7280 targets, display modes with a width greater than the max_mixer_width (2400) are rejected during mode validation when merge3d is disabled. This limitation exists because, without a 3D merge block, two layer mixers cannot be combined(non-DSC interface), preventing large layers from being split across mixers. As a result, higher resolution modes cannot be supported.

Quoted 7 lines

Enable merge3d support on SC7280 to allow combining streams from two layer mixers into a single non-DSC interface. This capability removes the width restriction and enables buffer sizes beyond the 2400-pixel limit.

Fixes 591e34a091d1 ("drm/msm/disp/dpu1: add support for display for SC7280 target")

This patch is causing display regression on QCM6490 fairphone-fp5.

With this patch in 7.0-rc3 (or 6.18.16) there's just pink noise on the screen. When reverting this patch everything becomes working again.

Quoted 7 lines
Quoted 4 lines

See also https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41

@Dmitry: Can we revert this for later 7.0-rc, in case it's not fixed quickly?

Could you please provide the resource allocation parts of debugfs/dri/0/state for both working and non-working cases?

Working (patch reverted)

resource mapping:

        pingpong=# # 68 # - - - - - - - - - 
        mixer=# - 68 # - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

Broken (with the patch)

resource mapping:

Quoted 8 lines
        pingpong=# # 68 68 - - - - - - - - - 
        mixer=# - 68 68 - - - - 
        ctl=68 # # # - - - - 
        dspp=# - - - - - - - 
        dsc=68 - - - - - - - 
        cdm=# 
        sspp=# - - - - - - - # # # - - - - - 
        cwb=- - - - 

As we have identified that the issue is what downstream calls DUALPIPE_3DMERGE_DSC topology, could you please also check several things (with the broken kernel):

Quoted 8 lines

- What is being returned by dpu_encoder_helper_get_3d_blend_mode() (in the broken config)?

- If there is any difference in working and broken configs between values being passed to (and programmed to the DSC) in dpu_encoder_prep_dsc() ?

- The same question for pclk calculation in dsi_host.c

Is this helpful?

Broken:

[    1.247165] dsi_calc_pclk:649 DBG pclk=111546490, bclk=83659867
[    1.490559] dpu_encoder_helper_get_3d_blend_mode:309 DBG BLEND_3D_H_ROW_INT
[    1.491008] dpu_encoder_prep_dsc:2061 DBG dsc_common_mode=0 initial_lines=1
Quoted 8 lines

Working:

[    0.998043] dsi_calc_pclk:649 DBG pclk=111546490, bclk=83659867
[    1.233836] dpu_encoder_helper_get_3d_blend_mode:313 DBG BLEND_3D_NONE
[    1.234277] dpu_encoder_prep_dsc:2061 DBG dsc_common_mode=0 initial_lines=1

Or do you need some more things? There's a lot of data being passed into dpu_encoder_dsc_pipe_cfg() for example so I'm not sure which values are relevant for this.

It looks sane up. I will try asking internally. But for now the posted patch should be good to go.

Signature · 2 lines
With best wishes
Dmitry