tegra: adsp: Max ADSP clock at APM active
Viswanath L [Wed, 25 May 2016 08:06:24 +0000 (13:06 +0530)]
Spike ADSP freq. to max when app transitions to active so that ADSP
does not starve

Bug 200196267

Change-Id: I11863b2449cfecc47aefd9bc41059b634b3b2acd
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: http://git-master/r/1142024
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

sound/soc/tegra-alt/tegra210_adsp_alt.c

index a540758..3b5f97b 100644 (file)
@@ -576,6 +576,11 @@ static int tegra210_adsp_send_state_msg(struct tegra210_adsp_app *app,
        apm_msg.msg.call_params.method = nvfx_method_set_state;
        apm_msg.msg.state_params.state = state;
 
+       /* Spike ADSP freq to max when app transitions to active */
+       /* state; DFS will thereafter find appropriate rate      */
+       if (state == nvfx_state_active)
+               adsp_override_freq(INT_MAX);
+
        return tegra210_adsp_send_msg(app, &apm_msg, flags);
 }