summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/Makefile
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2017-11-22 02:50:19 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-29 01:50:27 -0500
commit312f6c2c5f8b2ad6ab95300896ec4e7be9d5f833 (patch)
treec9a9148202fdd4f8487097d37d81c29efef6f66c /drivers/gpu/nvgpu/Makefile
parent830d3f10ca1f3d8a045542ef4548c84440a8e548 (diff)
gpu: nvgpu: remove dependency on linux header for sim_gk20a*
This patch removes linux dependencies from sim_gk20a.h under gk20a/sim_gk20a.h. The following changes are made in this patch. 1) Created a linux based structure sim_gk20a_linux that contains a common sim_gk20a struct inside it. The common struct sim_gk20a doesn't contain any linux specific structs. 2) The common struct sim_gk20a contains an added function pointer which is used to invoke gk20a_sim_esc_readl() method. 3) sim_gk20a.c is moved to nvgpu/common/linux along with a new header sim_gk20a.h that contains the definition of struct sim_gk20a_linux. 4) struct gk20a now contains a pointer of sim_gk20a instead of the entire object. The memory for this struct is allocated and initialized during gk20a_init_support() and freed during invocation of gk20_remove_support(). 5) We first obtain the pointer for struct sim_gk20a_linux from the pointer of sim_gk20a using the container_of method in order to work on the struct. JIRA NVGPU-386 Change-Id: Ic82b8702642377f82694577a53c3ca0b9c1bb2ab Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1603073 GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/Makefile')
-rw-r--r--drivers/gpu/nvgpu/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile
index 29966d84..ef8237f3 100644
--- a/drivers/gpu/nvgpu/Makefile
+++ b/drivers/gpu/nvgpu/Makefile
@@ -48,6 +48,7 @@ nvgpu-y := \
48 common/linux/sched.o \ 48 common/linux/sched.o \
49 common/linux/channel.o \ 49 common/linux/channel.o \
50 common/linux/ce2.o \ 50 common/linux/ce2.o \
51 common/linux/sim_gk20a.o \
51 common/mm/nvgpu_allocator.o \ 52 common/mm/nvgpu_allocator.o \
52 common/mm/bitmap_allocator.o \ 53 common/mm/bitmap_allocator.o \
53 common/mm/buddy_allocator.o \ 54 common/mm/buddy_allocator.o \
@@ -99,7 +100,6 @@ nvgpu-y := \
99 gk20a/tsg_gk20a.o \ 100 gk20a/tsg_gk20a.o \
100 gk20a/fecs_trace_gk20a.o \ 101 gk20a/fecs_trace_gk20a.o \
101 gk20a/mc_gk20a.o \ 102 gk20a/mc_gk20a.o \
102 gk20a/sim_gk20a.o \
103 gm20b/hal_gm20b.o \ 103 gm20b/hal_gm20b.o \
104 gm20b/bus_gm20b.o \ 104 gm20b/bus_gm20b.o \
105 gm20b/ltc_gm20b.o \ 105 gm20b/ltc_gm20b.o \