Back to index

libdrm  2.4.37
Classes | Functions
internal.h File Reference
#include "libkms.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kms_driver
struct  kms_bo

Functions

int linux_create (int fd, struct kms_driver **out)
int vmwgfx_create (int fd, struct kms_driver **out)
int intel_create (int fd, struct kms_driver **out)
int dumb_create (int fd, struct kms_driver **out)
int nouveau_create (int fd, struct kms_driver **out)
int radeon_create (int fd, struct kms_driver **out)

Class Documentation

struct kms_bo

Definition at line 55 of file internal.h.

Collaboration diagram for kms_bo:
Class Members
unsigned handle
struct kms_driver * kms
size_t offset
size_t pitch
void * ptr
size_t size

Function Documentation

int dumb_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 195 of file dumb.c.

{
       struct kms_driver *kms;
       int ret;
       uint64_t cap = 0;

       ret = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &cap);
       if (ret || cap == 0)
              return -EINVAL;

       kms = calloc(1, sizeof(*kms));
       if (!kms)
              return -ENOMEM;

       kms->fd = fd;

       kms->bo_create = dumb_bo_create;
       kms->bo_map = dumb_bo_map;
       kms->bo_unmap = dumb_bo_unmap;
       kms->bo_get_prop = dumb_bo_get_prop;
       kms->bo_destroy = dumb_bo_destroy;
       kms->get_prop = dumb_get_prop;
       kms->destroy = dumb_destroy;
       *out = kms;

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int intel_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 218 of file intel.c.

{
       struct kms_driver *kms;

       kms = calloc(1, sizeof(*kms));
       if (!kms)
              return -ENOMEM;

       kms->fd = fd;

       kms->bo_create = intel_bo_create;
       kms->bo_map = intel_bo_map;
       kms->bo_unmap = intel_bo_unmap;
       kms->bo_get_prop = intel_bo_get_prop;
       kms->bo_destroy = intel_bo_destroy;
       kms->get_prop = intel_get_prop;
       kms->destroy = intel_destroy;
       *out = kms;

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int linux_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 217 of file linux.c.

{
       if (!dumb_create(fd, out))
              return 0;

       if (!linux_from_udev(fd, out))
              return 0;

       return linux_from_sysfs(fd, out);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int nouveau_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 200 of file nouveau.c.

{
       struct kms_driver *kms;

       kms = calloc(1, sizeof(*kms));
       if (!kms)
              return -ENOMEM;

       kms->fd = fd;

       kms->bo_create = nouveau_bo_create;
       kms->bo_map = nouveau_bo_map;
       kms->bo_unmap = nouveau_bo_unmap;
       kms->bo_get_prop = nouveau_bo_get_prop;
       kms->bo_destroy = nouveau_bo_destroy;
       kms->get_prop = nouveau_get_prop;
       kms->destroy = nouveau_destroy;
       *out = kms;

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int radeon_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 222 of file radeon.c.

{
       struct kms_driver *kms;

       kms = calloc(1, sizeof(*kms));
       if (!kms)
              return -ENOMEM;

       kms->fd = fd;

       kms->bo_create = radeon_bo_create;
       kms->bo_map = radeon_bo_map;
       kms->bo_unmap = radeon_bo_unmap;
       kms->bo_get_prop = radeon_bo_get_prop;
       kms->bo_destroy = radeon_bo_destroy;
       kms->get_prop = radeon_get_prop;
       kms->destroy = radeon_destroy;
       *out = kms;

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int vmwgfx_create ( int  fd,
struct kms_driver **  out 
)

Definition at line 188 of file vmwgfx.c.

{
       struct kms_driver *kms;

       kms = calloc(1, sizeof(*kms));
       if (!kms)
              return -ENOMEM;

       kms->fd = fd;

       kms->bo_create = vmwgfx_bo_create;
       kms->bo_map = vmwgfx_bo_map;
       kms->bo_unmap = vmwgfx_bo_unmap;
       kms->bo_get_prop = vmwgfx_bo_get_prop;
       kms->bo_destroy = vmwgfx_bo_destroy;
       kms->get_prop = vmwgfx_get_prop;
       kms->destroy = vmwgfx_destroy;
       *out = kms;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: