All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] drm/msm: fix unbind/rebind of the msm_dpu
@ 2026-11-30  6:55 Yuanjie Yang
  2026-11-30  6:55 ` [PATCH 1/9] drm/msm/dpu: clean up the self-refresh helper on KMS teardown Yuanjie Yang
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Yuanjie Yang @ 2026-11-30  6:55 UTC (permalink / raw)
  To: robin.clark, lumag, abhinav.kumar, jesszhan0024, sean,
	marijn.suijten, airlied, simona, quic_kalyant, quic_vpolimer,
	quic_khsieh, jordan, konradybcio, akhilpo, antomani103, smasetty
  Cc: linux-arm-msm, dri-devel, freedreno, yuanjie.yang, tingwei.zhang

Unbinding the msm_dpu component master and binding it again fails in
several places on X1E80100. With the GPU firmware installed:

  echo ae01000.display-controller > /sys/bus/platform/drivers/msm_dpu/unbind
  echo ae01000.display-controller > /sys/bus/platform/drivers/msm_dpu/bind

By where the failure shows up:

 - unbind: the self-refresh entry work runs on the freed DRM device
   (patch 1), and buffers are freed while still pinned or vmapped: the
   fbdev buffer (patch 3), the SQE and shadow BOs (patches 4-5)
 - bind: the eDP panel was freed on unbind (patch 2), and the GPU fails
   to bind because leaked BOs keep its VM and SMMU context bank alive
   (patch 6) and the GMU rscc/PDC regions are never released (patch 7)
 - first GPU power-up after bind: the GMU is warm booted without its
   firmware (patch 8), and the PDC left asleep by the previous GPU
   instance is never woken up (patch 9)

Each patch can be applied on its own, except patch 9 which needs
patch 8.

Not covered here: removing the DP controller device (rmmod msm) still
crashes, as the devm AUX bus teardown from commit e2969ee30252 runs
after msm_dp_display_remove() has freed the AUX channel and cleared the
drvdata. With patch 2 this happens whenever an eDP panel is present.
This is independent of unbind/bind and will be fixed separately.

Tested on hamoa-iot-evk and hamoa-advantech-som-5830 (with [1])
[1] https://lore.kernel.org/r/20261112-hamoa_come_dp-v1-1-a77597e29e04@oss.qualcomm.com

Signed-off-by: Yuanjie Yang <yuanjie.yang@oss.qualcomm.com>
---
Yuanjie Yang (9):
      drm/msm/dpu: clean up the self-refresh helper on KMS teardown
      drm/msm/dp: don't depopulate the eDP AUX bus on component unbind
      drm/msm: unpin the fbdev buffer when the fbdev is destroyed
      drm/msm/a6xx: don't leak the SQE vmap in a6xx_ucode_check_version()
      drm/msm/a6xx: drop the shadow BO vmap on destroy
      drm/msm/a6xx: free the preemption and pwrup_reglist buffers on destroy
      drm/msm/a6xx: map the GMU rscc and PDC regions against the GPU device
      drm/msm/a6xx: cold boot the GMU on the first resume after bind
      drm/msm/a6xx: wake up a PDC left asleep by a previous GPU instance

 drivers/gpu/drm/msm/adreno/a6xx_gmu.c     | 41 +++++++++++++++++++++++++------
 drivers/gpu/drm/msm/adreno/a6xx_gmu.h     |  1 +
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c     | 16 +++++++-----
 drivers/gpu/drm/msm/adreno/a6xx_preempt.c |  9 ++++++-
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c   |  6 +++++
 drivers/gpu/drm/msm/dp/dp_display.c       |  2 --
 drivers/gpu/drm/msm/msm_fbdev.c           |  3 +++
 7 files changed, 61 insertions(+), 17 deletions(-)
---
base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7
change-id: 20261126-dpu_unbind_rebind_display-db9931c173dc

Best regards,
--  
Yuanjie Yang <yuanjie.yang@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-11-30  9:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30  6:55 [PATCH 0/9] drm/msm: fix unbind/rebind of the msm_dpu Yuanjie Yang
2026-11-30  6:55 ` [PATCH 1/9] drm/msm/dpu: clean up the self-refresh helper on KMS teardown Yuanjie Yang
2026-11-30  6:55 ` [PATCH 2/9] drm/msm/dp: don't depopulate the eDP AUX bus on component unbind Yuanjie Yang
2026-11-30  7:09   ` sashiko-bot
2026-11-30  9:54     ` yuanjiey
2026-11-30  6:55 ` [PATCH 3/9] drm/msm: unpin the fbdev buffer when the fbdev is destroyed Yuanjie Yang
2026-11-30  6:55 ` [PATCH 4/9] drm/msm/a6xx: don't leak the SQE vmap in a6xx_ucode_check_version() Yuanjie Yang
2026-11-30  8:00   ` Konrad Dybcio
2026-11-30  6:55 ` [PATCH 5/9] drm/msm/a6xx: drop the shadow BO vmap on destroy Yuanjie Yang
2026-11-30  8:04   ` Konrad Dybcio
2026-11-30  6:55 ` [PATCH 6/9] drm/msm/a6xx: free the preemption and pwrup_reglist buffers " Yuanjie Yang
2026-11-30  7:06   ` sashiko-bot
2026-11-30  6:55 ` [PATCH 7/9] drm/msm/a6xx: map the GMU rscc and PDC regions against the GPU device Yuanjie Yang
2026-11-30  7:07   ` sashiko-bot
2026-11-30  8:29   ` Konrad Dybcio
2026-11-30  9:56     ` yuanjiey
2026-11-30  6:55 ` [PATCH 8/9] drm/msm/a6xx: cold boot the GMU on the first resume after bind Yuanjie Yang
2026-11-30  6:55 ` [PATCH 9/9] drm/msm/a6xx: wake up a PDC left asleep by a previous GPU instance Yuanjie Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.