Skip to contentSkip to conversation

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

PATCH New Yuxian Dai 1 participant 1 message Apr 17, 2020

Subsystems (2)
lore
Share & tools
lore

Yuxian Dai

author
#0 lore raw

PATCH 1/1 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

Change-Id I579ef417ddc8acb4a6cf15c60094743a72d9b050
---
 drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/powerplay/renoir_ppt.c +2 -0
index 281b7b6cf1a4..e4e7a352d032 100644
@@ -296,6 +296,8 @@ static int renoir_print_clk_levels(struct smu_context *smu,
 
 	for (i = 0; i < count; i++) {
 		GET_DPM_CUR_FREQ(clk_table, clk_type, i, value);
+		if (!value)
+			continue;
 		size += sprintf(buf + size, "%d: %uMhz %s\n", i, value,
 				cur_value == value ? "*" : "");
 		if (cur_value == value)
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx