OSDN Git Service

drm/amd/display: Fix DCFCLK and SOCCLK not set
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Thu, 28 Mar 2019 18:43:29 +0000 (14:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:09 +0000 (09:34 -0500)
[Why]
If voltage level > 0, DCFCLK and SOCCLK could be 0 during DML
calculations, which ended up causing an assert.

[How]
Initialize dcfclk_mhz and socclk_mhz values according to the
voltage level.

Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c

index aa04df6..dc3aa7d 100644 (file)
@@ -2136,6 +2136,10 @@ bool dcn20_validate_bandwidth(struct dc *dc,
        if (pipe_cnt != pipe_idx)
                pipe_cnt = dcn20_populate_dml_pipes_from_context(dc, &context->res_ctx, pipes);
 
+       pipes[0].clks_cfg.voltage = vlevel;
+       pipes[0].clks_cfg.dcfclk_mhz = context->bw_ctx.dml.soc.clock_limits[vlevel].dcfclk_mhz;
+       pipes[0].clks_cfg.socclk_mhz = context->bw_ctx.dml.soc.clock_limits[vlevel].socclk_mhz;
+
        /* only pipe 0 is read for voltage and dcf/soc clocks */
        if (vlevel < 1) {
                pipes[0].clks_cfg.voltage = 1;