summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-06-16 00:51:03 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-06-16 00:51:03 +0000
commit58527b955e2d140927d6a7b336d476c36fd60b24 (patch)
tree129c370e70a359adeec2b96e2f3b27b8264146b9 /sys
parentfd25edc3c7f63e03a6ce67b20cb07f3245656621 (diff)
drm/amd/pm: Fix output of pp_od_clk_voltage
From Jonatas Esteves 8069bcaa5b392ce3972dd72f184b2cc4b1b8262b in linux-6.1.y/6.1.31 40baba5693b9af586dc1063af603d05a79e57a6b in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/pm/amdgpu_pm.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/amd/pm/amdgpu_pm.c b/sys/dev/pci/drm/amd/pm/amdgpu_pm.c
index 393d79acfcd..ef5f21e3ffa 100644
--- a/sys/dev/pci/drm/amd/pm/amdgpu_pm.c
+++ b/sys/dev/pci/drm/amd/pm/amdgpu_pm.c
@@ -871,13 +871,11 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
}
if (ret == -ENOENT) {
size = amdgpu_dpm_print_clock_levels(adev, OD_SCLK, buf);
- if (size > 0) {
- size += amdgpu_dpm_print_clock_levels(adev, OD_MCLK, buf + size);
- size += amdgpu_dpm_print_clock_levels(adev, OD_VDDC_CURVE, buf + size);
- size += amdgpu_dpm_print_clock_levels(adev, OD_VDDGFX_OFFSET, buf + size);
- size += amdgpu_dpm_print_clock_levels(adev, OD_RANGE, buf + size);
- size += amdgpu_dpm_print_clock_levels(adev, OD_CCLK, buf + size);
- }
+ size += amdgpu_dpm_print_clock_levels(adev, OD_MCLK, buf + size);
+ size += amdgpu_dpm_print_clock_levels(adev, OD_VDDC_CURVE, buf + size);
+ size += amdgpu_dpm_print_clock_levels(adev, OD_VDDGFX_OFFSET, buf + size);
+ size += amdgpu_dpm_print_clock_levels(adev, OD_RANGE, buf + size);
+ size += amdgpu_dpm_print_clock_levels(adev, OD_CCLK, buf + size);
}
if (size == 0)