aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Erenberg <[email protected]>2021-11-23 15:10:16 -0500
committerAlex Deucher <[email protected]>2022-04-11 13:51:32 -0400
commit1b5c30bf41586fdf4f2313d0b37545975568e29f (patch)
treeb2c2e23cc7ba289afe5951f87c949dba2e91a6b7
parent5d5af34072c8b11f60960c3bea57ff9de5877791 (diff)
drm/amd/display: Disallow entering PSR when panel is disconnected
[WHY] The dGPU cannot enter PSR when it is not connected to a panel. [HOW] Added a check to dc_link_set_psr_allow_active which returns early if panel is disconnected. Reviewed-by: Harry Vanzylldejong <[email protected]> Reviewed-by: Evgenii Krasnikov <[email protected]> Reviewed-by: Nicholas Choi <[email protected]> Acked-by: Pavle Kotarac <[email protected]> Signed-off-by: Max Erenberg <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 47b67fd1e84c..22f2d88fab99 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -3079,6 +3079,11 @@ bool dc_link_set_psr_allow_active(struct dc_link *link, const bool *allow_active
if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
return false;
+ if (allow_active && link->type == dc_connection_none) {
+ // Don't enter PSR if panel is not connected
+ return false;
+ }
+
/* Set power optimization flag */
if (power_opts && link->psr_settings.psr_power_opt != *power_opts) {
link->psr_settings.psr_power_opt = *power_opts;