Skip to content

Commit ed569e1

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Use HW lock mgr for PSR1 when only one eDP
[WHY] DMUB locking is important to make sure that registers aren't accessed while in PSR. Previously it was enabled but caused a deadlock in situations with multiple eDP panels. [HOW] Detect if multiple eDP panels are in use to decide whether to use lock. Refactor the function so that the first check is for PSR-SU and then replay is in use to prevent having to look up number of eDP panels for those configurations. Fixes: f245b40 ("Revert "drm/amd/display: Use HW lock mgr for PSR1"") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3965 Reviewed-by: ChiaHsuan Chung <chiahsuan.chung@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent b3d5826 commit ed569e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,16 @@ bool should_use_dmub_lock(struct dc_link *link)
7373
if (link->replay_settings.replay_feature_enabled)
7474
return true;
7575

76+
/* only use HW lock for PSR1 on single eDP */
77+
if (link->psr_settings.psr_version == DC_PSR_VERSION_1) {
78+
struct dc_link *edp_links[MAX_NUM_EDP];
79+
int edp_num;
80+
81+
dc_get_edp_links(link->dc, edp_links, &edp_num);
82+
83+
if (edp_num == 1)
84+
return true;
85+
}
86+
7687
return false;
7788
}

0 commit comments

Comments
 (0)