Commit 4c64f2e4 authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher

drm/amd: Fix the return for average power on aldebaran

Aldebaran can only return average socket power for the first die.
The other dies return 0.  Instead of returning a bad value, return
-EOPNOTSUPP so that the attribute will be hidden.
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 05228211
...@@ -625,9 +625,10 @@ static int aldebaran_get_smu_metrics_data(struct smu_context *smu, ...@@ -625,9 +625,10 @@ static int aldebaran_get_smu_metrics_data(struct smu_context *smu,
break; break;
case METRICS_AVERAGE_SOCKETPOWER: case METRICS_AVERAGE_SOCKETPOWER:
/* Valid power data is available only from primary die */ /* Valid power data is available only from primary die */
*value = aldebaran_is_primary(smu) ? if (aldebaran_is_primary(smu))
metrics->AverageSocketPower << 8 : *value = metrics->AverageSocketPower << 8;
0; else
ret = -EOPNOTSUPP;
break; break;
case METRICS_TEMPERATURE_EDGE: case METRICS_TEMPERATURE_EDGE:
*value = metrics->TemperatureEdge * *value = metrics->TemperatureEdge *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment