drm/amd/amdgpu: enable PG_EN bit in powergating UVD
authorTom St Denis <tom.stdenis@amd.com>
Thu, 28 Jul 2016 13:45:07 +0000 (09:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Aug 2016 15:32:41 +0000 (11:32 -0400)
Enable the PG_EN bit just before the SMU would be tasked
with the PG transition.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c

index 7f2b5de29f67af76d908bf3f5f980bca5e81647e..391457f1eafd6515a8fc86d6088b43ded3d347b7 100644 (file)
@@ -997,6 +997,8 @@ static int uvd_v6_0_set_powergating_state(void *handle,
        if (!(adev->pg_flags & AMD_PG_SUPPORT_UVD))
                return 0;
 
+       WREG32(mmUVD_POWER_STATUS, UVD_POWER_STATUS__UVD_PG_EN_MASK);
+
        if (state == AMD_PG_STATE_GATE) {
                uvd_v6_0_stop(adev);
                return 0;