[PATCH 0/8] drm/msm/dpu: various dpu resource allocation/release mismatch fix

From: Xi Zhang via B4 Relay

Date: Mon Oct 26 2026 - 15:20:44 EST


This series fixes various resource de-allocation issues in DPU
resource cleanup code. Aim is more reliable mode set, in particular
when multiple displays/encoders are connected, to avoid blue screen
or snowy dsc displays.

Tested with v7.3 + msm-next, on Ayaneo Pocket DS (SM8550 Kalama).
Changes are not device/chip specific.

Some of the changes has lived in ROCKNIX distro for a few months.
https://github.com/ROCKNIX/distribution/pull/2716

Note: The first patch in that PR was problematic: uninitialized pointer
variable field access (since fixed), and I did not understand drm
atomic state tracking, so it wasn't doing anything at all and
is not included in this series.

The third patch linked above has more changes than what's included in
this series. The extra change did not do anything that's needed.

The following 2 commits are new and are not in ROCKNIX:

[Patch 6/8] ("drm/msm/dpu: workaround res re-assignment issues by pairing enc/crtc")
[Patch 7/8] ("drm/msm: force mode_changed on color_mgmt_changed, not just ctm")

[Patch 7/8] would fix, from my testing:
https://lore.kernel.org/all/33424a9d-10a6-4479-bba6-12f8ce60da1a@xxxxxxxxxxxx/
See original report by Stephan Gerhold:
https://gitlab.freedesktop.org/drm/msm/-/work_items/102

Note: I'm not part of the ROCKNIX team, just contributed a few patches
there.

Signed-off-by: Xi Zhang <xz.ca.cn@xxxxxxxxx>
---
Xi Zhang (8):
drm/msm/dpu: reset unassigned resource slots to NULL on topology update
drm/msm/dpu: save LMs in encoder mode_set for cleanup use later
drm/msm/dpu: use common helper cleanup function in cmd mode disable
drm/msm/dpu: Match setup_dither cleanup to the way it was set up
drm/msm/dpu: use cached PINGPONGs from mode set in cwb setup
drm/msm/dpu: workaround res re-assignment issues by pairing enc/crtc
drm/msm: force mode_changed on color_mgmt_changed, not just ctm
drm/msm/dpu: reset DSC_CMN_MAIN_CNF in dsc disable

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 115 ++++++++++-----------
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 10 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc_1_2.c | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 ++-
drivers/gpu/drm/msm/msm_atomic.c | 3 +-
5 files changed, 70 insertions(+), 74 deletions(-)
---
base-commit: d024361c631b3f020a26c07d683e5103404b0fbf
change-id: 20261026-msm-dpu-res-clean-f1704106453f

Best regards,
--
Xi Zhang <xz.ca.cn@xxxxxxxxx>