amdgpu/pm: Enable sysfs nodes for vclk and dclk for NAVI12
authorMarko Zekovic <Marko.Zekovic@amd.com>
Mon, 28 Mar 2022 10:37:30 +0000 (12:37 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Apr 2022 14:26:28 +0000 (10:26 -0400)
SMI clock measure API is failing on NAVI12, because
sysfs node for pp_dpm_vclk is not existing. Enable
sysfs node for pp_dpm_vclk for NAVI12.

v2: Also enable sysfs node for pp_dpm_dclk.

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Marko Zekovic <Marko.Zekovic@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c

index 4a9aabc16fbc280b028d7f79daec83c64ae82cdf..ec4ea141bfdad1e473626ec294c5e3ad7390bc8c 100644 (file)
@@ -2007,11 +2007,13 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pp_dpm_vclk)) {
                if (!(gc_ver == IP_VERSION(10, 3, 1) ||
-                     gc_ver == IP_VERSION(10, 3, 0)))
+                     gc_ver == IP_VERSION(10, 3, 0) ||
+                     gc_ver == IP_VERSION(10, 1, 2)))
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pp_dpm_dclk)) {
                if (!(gc_ver == IP_VERSION(10, 3, 1) ||
-                     gc_ver == IP_VERSION(10, 3, 0)))
+                     gc_ver == IP_VERSION(10, 3, 0) ||
+                     gc_ver == IP_VERSION(10, 1, 2)))
                        *states = ATTR_STATE_UNSUPPORTED;
        } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
                if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)