Commit 6b1b7b5b authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amd/powerplay: move read sensor of UVD[VCE]_POWER to amdgpu_smu file

This part of code is asic unrelated and moves to top code level.
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7447a23b
...@@ -255,6 +255,14 @@ int smu_common_read_sensor(struct smu_context *smu, enum amd_pp_sensors sensor, ...@@ -255,6 +255,14 @@ int smu_common_read_sensor(struct smu_context *smu, enum amd_pp_sensors sensor,
ret = smu_feature_get_enabled_mask(smu, (uint32_t *)data, 2); ret = smu_feature_get_enabled_mask(smu, (uint32_t *)data, 2);
*size = 8; *size = 8;
break; break;
case AMDGPU_PP_SENSOR_UVD_POWER:
*(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_DPM_UVD_BIT) ? 1 : 0;
*size = 4;
break;
case AMDGPU_PP_SENSOR_VCE_POWER:
*(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_DPM_VCE_BIT) ? 1 : 0;
*size = 4;
break;
default: default:
ret = -EINVAL; ret = -EINVAL;
break; break;
......
...@@ -2946,14 +2946,6 @@ static int vega20_read_sensor(struct smu_context *smu, ...@@ -2946,14 +2946,6 @@ static int vega20_read_sensor(struct smu_context *smu,
PPTable_t *pptable = table_context->driver_pptable; PPTable_t *pptable = table_context->driver_pptable;
switch (sensor) { switch (sensor) {
case AMDGPU_PP_SENSOR_UVD_POWER:
*(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_DPM_UVD_BIT) ? 1 : 0;
*size = 4;
break;
case AMDGPU_PP_SENSOR_VCE_POWER:
*(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_DPM_VCE_BIT) ? 1 : 0;
*size = 4;
break;
case AMDGPU_PP_SENSOR_MAX_FAN_RPM: case AMDGPU_PP_SENSOR_MAX_FAN_RPM:
*(uint32_t *)data = pptable->FanMaximumRpm; *(uint32_t *)data = pptable->FanMaximumRpm;
*size = 4; *size = 4;
......
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