drm/amd/display: Force p-state disallow if leaving no plane config
authorAlvin Lee <alvin.lee2@amd.com>
Wed, 6 Dec 2023 19:52:32 +0000 (14:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:28 +0000 (20:14 +0000)
commite9ca61a7e6b0d323547067e1dde64a97476e1696
treee2d7efc5badc6a631654cbbd8bbab1437a678a21
parent6750d1de747f4d2db0046a25b069e15341f6a9ba
drm/amd/display: Force p-state disallow if leaving no plane config

[ Upstream commit 9a902a9073c287353e25913c0761bfed49d75a88 ]

[Description]
- When we're in a no plane config, DCN is always asserting
  P-State allow
- This creates a scenario where the P-State blackout can start
  just as VUPDATE takes place and transitions the DCN config to
  a one where one or more HUBP's are active which can result in
  underflow
- To fix this issue, force p-state disallow and unforce after
  the transition from no planes case -> one or more planes active

Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c