aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-08-24 05:26:23 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 16:10:49 -0400
commit1f06dee8f784e4f3af4add95076659ba95ffa9fb (patch)
tree062868451ce7d4542320c52e9fcac6d336689e62
parent43370c4ce5c6a1fae84b58f67f7834902ee74b7c (diff)
drm/amdgpu: Enable/disable gfx PG feature in rlc safe mode
This is required by gfx hw and can fix the rlc hang when do s3 stree test on Cz/St. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Hang Zhou <hang.zhou@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 9de940a65c80..56662d80602c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -5660,6 +5660,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
5660 if (amdgpu_sriov_vf(adev)) 5660 if (amdgpu_sriov_vf(adev))
5661 return 0; 5661 return 0;
5662 5662
5663 if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
5664 AMD_PG_SUPPORT_RLC_SMU_HS |
5665 AMD_PG_SUPPORT_CP |
5666 AMD_PG_SUPPORT_GFX_DMG))
5667 adev->gfx.rlc.funcs->enter_safe_mode(adev);
5663 switch (adev->asic_type) { 5668 switch (adev->asic_type) {
5664 case CHIP_CARRIZO: 5669 case CHIP_CARRIZO:
5665 case CHIP_STONEY: 5670 case CHIP_STONEY:
@@ -5709,7 +5714,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
5709 default: 5714 default:
5710 break; 5715 break;
5711 } 5716 }
5712 5717 if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
5718 AMD_PG_SUPPORT_RLC_SMU_HS |
5719 AMD_PG_SUPPORT_CP |
5720 AMD_PG_SUPPORT_GFX_DMG))
5721 adev->gfx.rlc.funcs->exit_safe_mode(adev);
5713 return 0; 5722 return 0;
5714} 5723}
5715 5724