drm/amdgpu/pm: update current crtc info after setting the powerstate
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Feb 2016 22:18:25 +0000 (17:18 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Mar 2016 16:01:20 +0000 (11:01 -0500)
On CI, we need to see if the number of crtcs changes to determine
whether or not we need to upload the mclk table again.  In practice
we don't currently upload the mclk table again after the initial load.
The only reason you would would be to add new states, e.g., for
arbitrary mclk setting which is not currently supported.

Acked-by: Jordan Lazare <Jordan.Lazare@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 66855b62a6037b89f5adfe759f583ddc5a1919f6..95a4a25d8df9e8d37e1ec06d2d566e337353f222 100644 (file)
@@ -649,9 +649,6 @@ force:
        /* update display watermarks based on new power state */
        amdgpu_display_bandwidth_update(adev);
 
-       adev->pm.dpm.current_active_crtcs = adev->pm.dpm.new_active_crtcs;
-       adev->pm.dpm.current_active_crtc_count = adev->pm.dpm.new_active_crtc_count;
-
        /* wait for the rings to drain */
        for (i = 0; i < AMDGPU_MAX_RINGS; i++) {
                struct amdgpu_ring *ring = adev->rings[i];
@@ -670,6 +667,9 @@ force:
        /* update displays */
        amdgpu_dpm_display_configuration_changed(adev);
 
+       adev->pm.dpm.current_active_crtcs = adev->pm.dpm.new_active_crtcs;
+       adev->pm.dpm.current_active_crtc_count = adev->pm.dpm.new_active_crtc_count;
+
        if (adev->pm.funcs->force_performance_level) {
                if (adev->pm.dpm.thermal_active) {
                        enum amdgpu_dpm_forced_level level = adev->pm.dpm.forced_level;