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/include/nvgpu/linux/sim_pci.h | 2 +- drivers/gpu/nvgpu/include/nvgpu/sim.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/sim_pci.h b/drivers/gpu/nvgpu/include/nvgpu/linux/sim_pci.h index 5784ecba..b248f07b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/sim_pci.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/sim_pci.h @@ -1,6 +1,6 @@ /* * - * GK20A sim support + * nvgpu sim support pci * * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * diff --git a/drivers/gpu/nvgpu/include/nvgpu/sim.h b/drivers/gpu/nvgpu/include/nvgpu/sim.h index 78b749dd..f3ba2fed 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/sim.h +++ b/drivers/gpu/nvgpu/include/nvgpu/sim.h @@ -34,6 +34,7 @@ struct sim_nvgpu { struct nvgpu_mem send_bfr; struct nvgpu_mem recv_bfr; struct nvgpu_mem msg_bfr; + void (*sim_init_late)(struct gk20a *); void (*remove_support)(struct gk20a *); int (*esc_readl)( struct gk20a *g, char *path, u32 index, u32 *data); -- cgit v1.2.2