diff options
| author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:07:40 -0400 |
|---|---|---|
| committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:10:52 -0400 |
| commit | 2c5337a24f7f2d02989dfb733c55d6d8c7e90493 (patch) | |
| tree | b9f1028cb443b03190b710c0d7ee640bf5958631 | |
| parent | aa06f84f03cba7ad1aae5cd527355bb3d8c152a6 (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.
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 @@ | |||
| 1 | First the internal `include` and `os` directories: | ||
| 2 | ``` | ||
| 3 | cp -r /playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/include/nvgpu/ | ||
| 4 | cp -r /playpen/Linux_for_Tegra/source/public/kernel/nvgpu/drivers/gpu/nvgpu/os include/ | ||
| 5 | ``` | ||
| 6 | |||
| 7 | Then every directory needed by either of those includes: | ||
| 8 | ``` | ||
| 9 | cp -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 | |||
| 22 | Make 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 | } | ||
