aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <bakitajoshua@gmail.com>2023-10-29 13:07:40 -0400
committerJoshua Bakita <bakitajoshua@gmail.com>2023-10-29 13:10:52 -0400
commit2c5337a24f7f2d02989dfb733c55d6d8c7e90493 (patch)
treeb9f1028cb443b03190b710c0d7ee640bf5958631
parentaa06f84f03cba7ad1aae5cd527355bb3d8c152a6 (diff)
Update includes to L4T r32.7.4 and drop nvgpu/gk20a.h dependency
Also add instructions for updating `include/`. These files are now only needed to build on Linux 4.9-based Tegra platforms.
-rw-r--r--include/HOW_TO_REBUILD_THIS.md22
-rw-r--r--include/clk/clk_arb.c4
-rw-r--r--include/gk20a/fifo_gk20a.c54
-rw-r--r--include/gk20a/fifo_gk20a.h7
-rw-r--r--include/gk20a/gk20a.c7
-rw-r--r--include/gk20a/gr_gk20a.c108
-rw-r--r--include/gk20a/gr_gk20a.h5
-rw-r--r--include/gk20a/hw_bus_gk20a.h171
-rw-r--r--include/gk20a/hw_ccsr_gk20a.h163
-rw-r--r--include/gk20a/hw_ce2_gk20a.h87
-rw-r--r--include/gk20a/hw_ctxsw_prog_gk20a.h447
-rw-r--r--include/gk20a/hw_falcon_gk20a.h559
-rw-r--r--include/gk20a/hw_fb_gk20a.h263
-rw-r--r--include/gk20a/hw_fifo_gk20a.h619
-rw-r--r--include/gk20a/hw_flush_gk20a.h187
-rw-r--r--include/gk20a/hw_gmmu_gk20a.h283
-rw-r--r--include/gk20a/hw_gr_gk20a.h3807
-rw-r--r--include/gk20a/hw_ltc_gk20a.h455
-rw-r--r--include/gk20a/hw_mc_gk20a.h291
-rw-r--r--include/gk20a/hw_pbdma_gk20a.h575
-rw-r--r--include/gk20a/hw_perf_gk20a.h211
-rw-r--r--include/gk20a/hw_pram_gk20a.h63
-rw-r--r--include/gk20a/hw_pri_ringmaster_gk20a.h159
-rw-r--r--include/gk20a/hw_pri_ringstation_fbp_gk20a.h231
-rw-r--r--include/gk20a/hw_pri_ringstation_gpc_gk20a.h79
-rw-r--r--include/gk20a/hw_pri_ringstation_sys_gk20a.h91
-rw-r--r--include/gk20a/hw_proj_gk20a.h167
-rw-r--r--include/gk20a/hw_pwr_gk20a.h823
-rw-r--r--include/gk20a/hw_ram_gk20a.h443
-rw-r--r--include/gk20a/hw_therm_gk20a.h367
-rw-r--r--include/gk20a/hw_timer_gk20a.h127
-rw-r--r--include/gk20a/hw_top_gk20a.h211
-rw-r--r--include/gk20a/hw_trim_gk20a.h315
-rw-r--r--include/nvgpu/acr/nvgpu_acr.h6
-rw-r--r--include/nvgpu/bug.h20
-rw-r--r--include/nvgpu/enabled.h9
-rw-r--r--include/nvgpu/gk20a.h8
-rw-r--r--include/nvgpu/hw/gk20a/hw_gr_gk20a.h61
-rw-r--r--include/nvgpu/hw/gm20b/hw_gr_gm20b.h14
-rw-r--r--include/nvgpu/hw/gp106/hw_gr_gp106.h4
-rw-r--r--include/nvgpu/hw/gp10b/hw_gr_gp10b.h4
-rw-r--r--include/nvgpu/hw/gv100/hw_gr_gv100.h4
-rw-r--r--include/nvgpu/hw/gv11b/hw_gr_gv11b.h4
-rw-r--r--include/nvgpu/log.h3
-rw-r--r--include/nvgpu/nvgpu_err.h359
-rw-r--r--include/nvgpu/nvlink.h2
-rw-r--r--include/nvgpu/pmu.h20
-rw-r--r--include/nvgpu/pmuif/gpmuif_pg.h14
-rw-r--r--include/nvgpu/tsg.h4
-rw-r--r--include/os/linux/debug.c4
-rw-r--r--include/os/linux/driver_common.c69
-rw-r--r--include/os/linux/ecc_linux.h49
-rw-r--r--include/os/linux/ioctl_clk_arb.c17
-rw-r--r--include/os/linux/ioctl_ctrl.c122
-rw-r--r--include/os/linux/ioctl_tsg.c26
-rw-r--r--include/os/linux/module.c22
-rw-r--r--include/os/linux/os_linux.h7
-rw-r--r--include/os/linux/platform_gv11b_tegra.c4
-rw-r--r--include/os/linux/scale.c29
-rw-r--r--include/os/linux/sdl.c341
-rw-r--r--include/os/linux/vm.c8
-rw-r--r--include/os/posix/nvgpu.c18
-rw-r--r--nvdebug.h6
63 files changed, 1305 insertions, 11354 deletions
diff --git a/include/HOW_TO_REBUILD_THIS.md b/include/HOW_TO_REBUILD_THIS.md
new file mode 100644
index 0000000..dcb1084
--- /dev/null
+++ b/include/HOW_TO_REBUILD_THIS.md
@@ -0,0 +1,22 @@
1First the internal `include` and `os` directories:
2```
3cp -r /playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/include/nvgpu/
4cp -r /playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/os include/
5```
6
7Then every directory needed by either of those includes:
8```
9cp -r /playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/os include/
10/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/gk20a include/
11/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/ctrl include/
12/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/clk include/
13/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/boardobj include/
14/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/pmu_perf include/
15/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/pstate include/
16/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/volt include/
17/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/lpwr include/
18/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/pmgr include/
19/playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/therm include/
20```
21
22Make sure to pull the same version of L4T that you're building on! The structure layout is highly dependant on the version.
diff --git a/include/clk/clk_arb.c b/include/clk/clk_arb.c
index 6cf005c..8e9fb41 100644
--- a/include/clk/clk_arb.c
+++ b/include/clk/clk_arb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -886,8 +886,8 @@ void nvgpu_clk_arb_free_session(struct nvgpu_ref *refcount)
886 nvgpu_spinlock_acquire(&session->session_lock); 886 nvgpu_spinlock_acquire(&session->session_lock);
887 nvgpu_list_for_each_entry_safe(dev, tmp, &session->targets, 887 nvgpu_list_for_each_entry_safe(dev, tmp, &session->targets,
888 nvgpu_clk_dev, node) { 888 nvgpu_clk_dev, node) {
889 nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd);
890 nvgpu_list_del(&dev->node); 889 nvgpu_list_del(&dev->node);
890 nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd);
891 } 891 }
892 nvgpu_spinlock_release(&session->session_lock); 892 nvgpu_spinlock_release(&session->session_lock);
893 893
diff --git a/include/gk20a/fifo_gk20a.c b/include/gk20a/fifo_gk20a.c
index 4477f7c..77babc7 100644
--- a/include/gk20a/fifo_gk20a.c
+++ b/include/gk20a/fifo_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Graphics FIFO (gr host) 2 * GK20A Graphics FIFO (gr host)
3 * 3 *
4 * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -58,8 +58,6 @@
58#include <nvgpu/hw/gk20a/hw_top_gk20a.h> 58#include <nvgpu/hw/gk20a/hw_top_gk20a.h>
59#include <nvgpu/hw/gk20a/hw_gr_gk20a.h> 59#include <nvgpu/hw/gk20a/hw_gr_gk20a.h>
60 60
61#include <os/linux/os_linux.h>
62
63#define FECS_METHOD_WFI_RESTORE 0x80000 61#define FECS_METHOD_WFI_RESTORE 0x80000
64#define FECS_MAILBOX_0_ACK_RESTORE 0x4 62#define FECS_MAILBOX_0_ACK_RESTORE 0x4
65 63
@@ -1409,6 +1407,7 @@ static void gk20a_fifo_handle_chsw_fault(struct gk20a *g)
1409 intr = gk20a_readl(g, fifo_intr_chsw_error_r()); 1407 intr = gk20a_readl(g, fifo_intr_chsw_error_r());
1410 nvgpu_err(g, "chsw: %08x", intr); 1408 nvgpu_err(g, "chsw: %08x", intr);
1411 gk20a_fecs_dump_falcon_stats(g); 1409 gk20a_fecs_dump_falcon_stats(g);
1410 gk20a_gpccs_dump_falcon_stats(g);
1412 gk20a_writel(g, fifo_intr_chsw_error_r(), intr); 1411 gk20a_writel(g, fifo_intr_chsw_error_r(), intr);
1413} 1412}
1414 1413
@@ -1604,6 +1603,7 @@ int gk20a_fifo_deferred_reset(struct gk20a *g, struct channel_gk20a *ch)
1604 engines = gk20a_fifo_engines_on_id(g, tsg->tsgid, true); 1603 engines = gk20a_fifo_engines_on_id(g, tsg->tsgid, true);
1605 } else { 1604 } else {
1606 nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid); 1605 nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid);
1606 engines = g->fifo.deferred_fault_engines;
1607 } 1607 }
1608 1608
1609 if (engines == 0U) { 1609 if (engines == 0U) {
@@ -1724,6 +1724,7 @@ static bool gk20a_fifo_handle_mmu_fault_locked(
1724 1724
1725 if (ctxsw) { 1725 if (ctxsw) {
1726 gk20a_fecs_dump_falcon_stats(g); 1726 gk20a_fecs_dump_falcon_stats(g);
1727 gk20a_gpccs_dump_falcon_stats(g);
1727 nvgpu_err(g, "gr_status_r : 0x%x", 1728 nvgpu_err(g, "gr_status_r : 0x%x",
1728 gk20a_readl(g, gr_status_r())); 1729 gk20a_readl(g, gr_status_r()));
1729 } 1730 }
@@ -2198,9 +2199,9 @@ int gk20a_fifo_tsg_unbind_channel_verify_status(struct channel_gk20a *ch)
2198 struct gk20a *g = ch->g; 2199 struct gk20a *g = ch->g;
2199 2200
2200 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) { 2201 if (gk20a_fifo_channel_status_is_next(g, ch->chid)) {
2201 nvgpu_err(g, "Channel %d to be removed from TSG %d has NEXT set!", 2202 nvgpu_log_info(g, "Channel %d to be removed from TSG %d has NEXT set!",
2202 ch->chid, ch->tsgid); 2203 ch->chid, ch->tsgid);
2203 return -EINVAL; 2204 return -EAGAIN;
2204 }