diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/dma.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/dma.h b/drivers/gpu/nvgpu/include/nvgpu/dma.h index 50681f8d..c0397b58 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/dma.h +++ b/drivers/gpu/nvgpu/include/nvgpu/dma.h | |||
@@ -51,6 +51,20 @@ struct nvgpu_mem; | |||
51 | #define NVGPU_DMA_READ_ONLY (1 << 2) | 51 | #define NVGPU_DMA_READ_ONLY (1 << 2) |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * nvgpu_iommuable - Check if GPU is behind IOMMU | ||
55 | * | ||
56 | * @g - The GPU. | ||
57 | * | ||
58 | * Returns true if the passed GPU is behind an IOMMU; false otherwise. If the | ||
59 | * GPU is iommuable then the DMA address in nvgpu_mem_sgl is valid. | ||
60 | * | ||
61 | * Note that even if a GPU is behind an IOMMU that does not necessarily mean the | ||
62 | * GPU _must_ use DMA addresses. GPUs may still use physical addresses if it | ||
63 | * makes sense. | ||
64 | */ | ||
65 | bool nvgpu_iommuable(struct gk20a *g); | ||
66 | |||
67 | /** | ||
54 | * nvgpu_dma_alloc - Allocate DMA memory | 68 | * nvgpu_dma_alloc - Allocate DMA memory |
55 | * | 69 | * |
56 | * @g - The GPU. | 70 | * @g - The GPU. |