mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
tegra-alt: adsp: ignore app load failure during init
Error in app loading skips loading of other apps and disables further use of ADSP. This prevents use of other successfully loaded apps which could have worked fine. Avoid skipping of remaining apps when loading fails for one app. Failed app will anyway throw error whenever user attempts to use it. This also allows adding entries for optional apps. Check if app was loaded when calling app_init(). Bug 200100724 Change-Id: I70a818df6fdeb54f94700e6c5f10a1dd1b269b72 Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com> Reviewed-on: http://git-master/r/736736 (cherry picked from commit 5387c9989420525b6ce7eaafd2ddb913f496740d) Reviewed-on: http://git-master/r/740608 Reviewed-on: http://git-master/r/750726 Tested-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
This commit is contained in:
committed by
Sameer Pujar
parent
a4fc4a6c3b
commit
0b3f6dae2b
@@ -316,8 +316,6 @@ static int tegra210_adsp_init(struct tegra210_adsp *adsp)
|
||||
if (!adsp_app_desc[i].handle) {
|
||||
dev_err(adsp->dev, "Failed to load app %s",
|
||||
adsp_app_desc[i].name);
|
||||
nvadsp_os_stop();
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,6 +531,10 @@ static int tegra210_adsp_app_init(struct tegra210_adsp *adsp,
|
||||
if (app->info || IS_APM_OUT(app->reg))
|
||||
return 0;
|
||||
|
||||
if (!app->desc->handle) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
app->info = nvadsp_app_init(app->desc->handle, NULL);
|
||||
if (!app->info) {
|
||||
dev_err(adsp->dev, "Failed to init app %s(%s).",
|
||||
@@ -1685,7 +1687,8 @@ static int tegra210_adsp_mux_put(struct snd_kcontrol *kcontrol,
|
||||
} else {
|
||||
ret = tegra210_adsp_app_init(adsp, app);
|
||||
if (ret < 0) {
|
||||
dev_err(adsp->dev, "Failed to init app.");
|
||||
dev_err(adsp->dev, "Failed to init app %s(%s)",
|
||||
app->desc->name, app->desc->fw_name);
|
||||
goto err_put;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user