|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
#include "DmaDriver.h"Classes | |
| struct | GpuNvidiaData |
| struct GpuNvidiaData - Represents NVIDIA GPU memory data. More... | |
Macros | |
| #define | GPU_Add_Nvidia_Memory 0x8002 |
| GPU command codes. | |
| #define | GPU_Rem_Nvidia_Memory 0x8003 |
| #define | GPU_Set_Write_Enable 0x8004 |
| #define | GPU_Is_Gpu_Async_Supp 0x8005 |
| #define | GPU_Get_Gpu_Async_Ver 0x8006 |
| #define | GPU_Get_Max_Buffers 0x8007 |
Functions | |
| static ssize_t | gpuAddNvidiaMemory (int32_t fd, uint32_t write, uint64_t address, uint32_t size) |
| gpuAddNvidiaMemory - Adds a NVIDIA GPU memory region. | |
| static ssize_t | gpuRemNvidiaMemory (int32_t fd) |
| gpuRemNvidiaMemory - Removes a NVIDIA GPU memory region. | |
| static ssize_t | gpuSetWriteEn (int32_t fd, uint32_t idx) |
| gpuSetWriteEn - Set write enable for buffer @dev: pointer to the DMA device structure | |
| static bool | gpuIsGpuAsyncSupported (int32_t fd) |
| gpuIsGpuAsyncSupported - Check if the firmware supports GPU Async @fd: File descriptor for the device | |
| static uint32_t | gpuGetGpuAsyncVersion (int32_t fd) |
| gpuGetGpuAsyncVersion - Get the version of GpuAsyncCore in the firmware @fd: File descriptor for the device | |
| static uint32_t | gpuGetMaxBuffers (int32_t fd) |
| gpuGetMaxBuffers - Get the max number of DMA buffers @fd: File descriptor for the device | |
| #define GPU_Add_Nvidia_Memory 0x8002 |
GPU command codes.
Description: Provides definitions and inline functions for utilizing GPU asynchronous features within the aes_stream_drivers package.
This code is specifically designed for managing NVIDIA GPU memory in a Linux kernel module, offering functionality to add and remove memory
This file is part of the aes_stream_drivers package. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the aes_stream_drivers package, including this file, may be copied, modified, propagated, or distributed except according to the terms
| #define GPU_Get_Gpu_Async_Ver 0x8006 |
| #define GPU_Get_Max_Buffers 0x8007 |
| #define GPU_Is_Gpu_Async_Supp 0x8005 |
| #define GPU_Rem_Nvidia_Memory 0x8003 |
| #define GPU_Set_Write_Enable 0x8004 |
|
inlinestatic |
gpuAddNvidiaMemory - Adds a NVIDIA GPU memory region.
@fd: File descriptor for the device. @write: Write access flag (1 for write access, 0 for read-only). @address: Memory address of the GPU region to add. @size: Size of the memory region to add. This must be a multiple of 64kb
This function adds a specified memory region to the NVIDIA GPU, allowing for the region to be accessed as specified by the write flag.
Return: On success, returns the result of the ioctl call. On failure, returns a negative error code. Returns -ENOTSUPP if the firmware does not support GPUDirect.
|
inlinestatic |
gpuGetGpuAsyncVersion - Get the version of GpuAsyncCore in the firmware @fd: File descriptor for the device
Return: Returns the version of GpuAsyncCore, or 0 if not supported. Returns -ENOTSUPP if the driver was compiled without GPUAsync support.
|
inlinestatic |
gpuGetMaxBuffers - Get the max number of DMA buffers @fd: File descriptor for the device
Return: Returns the number of DMA buffers available for use. Returns -ENOTSUPP if the driver was compiled without GPUAsync support.
|
inlinestatic |
gpuIsGpuAsyncSupported - Check if the firmware supports GPU Async @fd: File descriptor for the device
Return: 1 if the firmware and driver supports GPU Async, 0 if it doesn't.
|
inlinestatic |
gpuRemNvidiaMemory - Removes a NVIDIA GPU memory region.
@fd: File descriptor for the device.
This function removes a previously added memory region from the NVIDIA GPU, ceasing its accessibility.
Return: On success, returns the result of the ioctl call. On failure, returns a negative error code. Returns -ENOTSUPP if the firmware does not support GPUDirect.
|
inlinestatic |
gpuSetWriteEn - Set write enable for buffer @dev: pointer to the DMA device structure
This function enables a DMA buffer for DMA operations.
Return: 0 on success, negative error code on failure. Returns -ENOTSUPP if the firmware does not support GPUDirect.