drm/amd/display: Map DSC resources 1-to-1 if numbers of OPPs and DSCs are equal
authorNikola Cornij <nikola.cornij@amd.com>
Thu, 7 Nov 2019 18:06:48 +0000 (13:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:19:42 +0000 (10:19 +0100)
commit225a3070cf4dfd16686dd2f2eca7512c4e758ca2
treea578284ca8130d899093a97b4ade1527e09afce7
parent361d1d13fd2b41a785ba7c688f85778d62a8b115
drm/amd/display: Map DSC resources 1-to-1 if numbers of OPPs and DSCs are equal

[ Upstream commit a1fc44b609b4e9c0941f0e4a1fc69d367af5ab69 ]

[why]
On ASICs where number of DSCs is the same as OPPs there's no need
for DSC resource management. Mappping 1-to-1 fixes mode-set- or S3-
-related issues for such platforms.

[how]
Map DSC resources 1-to-1 to pipes only if number of OPPs is the same
as number of DSCs. This will still keep other ASICs working.
A follow-up patch to fix mode-set issues on those ASICs will be
required if testing shows issues with mode set.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Leo Li <sunpeng.li@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_resource.c