]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: print smc feature mask in debugfs amdgpu_pm_info
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Sep 2018 03:50:07 +0000 (22:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Sep 2018 02:09:11 +0000 (21:09 -0500)
Print the enabled smc feature mask in amdgpu_pm_info for debugging.

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 8c334fc808c2b543cc8133137fa6fc9852309bdc..18d989e0e362ef32c2cc1314e3d675ccae2d64f6 100644 (file)
@@ -1976,6 +1976,7 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
 static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *adev)
 {
        uint32_t value;
+       uint64_t value64;
        uint32_t query = 0;
        int size;
 
@@ -2014,6 +2015,10 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
                seq_printf(m, "GPU Load: %u %%\n", value);
        seq_printf(m, "\n");
 
+       /* SMC feature mask */
+       if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_ENABLED_SMC_FEATURES_MASK, (void *)&value64, &size))
+               seq_printf(m, "SMC Feature Mask: 0x%016llx\n", value64);
+
        /* UVD clocks */
        if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_UVD_POWER, (void *)&value, &size)) {
                if (!value) {