]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: Consolidate HPO enable/disable and restrict only to state transitions.
authorNatanel Roizenman <natanel.roizenman@amd.com>
Fri, 8 Mar 2024 17:41:04 +0000 (12:41 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Mar 2024 05:35:29 +0000 (01:35 -0400)
commit865d38e690c664f08b26f75731223cc80ec589e8
tree919dfacfa30f7da97723512d1f39e548d024dc75
parentbe524af47a82f48022c093ad7992b5eb501877b9
drm/amd/display: Consolidate HPO enable/disable and restrict only to state transitions.

[WHY]
Previously, we'd disabled HPO whenever an HPO display was disconnected. This
caused other HPO displays to blank whenever one was unplugged.

[HOW]
This change restricts HPO enable/disable to dce110_apply_ctx_to_hw and adds a
helper function (dce110_is_hpo_enabled) that returns true if any HPO displays
are present in a context. We compare the current and previous dc ctx to check
whether HPO is transitioning from on to off or vice versa, and adjust the HPO
state accordingly.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Reviewed-by: Chris Park <chris.park@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Natanel Roizenman <natanel.roizenman@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c