drm/amd/display: Use adjusted DCN301 watermarks
authorNikola Cornij <nikola.cornij@amd.com>
Wed, 8 Sep 2021 02:09:01 +0000 (22:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:38 +0000 (19:12 +0100)
commit691c0030be65dffc5005bbcdece29f6d65e1eb75
tree00b91470ed6c6ef6acae90177f4b639de3bc623e
parent2157e509e5b2b21176a9fd33b6035996ef1a2895
drm/amd/display: Use adjusted DCN301 watermarks

[ Upstream commit 808643ea56a2f96a42873d5e11c399957d6493aa ]

[why]
If DCN30 watermark calc is used for DCN301, the calculated values are
wrong due to the data structure mismatch between DCN30 and DCN301.
However, using the original DCN301 watermark values causes underflow.

[how]
- Add DCN21-style watermark calculations
- Adjust DCN301 watermark values to remove the underflow

Reviewed-by: Zhan Liu <zhan.liu@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nikola Cornij <nikola.cornij@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/clk_mgr/dcn301/vg_clk_mgr.c
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c