From 560e243f2d8b6cf3fafd8e79560cbf6dffe58e9e Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Mon, 30 Apr 2018 12:57:29 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1705424 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/module.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/common/linux') diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index f00b3cce..86abd36b 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -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; -- cgit v1.2.2