[PATCH 04/20] drm/amd/display: Disallow entering PSR when panel is disconnected
Paul Menzel
pmenzel at molgen.mpg.de
Sat Apr 9 20:19:23 UTC 2022
Dear Pavle, dear Max,
Am 08.04.22 um 19:18 schrieb Pavle Kotarac:
> From: Max Erenberg <merenber at amd.com>
>
> [WHY]
> The dGPU cannot enter PSR when it is not connected to a panel.
Maybe spell out Panel Self Refresh once.
> [HOW]
> Added a check to dc_link_set_psr_allow_active
s/Added/Add/
> which returns early if panel is disconnected.
Please reflow for 57 characters per line.
>
> Reviewed-by: Harry Vanzylldejong <harry.vanzylldejong at amd.com>
> Reviewed-by: Evgenii Krasnikov <Evgenii.Krasnikov at amd.com>
> Reviewed-by: Nicholas Choi <Nicholas.Choi at amd.com>
> Acked-by: Pavle Kotarac <Pavle.Kotarac at amd.com>
> Signed-off-by: Max Erenberg <merenber at amd.com>
> ---
> drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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) {
Why does `allow_active` need to be checked?
> + // 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;
Kind regards,
Paul
More information about the amd-gfx
mailing list