GVM User Suite
User tools for the GVM open source project.
Functions
device.h File Reference
#include <stdio.h>
#include <stdint.h>
Include dependency graph for device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int nv_open (int32_t major, uint16_t minor, const char *path, const char *proc_path)
 Opens a Nvidia device. More...
 
int nv_open_dev (uint16_t minor)
 Opens a traditional NVIDIA device. More...
 
int nv_open_mdev (uint16_t minor)
 Opens a Mediated NVIDIA device. More...
 

Function Documentation

◆ nv_open()

int nv_open ( int32_t  major,
uint16_t  minor,
const char *  path,
const char *  proc_path 
)

Opens a Nvidia device.

Opens a nvidia device given information.

Parameters
major- Major for the NVIDIA component to use.
minor- Minor for the NVIDIA component to use.
path- Path for the component.
proc_path- Path for the driver params.
Returns
File descriptor for the NVIDIA component.
Possible Failures:
Not Created - Normally this is the case if the NVIDIA driver is not loaded.

Definition at line 33 of file device.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nv_open_dev()

int nv_open_dev ( uint16_t  minor)

Opens a traditional NVIDIA device.

Opens a traditional NVIDIA device given a minor number.

Parameters
minor- Minor to use to open the device.
Returns
File descriptor for the traditional NVIDIA component.
Possible Failures:
Not Created - Normally this is the case if the NVIDIA driver is not loaded.

Definition at line 65 of file device.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nv_open_mdev()

int nv_open_mdev ( uint16_t  minor)

Opens a Mediated NVIDIA device.

Opens a Mediated NVIDIA device given a minor number.

Parameters
minor- Minor to use to open the device.
Returns
File descriptor for the Mediated NVIDIA component.
Possible Failures:
Not Created - Normally this is the case if the NVIDIA driver is not loaded.

Definition at line 82 of file device.c.

Here is the call graph for this function:
Here is the caller graph for this function: