GVM User Suite
User tools for the GVM open source project.
Macros | Functions
device.c File Reference
#include <gpu/nvidia/device.h>
#include <utils/device.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
Include dependency graph for device.c:

Go to the source code of this file.

Macros

#define MAKE_DEV(major, minor)    ((dev_t) ((minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12)))
 

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...
 

Macro Definition Documentation

◆ MAKE_DEV

#define MAKE_DEV (   major,
  minor 
)     ((dev_t) ((minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12)))

Definition at line 28 of file device.c.

Function Documentation

◆ nv_open()

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

Opens a Nvidia device.

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.

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.

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: