![]() |
GVM User Suite
User tools for the GVM open source project.
|
#include <gpu/nvidia/resman/api.h>#include <gpu/nvidia/resman/classes.h>#include <gpu/nvidia/resman/ioctl.h>#include <gpu/nvidia/resman/types.h>#include <gpu/nvidia/resources.h>#include <gpu/mdev.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>
Go to the source code of this file.
Functions | |
| uint8_t | rm_version_check (int ctl_fd, uint8_t ignore_version, const char *version) |
| Version check for the RM API. More... | |
| struct NvResource * | rm_alloc_res (int fd, struct NvResource *parent, uint32_t object, uint32_t rm_class, void *data) |
| Allocates a Node for a resource. More... | |
| uint8_t | rm_free_res (int fd, struct NvResource *object) |
| Frees a Node for a Resource. More... | |
| void | rm_free_tree (int fd, struct NvResource *root) |
| Frees a resource tree for the system. More... | |
| void * | rm_ctrl_res (int fd, uint32_t client, uint32_t device, uint32_t command, void *data, uint32_t size) |
| Control resource command. More... | |
| uint8_t | rm_alloc_os_event (int fd, uint32_t client_id, uint32_t device_id) |
| Allocates an Operating System Event. More... | |
| uint8_t rm_alloc_os_event | ( | int | fd, |
| uint32_t | client_id, | ||
| uint32_t | device_id | ||
| ) |
| struct NvResource* rm_alloc_res | ( | int | fd, |
| struct NvResource * | parent, | ||
| uint32_t | object, | ||
| uint32_t | rm_class, | ||
| void * | data | ||
| ) |
Allocates a Node for a resource.
Invalid File Descriptor - Occurs when fd is -1.
Incorrect File Descriptor - Occurs when fd is an incorrect descriptor.
Definition at line 65 of file api.c.

| void* rm_ctrl_res | ( | int | fd, |
| uint32_t | client, | ||
| uint32_t | device, | ||
| uint32_t | command, | ||
| void * | data, | ||
| uint32_t | size | ||
| ) |
Control resource command.
Invalid File Descriptor - Occurs when fd is -1.
Incorrect File Descriptor - Occurs when the fd is an incorrect file descriptor.
RM Failure - Occurs when incorrect information is placed.
Definition at line 164 of file api.c.

| uint8_t rm_free_res | ( | int | fd, |
| struct NvResource * | object | ||
| ) |
Frees a Node for a Resource.
Invalid File Descriptor - Occurs when fd is -1.
Incorrect File Descriptor - Occurs when the fd is an incorrect file descriptor.
Definition at line 124 of file api.c.

| void rm_free_tree | ( | int | fd, |
| struct NvResource * | root | ||
| ) |
Frees a resource tree for the system.
This is a mechanism by which we can free an entire tree.
| fd | - File for deallocating the device on. |
| root | - Root we are deallocating from. |
Definition at line 138 of file api.c.


| uint8_t rm_version_check | ( | int | ctl_fd, |
| uint8_t | ignore_version, | ||
| const char * | version | ||
| ) |
Version check for the RM API.
Invalid File Descriptor - This occurs when ctl_fd is -1.
Invalid RM Version - This will occur when there is a mismatch on the driver and the user suite.
Seg Fault - This occurs if version is not pointing to NULL but is pointing to a previously allocated memory address.
Definition at line 39 of file api.c.
