提交 b7e2439c 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/display: mclk level can't be 0.

Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 ca709397
...@@ -357,8 +357,8 @@ bool dm_pp_get_clock_levels_by_type( ...@@ -357,8 +357,8 @@ bool dm_pp_get_clock_levels_by_type(
* Than means the previous one is the highest * Than means the previous one is the highest
* non-boosted one. */ * non-boosted one. */
DRM_INFO("DM_PPLIB: reducing engine clock level from %d to %d\n", DRM_INFO("DM_PPLIB: reducing engine clock level from %d to %d\n",
dc_clks->num_levels, i + 1); dc_clks->num_levels, i);
dc_clks->num_levels = i; dc_clks->num_levels = i > 0 ? i : 1;
break; break;
} }
} }
...@@ -366,8 +366,8 @@ bool dm_pp_get_clock_levels_by_type( ...@@ -366,8 +366,8 @@ bool dm_pp_get_clock_levels_by_type(
for (i = 0; i < dc_clks->num_levels; i++) { for (i = 0; i < dc_clks->num_levels; i++) {
if (dc_clks->clocks_in_khz[i] > validation_clks.memory_max_clock) { if (dc_clks->clocks_in_khz[i] > validation_clks.memory_max_clock) {
DRM_INFO("DM_PPLIB: reducing memory clock level from %d to %d\n", DRM_INFO("DM_PPLIB: reducing memory clock level from %d to %d\n",
dc_clks->num_levels, i + 1); dc_clks->num_levels, i);
dc_clks->num_levels = i; dc_clks->num_levels = i > 0 ? i : 1;
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册