]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Fix DC warning at driver load
authorQingqing Zhuo <qingqing.zhuo@amd.com>
Fri, 10 Jun 2022 14:43:53 +0000 (10:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Jun 2022 21:15:41 +0000 (17:15 -0400)
[Why]
Wrong index was checked for dcfclk_mhz, causing false warning.

[How]
Fix the assertion index.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.18.x
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c

index fb4ae800e91935fc8a22b8901ab13e91eccd7721..f4381725b21072f0a018757f4511b80318e7b2f1 100644 (file)
@@ -550,7 +550,7 @@ static void dcn315_clk_mgr_helper_populate_bw_params(
                if (!bw_params->clk_table.entries[i].dtbclk_mhz)
                        bw_params->clk_table.entries[i].dtbclk_mhz = def_max.dtbclk_mhz;
        }
-       ASSERT(bw_params->clk_table.entries[i].dcfclk_mhz);
+       ASSERT(bw_params->clk_table.entries[i-1].dcfclk_mhz);
        bw_params->vram_type = bios_info->memory_type;
        bw_params->num_channels = bios_info->ma_channel_number;
        if (!bw_params->num_channels)