drm/radeon/pm: update current crtc info after setting the powerstate
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Feb 2016 22:38:38 +0000 (17:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Mar 2016 16:01:21 +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: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/radeon_pm.c

index ca3be90a3bb43eb2624732cf7c4556f6b6650583..0f14d897baf9b32974a97eaa59153363e3d8c97b 100644 (file)
@@ -1080,10 +1080,6 @@ force:
        /* update display watermarks based on new power state */
        radeon_bandwidth_update(rdev);
 
-       rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs;
-       rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count;
-       rdev->pm.dpm.single_display = single_display;
-
        /* wait for the rings to drain */
        for (i = 0; i < RADEON_NUM_RINGS; i++) {
                struct radeon_ring *ring = &rdev->ring[i];
@@ -1102,6 +1098,10 @@ force:
        /* update displays */
        radeon_dpm_display_configuration_changed(rdev);
 
+       rdev->pm.dpm.current_active_crtcs = rdev->pm.dpm.new_active_crtcs;
+       rdev->pm.dpm.current_active_crtc_count = rdev->pm.dpm.new_active_crtc_count;
+       rdev->pm.dpm.single_display = single_display;
+
        if (rdev->asic->dpm.force_performance_level) {
                if (rdev->pm.dpm.thermal_active) {
                        enum radeon_dpm_forced_level level = rdev->pm.dpm.forced_level;