From: Matthew Garrett Date: Tue, 27 Apr 2010 17:58:46 +0000 (-0400) Subject: radeon: Make sure that we determine the correct PM state before transition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c37d230af450472183e70947f8e2aa8101a96603;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git radeon: Make sure that we determine the correct PM state before transition We need to choose the correct PM state to transition into before starting the actual change. Call radeon_get_power_state() at the top of the clock setting to do so. Signed-off-by: Matthew Garrett Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 79d3336eede5..7cc54c804cb0 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -58,6 +58,9 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev, int static_switch) { int i; + if (!static_switch) + radeon_get_power_state(rdev, rdev->pm.planned_action); + mutex_lock(&rdev->cp.mutex); /* wait for GPU idle */