drm/amd/display: Allow DTBCLK disable for DCN35
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 14 Nov 2023 16:22:09 +0000 (11:22 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 23:11:03 +0000 (18:11 -0500)
commit27750e176a4f8549e13fa91f311b29a2e40d47be
treed0871f219159d28db3ebec4d243e4a015420277c
parent2161e09cd05a50d80736fe397145340d2e8f6c05
drm/amd/display: Allow DTBCLK disable for DCN35

[Why]
DTBCLK is enabled on idle and it will burn power.

[How]
There's a few issues here:
- Always enabling DTBCLK on clock manager init
- Setting refclk when DTBCLK is supposed to be disabled
- Not applying the correct calculated version refclk, but instead the
  base value which might be zero

On dtbclk_en change we'll message PMFW to enable or disable the clock
accordingly.

The DTBDTO will be then based on refclk, but it will be set to the
default fixed value if there was nothing calculated in DML despite the
clock being considered enabled.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@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/dcn35/dcn35_clk_mgr.c