drm/amd/display: On clock init, maintain DISPCLK freq
authorAlvin Lee <Alvin.Lee2@amd.com>
Fri, 24 Mar 2023 16:01:09 +0000 (12:01 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Apr 2023 22:03:35 +0000 (18:03 -0400)
commitd170e938f01fc8c5c41f8a12f0c12491580829ef
tree95e972bef03a11a10d052a8b3e80f4f97cde3041
parent0289e0ed1b9ae20e7b682fc7ca30d2d324a47618
drm/amd/display: On clock init, maintain DISPCLK freq

[Description]
- On init if a display is connected, we need to maintain the DISPCLK
  frequency
- Even though DPG_EN=1, the display still requires the correct
  timing or it could cause audio corruption (if DISPCLK freq
  is reduced)
- Read the current DISPCLK freq and request the same value to ensure
  the timing is valid and unchanged
- However, add option to do a full pipe power down (including link)
  which will also avoid audio related issues
- Disabled for the time being on dcn32

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@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/clk_mgr/dcn32/dcn32_clk_mgr.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h