drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Current topology code will try using 2 LMs with just one DSC, which
breaks cases like SC7280 / Fairphone5. Forbid using 2 LMs split in such
a case.
Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC")
Reported-by: Luca Weiss <luca.weiss@fairphone.com>
Closes: https://lore.kernel.org/r/DH1IKLU0YZYU.2SW4WYO7H3H4R@fairphone.com/
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 6bf7c46379ae..96b67ea3fb4c 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -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;
---
base-commit: 50c4a49f7292b33b454ea1a16c4f77d6965405dc
change-id: 20260317-fix-3d-dsc-4b073977ea19
Best regards,
--
With best wishes
Dmitry
On Tue, 17 Mar 2026 17:30:05 +0200, Dmitry Baryshkov wrote:
> Current topology code will try using 2 LMs with just one DSC, which
> breaks cases like SC7280 / Fairphone5. Forbid using 2 LMs split in such
> a case.
Applied to msm-next, thanks!
[1/1] drm/msm/dpu: don't try using 2 LMs if only one DSC is available
https://gitlab.freedesktop.org/lumag/msm/-/commit/b9699dd86276
Best regards,
--
With best wishes
Dmitry
On Fri Mar 27, 2026 at 8:47 PM CET, Dmitry Baryshkov wrote: > On Tue, 17 Mar 2026 17:30:05 +0200, Dmitry Baryshkov wrote: >> Current topology code will try using 2 LMs with just one DSC, which >> breaks cases like SC7280 / Fairphone5. Forbid using 2 LMs split in such >> a case. > > Applied to msm-next, thanks! > > [1/1] drm/msm/dpu: don't try using 2 LMs if only one DSC is available > https://gitlab.freedesktop.org/lumag/msm/-/commit/b9699dd86276 Hi Dmitry, I don't see this in -rc6 unfortunately. Will this still be sent for inclusion in v7.0? Regards Luca
On 3/17/26 4:30 PM, Dmitry Baryshkov wrote:
> Current topology code will try using 2 LMs with just one DSC, which
> breaks cases like SC7280 / Fairphone5.
(why/how?)
Konrad
> Forbid using 2 LMs split in such
> a case.
>
> Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC")
> Reported-by: Luca Weiss <luca.weiss@fairphone.com>
> Closes: https://lore.kernel.org/r/DH1IKLU0YZYU.2SW4WYO7H3H4R@fairphone.com/
> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 6bf7c46379ae..96b67ea3fb4c 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -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;
>
> ---
> base-commit: 50c4a49f7292b33b454ea1a16c4f77d6965405dc
> change-id: 20260317-fix-3d-dsc-4b073977ea19
>
> Best regards,
On Tue, Mar 17, 2026 at 05:48:59PM +0100, Konrad Dybcio wrote:
> On 3/17/26 4:30 PM, Dmitry Baryshkov wrote:
> > Current topology code will try using 2 LMs with just one DSC, which
> > breaks cases like SC7280 / Fairphone5.
>
> (why/how?)
See https://salsa.debian.org/Mobian-team/devices/kernels/qcom-linux/-/issues/41
Using 2 LM/2PP + 3D + 1DSC is a separate topology. I'm checking what
would be required to fix it. For now this is the easiest fix to forbid
using it (it wasn't supported beforehand anyway and got enabled by the
encoder / CRTC refactoring).
>
> Konrad
>
> > Forbid using 2 LMs split in such
> > a case.
> >
> > Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC")
> > Reported-by: Luca Weiss <luca.weiss@fairphone.com>
> > Closes: https://lore.kernel.org/r/DH1IKLU0YZYU.2SW4WYO7H3H4R@fairphone.com/
> > Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> > index 6bf7c46379ae..96b67ea3fb4c 100644
> > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> > @@ -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;
> >
> > ---
> > base-commit: 50c4a49f7292b33b454ea1a16c4f77d6965405dc
> > change-id: 20260317-fix-3d-dsc-4b073977ea19
> >
> > Best regards,
--
With best wishes
Dmitry
On Tue Mar 17, 2026 at 4:30 PM CET, Dmitry Baryshkov wrote:
> Current topology code will try using 2 LMs with just one DSC, which
> breaks cases like SC7280 / Fairphone5. Forbid using 2 LMs split in such
> a case.
>
> Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC")
> Reported-by: Luca Weiss <luca.weiss@fairphone.com>
> Closes: https://lore.kernel.org/r/DH1IKLU0YZYU.2SW4WYO7H3H4R@fairphone.com/
> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
Thanks for fixing, Dmitry!
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 6bf7c46379ae..96b67ea3fb4c 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -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;
>
> ---
> base-commit: 50c4a49f7292b33b454ea1a16c4f77d6965405dc
> change-id: 20260317-fix-3d-dsc-4b073977ea19
>
> Best regards,
© 2016 - 2026 Red Hat, Inc.