diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-10-15 23:53:27 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-19 19:12:56 +0300 |
commit | f9fff064bb83c55b3fc6291e3b59e3bc78fedddf (patch) | |
tree | 8d9ff53a4defa4d5bf4e7476896ff7c98730ffef /drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | |
parent | a3d5aaa836ed993747af7b53cfca1b3cd3c9fc46 (diff) | |
download | linux-f9fff064bb83c55b3fc6291e3b59e3bc78fedddf.tar.xz |
drm/amdgpu/dce: simplify suspend/resume
We were basically opencoding the same thing in both
hw_init and resume and hw_fini and suspend.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v10_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 37073930e2c9..a6ea2d8e85df 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -3086,22 +3086,18 @@ static int dce_v10_0_suspend(void *handle) amdgpu_atombios_scratch_regs_save(adev); - dce_v10_0_hpd_fini(adev); - - return 0; + return dce_v10_0_hw_fini(handle); } static int dce_v10_0_resume(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + int ret; - dce_v10_0_init_golden_registers(adev); + ret = dce_v10_0_hw_init(handle); amdgpu_atombios_scratch_regs_restore(adev); - /* init dig PHYs, disp eng pll */ - amdgpu_atombios_encoder_init_dig(adev); - amdgpu_atombios_crtc_set_disp_eng_pll(adev, adev->clock.default_dispclk); /* turn on the BL */ if (adev->mode_info.bl_encoder) { u8 bl_level = amdgpu_display_backlight_get_level(adev, @@ -3110,10 +3106,7 @@ static int dce_v10_0_resume(void *handle) bl_level); } - /* initialize hpd */ - dce_v10_0_hpd_init(adev); - - return 0; + return ret; } static bool dce_v10_0_is_idle(void *handle) |