]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: don't enable/disable display twice on suspend/resume
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Jun 2015 15:52:00 +0000 (11:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Jun 2015 18:16:48 +0000 (14:16 -0400)
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>
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c

index 192dfe55b9ab31771eb793c9cd8bcd772a87a988..5cde635978f940ff250ffb22a52c77a0db38ea26 100644 (file)
@@ -3017,16 +3017,8 @@ static int dce_v10_0_hw_fini(void *handle)
 
 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);
@@ -3036,7 +3028,6 @@ static int dce_v10_0_suspend(void *handle)
 
 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);
@@ -3057,15 +3048,6 @@ static int dce_v10_0_resume(void *handle)
        /* 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;
 }
 
index a530c5dd11936f1b0128944a64e5df66b65db530..95efd98b202d5d74e7329b009e944dd7f8bdcfab 100644 (file)
@@ -3015,16 +3015,8 @@ static int dce_v11_0_hw_fini(void *handle)
 
 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);
@@ -3034,7 +3026,6 @@ static int dce_v11_0_suspend(void *handle)
 
 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);
@@ -3056,15 +3047,6 @@ static int dce_v11_0_resume(void *handle)
        /* 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;
 }
 
index 9e8b9f1fad1817d76258aa75ea749b069a415dad..72c27ac915f2a8681f35db4d15e232918405eb95 100644 (file)
@@ -2948,16 +2948,8 @@ static int dce_v8_0_hw_fini(void *handle)
 
 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);
@@ -2967,7 +2959,6 @@ static int dce_v8_0_suspend(void *handle)
 
 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);
@@ -2986,15 +2977,6 @@ static int dce_v8_0_resume(void *handle)
        /* 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;
 }