aboutsummaryrefslogtreecommitdiffstats
path: root/nvdebug_linux.c
Commit message (Collapse)AuthorAge
* Fix a race condition in nvdebug_{readl,readq,writel,writeq}HEADmasterJoshua Bakita2025-04-04
| | | | | | | | | | | | | | | | | | | When the GPU is powered off, attempts to read any of its registers (such as via nvdebug_readl()) result in a fatal interrupt. The pm_runtime_get() call included in nvdebug sent a request to nvgpu to turn the GPU back on. **However,** this call did not wait for the power-on command to take effect. This resulted in a race between nvdebug and the power management logic, meaning that the GPU may not have powered-on by the time that nvdebug attempted to read its registers. Use pm_runtime_get_sync() instead, which explicitly waits for the power-on command to complete (or fail) before returning. This eliminates the race condition. Thank you to Diego Alejandro Parra Guzman <diego.guzman@tttech-auto.com>, who brought this issue to my attention.
* Remove dependency on Jetson (nvgpu) driver internalsJoshua Bakita2024-09-25
| | | | | | | | | | | | For integrated (Jetson) GPUs: - Directly retrieve and map GPU register region 0 - Directly check GPU power-on state before a register read/write - Resume the GPU as needed for a register read/write Most nvgpu APIs can now be called on TX2+ integrated GPUs without first having to start some task on the GPU to make it non-suspended. Tested on Jetson TX1, TX2, Xavier, and Orin.
* Correctly check for read errors in the nvdebug_read* functionsJoshua Bakita2024-09-19
| | | | Follows how NVIDIA's open-source GPU driver checks for bad reads.
* Linux 5.17+ support and allow including nvdebug.h independentlyJoshua Bakita2024-04-11
- Move Linux-specific functions to nvdebug_linux.h and .c - Workaround PDE_DATA() being pde_data() on Linux 5.17+