We were doing it in the common code and in the IP specific code.
Remove the IP specific code. The common code handles the
ordering properly.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
static int dce_v10_0_suspend(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- drm_kms_helper_poll_disable(adev->ddev);
-
- /* turn off display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
- }
-
amdgpu_atombios_scratch_regs_save(adev);
dce_v10_0_hpd_fini(adev);
static int dce_v10_0_resume(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
dce_v10_0_init_golden_registers(adev);
/* initialize hpd */
dce_v10_0_hpd_init(adev);
- /* blat the mode back in */
- drm_helper_resume_force_mode(adev->ddev);
- /* turn on display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
- }
-
- drm_kms_helper_poll_enable(adev->ddev);
-
return 0;
}
static int dce_v11_0_suspend(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- drm_kms_helper_poll_disable(adev->ddev);
-
- /* turn off display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
- }
-
amdgpu_atombios_scratch_regs_save(adev);
dce_v11_0_hpd_fini(adev);
static int dce_v11_0_resume(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
dce_v11_0_init_golden_registers(adev);
/* initialize hpd */
dce_v11_0_hpd_init(adev);
- /* blat the mode back in */
- drm_helper_resume_force_mode(adev->ddev);
- /* turn on display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
- }
-
- drm_kms_helper_poll_enable(adev->ddev);
-
return 0;
}
static int dce_v8_0_suspend(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- drm_kms_helper_poll_disable(adev->ddev);
-
- /* turn off display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
- }
-
amdgpu_atombios_scratch_regs_save(adev);
dce_v8_0_hpd_fini(adev);
static int dce_v8_0_resume(void *handle)
{
- struct drm_connector *connector;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
amdgpu_atombios_scratch_regs_restore(adev);
/* initialize hpd */
dce_v8_0_hpd_init(adev);
- /* blat the mode back in */
- drm_helper_resume_force_mode(adev->ddev);
- /* turn on display hw */
- list_for_each_entry(connector, &adev->ddev->mode_config.connector_list, head) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
- }
-
- drm_kms_helper_poll_enable(adev->ddev);
-
return 0;
}