drm/amd: Rename AMDGPU_PP_SENSOR_GPU_POWER
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 10 Aug 2023 10:32:01 +0000 (05:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2023 22:08:30 +0000 (18:08 -0400)
Use the clearer name `AMDGPU_PP_SENSOR_GPU_AVG_POWER` instead.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
17 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/include/kgd_pp_interface.h
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/cyan_skillfish_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c

index 631c5ab3f7dc5ef05b0432332f4726968bd28c76..99f4df133ed3e8f21a77f2636e41c18a82634473 100644 (file)
@@ -1019,7 +1019,7 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
                case AMDGPU_INFO_SENSOR_GPU_AVG_POWER:
                        /* get average GPU power */
                        if (amdgpu_dpm_read_sensor(adev,
-                                                  AMDGPU_PP_SENSOR_GPU_POWER,
+                                                  AMDGPU_PP_SENSOR_GPU_AVG_POWER,
                                                   (void *)&ui32, &ui32_size)) {
                                return -EINVAL;
                        }
index 6582cdf2736f31e783d8771a8068699c6c90eecd..84c5224d994c434a90c02eaa43ed27c526ebe59f 100644 (file)
@@ -132,7 +132,7 @@ enum amd_pp_sensors {
        AMDGPU_PP_SENSOR_MEM_TEMP,
        AMDGPU_PP_SENSOR_VCE_POWER,
        AMDGPU_PP_SENSOR_UVD_POWER,
-       AMDGPU_PP_SENSOR_GPU_POWER,
+       AMDGPU_PP_SENSOR_GPU_AVG_POWER,
        AMDGPU_PP_SENSOR_GPU_INPUT_POWER,
        AMDGPU_PP_SENSOR_SS_APU_SHARE,
        AMDGPU_PP_SENSOR_SS_DGPU_SHARE,
index bb4285159229173240dd78e7707fefd3dfd50b2c..8133d968f75b99cc5f95edab5b45ca569dc114d8 100644 (file)
@@ -2796,7 +2796,7 @@ static ssize_t amdgpu_hwmon_show_power_avg(struct device *dev,
 {
        unsigned int val;
 
-       val = amdgpu_hwmon_get_power(dev, AMDGPU_PP_SENSOR_GPU_POWER);
+       val = amdgpu_hwmon_get_power(dev, AMDGPU_PP_SENSOR_GPU_AVG_POWER);
        if (val < 0)
                return val;
 
@@ -3460,7 +3460,7 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a
        if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_VDDNB, (void *)&value, &size))
                seq_printf(m, "\t%u mV (VDDNB)\n", value);
        size = sizeof(uint32_t);
-       if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_POWER, (void *)&query, &size))
+       if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_AVG_POWER, (void *)&query, &size))
                seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);
        size = sizeof(value);
        seq_printf(m, "\n");
index ad40395be60284a846c4002987ac6b1b22f9f1dd..3b33af30eb0fbc9309a6ce647b7a1a8416ad782a 100644 (file)
@@ -2141,7 +2141,7 @@ static int vega20_get_gpu_power(struct pp_hwmgr *hwmgr, int idx,
 
        /* For the 40.46 release, they changed the value name */
        switch (idx) {
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                if (hwmgr->smu_version == 0x282e00)
                        *query = metrics_table.AverageSocketPower << 8;
                else
@@ -2260,7 +2260,7 @@ static int vega20_read_sensor(struct pp_hwmgr *hwmgr, int idx,
                *((uint32_t *)value) = data->vce_power_gated ? 0 : 1;
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
        case AMDGPU_PP_SENSOR_GPU_INPUT_POWER:
                *size = 16;
                ret = vega20_get_gpu_power(hwmgr, idx, (uint32_t *)value);
index e5f629a23db6b808a93b3348aeb6e85d577fed03..704a2b577a0e2fbc396ae6c92c961afaabc9e123 100644 (file)
@@ -1130,7 +1130,7 @@ static int arcturus_read_sensor(struct smu_context *smu,
                                                    (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = arcturus_get_smu_metrics_data(smu,
                                                    METRICS_AVERAGE_SOCKETPOWER,
                                                    (uint32_t *)data);
index 4840e4d69b106db554b68bd748bf5b1fe5795c92..9548bd3c624bd41b5f022977e58d60b5cf8c4964 100644 (file)
@@ -212,7 +212,7 @@ static int cyan_skillfish_read_sensor(struct smu_context *smu,
                *(uint32_t *)data *= 100;
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = cyan_skillfish_get_smu_metrics_data(smu,
                                                   METRICS_AVERAGE_SOCKETPOWER,
                                                   (uint32_t *)data);
index 06474bbb73829968885743df36b293dc25f372c7..18487ae10bcff469f71d189f0e36e4727c81bfdb 100644 (file)
@@ -2202,7 +2202,7 @@ static int navi10_read_sensor(struct smu_context *smu,
                                                  (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = navi1x_get_smu_metrics_data(smu,
                                                  METRICS_AVERAGE_SOCKETPOWER,
                                                  (uint32_t *)data);
index 6dead62095bb1763dc200dcc22504f64f1660dd4..4bb289f9b4b8b82a59a99ad92e18deaa6900b850 100644 (file)
@@ -1902,7 +1902,7 @@ static int sienna_cichlid_read_sensor(struct smu_context *smu,
                                                          (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = sienna_cichlid_get_smu_metrics_data(smu,
                                                          METRICS_AVERAGE_SOCKETPOWER,
                                                          (uint32_t *)data);
index 8a2c9c7abea6d4e21324b07607818f9688d3b7f0..201cec59984281dd944d666e77638a7faa875052 100644 (file)
@@ -1540,7 +1540,7 @@ static int vangogh_read_sensor(struct smu_context *smu,
                                                   (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = vangogh_common_get_smu_metrics_data(smu,
                                                   METRICS_AVERAGE_SOCKETPOWER,
                                                   (uint32_t *)data);
index 7b5ccb935fc0154a2b6cffc0a69c38c68c76db0b..c8119491c5161bb20f7cef92bb608b522337e4c0 100644 (file)
@@ -1315,6 +1315,7 @@ static int renoir_read_sensor(struct smu_context *smu,
                                                  (uint32_t *)data);
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
        default:
                ret = -EOPNOTSUPP;
                break;
index 1341363ab01a8009b9dd23d0d709394c6429ff5f..cc3169400c9b087e211eab3be3bcbac5496e2b8d 100644 (file)
@@ -1148,6 +1148,7 @@ static int aldebaran_read_sensor(struct smu_context *smu,
                                                             (uint32_t *)data);
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = aldebaran_get_smu_metrics_data(smu,
                                                     METRICS_AVERAGE_SOCKETPOWER,
                                                     (uint32_t *)data);
index 203dc50c0fd588c5dc94ff970cd7d25c33bc6abe..c904da1f7a044bea22c75521549ec41c3b6bc09c 100644 (file)
@@ -953,7 +953,7 @@ static int smu_v13_0_0_read_sensor(struct smu_context *smu,
                                                       (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = smu_v13_0_0_get_smu_metrics_data(smu,
                                                       METRICS_AVERAGE_SOCKETPOWER,
                                                       (uint32_t *)data);
index 0951659299c153f5392175d43c6a34a079d46f6b..626591f54bc49769189b146d2bfc55f39a6f7027 100644 (file)
@@ -572,7 +572,7 @@ static int smu_v13_0_4_read_sensor(struct smu_context *smu,
                                                       (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = smu_v13_0_4_get_smu_metrics_data(smu,
                                                       METRICS_AVERAGE_SOCKETPOWER,
                                                       (uint32_t *)data);
index 5f8e70d4c467e74a50810c4f7e1d124b9dc30743..c6e7c2115a262c1b018a270d517bd478753b053b 100644 (file)
@@ -388,6 +388,7 @@ static int smu_v13_0_5_read_sensor(struct smu_context *smu,
                                                       (uint32_t *)data);
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
        default:
                ret = -EOPNOTSUPP;
                break;
index aedf1c41d4a46dbbc30fec7aece098a83812b02d..5474024e0654e4f46dced728b8b49da51a526a56 100644 (file)
@@ -1213,6 +1213,7 @@ static int smu_v13_0_6_read_sensor(struct smu_context *smu,
                ret = smu_v13_0_get_gfx_vdd(smu, (uint32_t *)data);
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
        default:
                ret = -EOPNOTSUPP;
                break;
index 880a83e53882dfa8bd7641763d9f5b9f6be73ca9..822b97190a208d219de3ba932b0a7df403967606 100644 (file)
@@ -934,7 +934,7 @@ static int smu_v13_0_7_read_sensor(struct smu_context *smu,
                                                       (uint32_t *)data);
                *size = 4;
                break;
-       case AMDGPU_PP_SENSOR_GPU_POWER:
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
                ret = smu_v13_0_7_get_smu_metrics_data(smu,
                                                       METRICS_AVERAGE_SOCKETPOWER,
                                                       (uint32_t *)data);
index 14fe45d3b7b7df69b74e8d6d79228089303c75ea..2e74d749efdd273e8f876c360b26c46623fc1cd1 100644 (file)
@@ -479,6 +479,7 @@ static int yellow_carp_read_sensor(struct smu_context *smu,
                                                       (uint32_t *)data);
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_GPU_AVG_POWER:
        default:
                ret = -EOPNOTSUPP;
                break;