mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm/amd/display: Leave self-refresh before an ABM level update
@ 2026-11-13 19:40 Hugo Sales via B4 Relay
  2026-11-13 19:40 ` [PATCH v2 1/3] drm/amd/display: Add helpers to check PSR and Replay events Hugo Sales via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hugo Sales via B4 Relay @ 2026-11-13 19:40 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, David Airlie, Simona Vetter
  Cc: Roman Li, Nicholas Kazlauskas, Chenyu Chen, amd-gfx, dri-devel,
	linux-kernel, Hugo Sales

Writing panel_power_savings while the eDP is in PSR hangs DMUB on a
Cezanne laptop (DCN 2.1). An ABM level change on its own is a fast
update, so the new level reaches DMUB with the panel still in
self-refresh. Chenyu Chen confirmed the same on Renoir

Patch 1 adds helpers that tell whether a PSR or Replay event is already
set on a stream. Patch 2 is the fix. It sets the PSR and Replay
hw_programming events around the DC update that carries the new level,
and clears only the events it set. An event that a full update, a
modeset or a PSR SU dirty rect change set stays set, for that code to
clear. Patch 3 stops amdgpu_dm_commit_planes() from sending the same
level again after the connector update loop sent it, so one level change
leaves self-refresh once

"drm/amd/display: Don't force a modeset when the ABM level changes" [1]
sends property changes down this fast path, so it needs this series first

HDR metadata may have the same problem. When the HDR static metadata
changes while HDR stays on, the commit is a fast update too, and the
connector loop in amdgpu_dm_atomic_commit_tail() sends the new HDR
infopacket to DC with the panel still in self-refresh. I have no panel
with HDR and PSR or Replay to try it on, and the VRR and AVI infopackets
already reach DC the same way. Does an infopacket update in self-refresh
need the same pause?

v2:
- Clear the events right after the DC update, under dc_lock, instead of
  on the next fast commit (Chenyu)
- Only clear the events this update set, so an event that a full
  update, a modeset or a dirty rect change set in the same commit stays
  set
- Add amdgpu_dm_psr_event_is_set() and amdgpu_dm_replay_event_is_set(),
  with KUnit tests
- Send a changed level once per commit, so it leaves self-refresh once

v1: https://lore.kernel.org/r/20261031130002.2335615-1-hugo@hsal.es

[1] https://lore.kernel.org/r/20261102-abm-sysfs-commit-v1-2-e5addfd9539a@hsal.es

---
Hugo Sales (3):
      drm/amd/display: Add helpers to check PSR and Replay events
      drm/amd/display: Leave self-refresh before an ABM level update
      drm/amd/display: Send a changed ABM level once per commit

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  83 +++++++++++++++--
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c  |  24 +++++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.h  |   2 +
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c   |  25 +++++
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_replay.h   |   3 +
 .../display/amdgpu_dm/tests/amdgpu_dm_psr_test.c   |  60 ++++++++++++
 .../amdgpu_dm/tests/amdgpu_dm_replay_test.c        | 102 +++++++++++++++------
 7 files changed, 263 insertions(+), 36 deletions(-)
---
base-commit: ba496bb837882eb1af58f41572fc289e46c77b8c
change-id: 20261113-amdgpu-psr-abm-update-next-de20bc23b12c

Best regards,
--  
Hugo Sales <hugo@hsal.es>



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

end of thread, other threads:[~2026-11-16  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 19:40 [PATCH v2 0/3] drm/amd/display: Leave self-refresh before an ABM level update Hugo Sales via B4 Relay
2026-11-13 19:40 ` [PATCH v2 1/3] drm/amd/display: Add helpers to check PSR and Replay events Hugo Sales via B4 Relay
2026-11-13 19:40 ` [PATCH v2 2/3] drm/amd/display: Leave self-refresh before an ABM level update Hugo Sales via B4 Relay
2026-11-13 19:40 ` [PATCH v2 3/3] drm/amd/display: Send a changed ABM level once per commit Hugo Sales via B4 Relay
2026-11-16  8:58 ` [PATCH v2 0/3] drm/amd/display: Leave self-refresh before an ABM level update Chen, Chen-Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®