Commit 5f6a92e4 authored by Yuxian Dai's avatar Yuxian Dai Committed by Alex Deucher

drm/amdgpu/powerplay:avoid to show invalid DPM table info

for different ASIC support different the number of DPM levels,
we should avoid to show the invalid level value.
v1 -> v2:
	follow the suggestion,clarifiy the description for this
change
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarYuxian Dai <Yuxian.Dai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e1046a1f
...@@ -296,6 +296,8 @@ static int renoir_print_clk_levels(struct smu_context *smu, ...@@ -296,6 +296,8 @@ static int renoir_print_clk_levels(struct smu_context *smu,
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
GET_DPM_CUR_FREQ(clk_table, clk_type, i, value); GET_DPM_CUR_FREQ(clk_table, clk_type, i, value);
if (!value)
continue;
size += sprintf(buf + size, "%d: %uMhz %s\n", i, value, size += sprintf(buf + size, "%d: %uMhz %s\n", i, value,
cur_value == value ? "*" : ""); cur_value == value ? "*" : "");
if (cur_value == value) if (cur_value == value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment