From 8340d234d78a7d0f46c11a584de538148b78b7cb Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Wed, 25 Sep 2024 15:58:37 -0400 Subject: Remove dependency on Jetson (nvgpu) driver internals 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. --- nvdebug.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nvdebug.h') diff --git a/nvdebug.h b/nvdebug.h index 80f1a74..ca0f514 100644 --- a/nvdebug.h +++ b/nvdebug.h @@ -1470,6 +1470,8 @@ struct nvdebug_state { struct gk20a *g; // Pointer to PCI device needed for pci_iounmap and pci_resource_start struct pci_dev *pcid; + // Pointer to platform device needed for platform_get_resource + struct platform_device *platd; // Pointer to generic device struct (both platform and pcie devices) struct device *dev; }; -- cgit v1.2.2