Commit 1b5c30bf authored by Max Erenberg's avatar Max Erenberg Committed by Alex Deucher

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: default avatarHarry Vanzylldejong <harry.vanzylldejong@amd.com>
Reviewed-by: default avatarEvgenii Krasnikov <Evgenii.Krasnikov@amd.com>
Reviewed-by: default avatarNicholas Choi <Nicholas.Choi@amd.com>
Acked-by: default avatarPavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: default avatarMax Erenberg <merenber@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5d5af340
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment