drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.
authorDavid Rokhvarg <David.Rokhvarg@amd.com>
Fri, 11 Dec 2015 17:06:25 +0000 (12:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Dec 2015 21:42:56 +0000 (16:42 -0500)
This replaces programming of a hardcoded value.

Signed-off-by: David Rokhvarg <David.Rokhvarg@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c

index 464109592aaf577a0ca0b2a5042bc2e69774f085..344806521468cbef763100bc6e340451ce872519 100644 (file)
@@ -789,9 +789,11 @@ static int cz_tf_set_deep_sleep_sclk_threshold(struct pp_hwmgr *hwmgr,
                if (clks == 0)
                        clks = CZ_MIN_DEEP_SLEEP_SCLK;
 
+               PP_DBG_LOG("Setting Deep Sleep Clock: %d\n", clks);
+
                smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
-                                         PPSMC_MSG_SetMinDeepSleepSclk,
-                                               CZ_MIN_DEEP_SLEEP_SCLK);
+                               PPSMC_MSG_SetMinDeepSleepSclk,
+                               clks);
        }
 
        return 0;