drm/amd/powerplay: support VCN powergate status retrieval for SW SMU
authorEvan Quan <evan.quan@amd.com>
Mon, 22 Jul 2019 01:57:27 +0000 (09:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Jul 2019 07:02:22 +0000 (02:02 -0500)
Commonly used for VCN powergate status retrieval for SW SMU.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index 93cd969e5cf5c6a1c655dbea760d62052c17653f..0685a3388e38ce7ae2667319a22726b0b26c947e 100644 (file)
@@ -338,6 +338,10 @@ int smu_common_read_sensor(struct smu_context *smu, enum amd_pp_sensors sensor,
                *(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_DPM_VCE_BIT) ? 1 : 0;
                *size = 4;
                break;
+       case AMDGPU_PP_SENSOR_VCN_POWER_STATE:
+               *(uint32_t *)data = smu_feature_is_enabled(smu, SMU_FEATURE_VCN_PG_BIT) ? 1 : 0;
+               *size = 4;
+               break;
        default:
                ret = -EINVAL;
                break;