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 21:49:23 +0000 (16:49 -0500)
commit061a5bf210cd7b941627092309ff6035a017cda3
tree18aa0d27bf98595bdd4147ed6bd63900c6542567
parent1919fd6bb09f61015549b9e5a5af1541b41f45d9
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