From: Nicholas Kazlauskas <[email protected]>

[Why]
These are important for getting correct DP and audio output.
The wrong pixel clock will be used otherwise.
[How]
Update the default clocks for the DCN60 lite3 variant.

Signed-off-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Fangzhi Zuo <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c 
b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
index 26972c220e34..9ce378b821dc 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
@@ -1804,6 +1804,7 @@ struct clk_mgr_internal *dcn60_clk_mgr_construct(
 {
        struct dcn60_clk_mgr *clk_mgr60 = kzalloc(sizeof(struct dcn60_clk_mgr), 
GFP_KERNEL);
        struct clk_mgr_internal *clk_mgr;
+       bool variant_clocks = 
ASICREV_IS_DCN6_VARIANT_LITE3(ctx->asic_id.hw_internal_rev);
 
        if (!clk_mgr60)
                return NULL;
@@ -1828,14 +1829,14 @@ struct clk_mgr_internal *dcn60_clk_mgr_construct(
         * dcn60_dump_clk_registers from 4 * dentist_vco_freq_khz /
         * dprefclk DID divider
         */
-       clk_mgr->base.dprefclk_khz = 720000;
+       clk_mgr->base.dprefclk_khz = variant_clocks ? 607407 : 720000;
 
                /* integer part is now VCO frequency in kHz */
                clk_mgr->base.dentist_vco_freq_khz = 
dcn60_get_vco_frequency_from_reg(clk_mgr);
 
                /* in case we don't get a value from the register, use default 
*/
                if (clk_mgr->base.dentist_vco_freq_khz == 0)
-                       clk_mgr->base.dentist_vco_freq_khz = 4500000;
+                       clk_mgr->base.dentist_vco_freq_khz = variant_clocks ? 
4100000 : 4500000;
 
        clk_mgr->dfs_bypass_enabled = false;
 
-- 
2.53.0

Reply via email to