Skip to content

Commit 0522821

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Drop unnecessary helper for aldebaran
aldebaran_get_gpu_power() is only called by one place and just calls aldebaran_get_smu_metrics_data(), so drop the helper. 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>
1 parent 6294256 commit 0522821

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,16 +1094,6 @@ static int aldebaran_get_current_activity_percent(struct smu_context *smu,
10941094
return ret;
10951095
}
10961096

1097-
static int aldebaran_get_gpu_power(struct smu_context *smu, uint32_t *value)
1098-
{
1099-
if (!value)
1100-
return -EINVAL;
1101-
1102-
return aldebaran_get_smu_metrics_data(smu,
1103-
METRICS_AVERAGE_SOCKETPOWER,
1104-
value);
1105-
}
1106-
11071097
static int aldebaran_thermal_get_temperature(struct smu_context *smu,
11081098
enum amd_pp_sensors sensor,
11091099
uint32_t *value)
@@ -1157,8 +1147,9 @@ static int aldebaran_read_sensor(struct smu_context *smu,
11571147
(uint32_t *)data);
11581148
*size = 4;
11591149
break;
1160-
case AMDGPU_PP_SENSOR_GPU_POWER:
1161-
ret = aldebaran_get_gpu_power(smu, (uint32_t *)data);
1150+
ret = aldebaran_get_smu_metrics_data(smu,
1151+
METRICS_AVERAGE_SOCKETPOWER,
1152+
(uint32_t *)data);
11621153
*size = 4;
11631154
break;
11641155
case AMDGPU_PP_SENSOR_HOTSPOT_TEMP:

0 commit comments

Comments
 (0)