diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-02-08 17:17:55 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-02-13 12:43:04 -0500 |
commit | 254cd2e08dd0c44f9de6424f10390343a34b4f5a (patch) | |
tree | aba1e2a28c4bc6070652943576b974da209f0e54 /drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | |
parent | d50e5c24480f8a6e2918ecd998e65f990f88b0ee (diff) |
drm/amdgpu: read hw register to check pg status.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c index f15df99f0a06..97af4827f652 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c @@ -723,7 +723,8 @@ static int uvd_v4_2_set_powergating_state(void *handle, if (state == AMD_PG_STATE_GATE) { uvd_v4_2_stop(adev); if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) { - if (!(RREG32_SMC(ixCURRENT_PG_STATUS) & 0x4)) { + if (!(RREG32_SMC(ixCURRENT_PG_STATUS) & + CURRENT_PG_STATUS__UVD_PG_STATUS_MASK)) { WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK | UVD_PGFSM_CONFIG__UVD_PGFSM_POWER_DOWN_MASK | UVD_PGFSM_CONFIG__UVD_PGFSM_P1_SELECT_MASK)); @@ -733,7 +734,8 @@ static int uvd_v4_2_set_powergating_state(void *handle, return 0; } else { if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) { - if (RREG32_SMC(ixCURRENT_PG_STATUS) & 0x4) { + if (RREG32_SMC(ixCURRENT_PG_STATUS) & + CURRENT_PG_STATUS__UVD_PG_STATUS_MASK) { WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK | UVD_PGFSM_CONFIG__UVD_PGFSM_POWER_UP_MASK | UVD_PGFSM_CONFIG__UVD_PGFSM_P1_SELECT_MASK)); |