summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorVince Hsu <vinceh@nvidia.com>2018-11-02 03:29:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-11-07 13:18:55 -0500
commit9cdc1ccdafa955ba2d9a9b238d05f15566869039 (patch)
tree968609f0d0182687e4f1ae35f11ffafa1d5c35f2 /drivers/gpu/nvgpu/gm20b
parent6099b07090422bce03f2108f11dc3f8e677a966f (diff)
gpu: nvgpu: re-initialize fw pointer when failed to load fw
When ACR and PMU BL fail to boot, the firmware are releasd, but the firmware pointers are not re-initialized. That causes later invalid pointer usage. Fix that by setting them as NULL. Bug 200462464 Change-Id: Iacdf4b3c7f7144a77f595c77e6f5a29d35505672 Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1941671 (cherry picked from commit 3a87a0c99819d9b00d4b7e414ec0ecfeaade961c) Reviewed-on: https://git-master.nvidia.com/r/1942950 GVS: Gerrit_Virtual_Submit Reviewed-by: Siddardha Naraharisetti <siddardhan@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/acr_gm20b.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
index e38e9a85..4f684191 100644
--- a/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/acr_gm20b.c
@@ -1168,6 +1168,7 @@ err_free_ucode:
1168 nvgpu_dma_free(g, &hs_bl->hs_bl_ucode); 1168 nvgpu_dma_free(g, &hs_bl->hs_bl_ucode);
1169err_done: 1169err_done:
1170 nvgpu_release_firmware(g, hs_bl_fw); 1170 nvgpu_release_firmware(g, hs_bl_fw);
1171 acr_desc->acr_hs_bl.hs_bl_fw = NULL;
1171 1172
1172 return err; 1173 return err;
1173} 1174}
@@ -1338,7 +1339,7 @@ err_free_ucode_map:
1338 nvgpu_dma_unmap_free(vm, acr_ucode_mem); 1339 nvgpu_dma_unmap_free(vm, acr_ucode_mem);
1339err_release_acr_fw: 1340err_release_acr_fw:
1340 nvgpu_release_firmware(g, acr_fw); 1341 nvgpu_release_firmware(g, acr_fw);
1341 acr_fw = NULL; 1342 acr_desc->acr_fw = NULL;
1342 return status; 1343 return status;
1343} 1344}
1344 1345