gpu: nvgpu: added nvgpu_sim_init_late

Split sim initialization to two parts,
first part gets invoked as part of probe and
second part gets invoked in the finalize_poweron
after the hal has been initialized.

This is done because some of the sim init
code uses mm api's which are assigned as
part of hal init.

replaced sim buffer allocation api's
with nvgpu_dma_sys_alloc.

Change-Id: Ib019fbb747bdf6dcc74e7deba732ab41f0869e96
Signed-off-by: Antony Clince Alex <aalex@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1705424
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Antony Clince Alex
2018-04-30 12:57:29 +05:30
committed by mobile promotions
parent dd739fcb03
commit 560e243f2d
5 changed files with 50 additions and 23 deletions

View File

@@ -249,6 +249,11 @@ int gk20a_pm_finalize_poweron(struct device *dev)
if (err)
return err;
if (g->sim) {
if (g->sim->sim_init_late)
g->sim->sim_init_late(g);
}
err = gk20a_finalize_poweron(g);
if (err)
goto done;