Back to index

libdrm  2.4.37
Functions
radeon_bo_gem.h File Reference
#include "radeon_bo.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct radeon_bo_managerradeon_bo_manager_gem_ctor (int fd)
void radeon_bo_manager_gem_dtor (struct radeon_bo_manager *bom)
uint32_t radeon_gem_name_bo (struct radeon_bo *bo)
void * radeon_gem_get_reloc_in_cs (struct radeon_bo *bo)
int radeon_gem_set_domain (struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain)
int radeon_gem_get_kernel_name (struct radeon_bo *bo, uint32_t *name)

Function Documentation

struct radeon_bo_manager* radeon_bo_manager_gem_ctor ( int  fd) [read]

Definition at line 286 of file radeon_bo_gem.c.

{
    struct bo_manager_gem *bomg;

    bomg = (struct bo_manager_gem*)calloc(1, sizeof(struct bo_manager_gem));
    if (bomg == NULL) {
        return NULL;
    }
    bomg->base.funcs = &bo_gem_funcs;
    bomg->base.fd = fd;
    return (struct radeon_bo_manager*)bomg;
}

Definition at line 299 of file radeon_bo_gem.c.

{
    struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom;

    if (bom == NULL) {
        return;
    }
    free(bomg);
}
int radeon_gem_get_kernel_name ( struct radeon_bo bo,
uint32_t *  name 
)

Definition at line 321 of file radeon_bo_gem.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    struct drm_gem_flink flink;
    int r;

    flink.handle = bo->handle;
    r = drmIoctl(boi->bom->fd, DRM_IOCTL_GEM_FLINK, &flink);
    if (r) {
        return r;
    }
    *name = flink.name;
    return 0;
}

Here is the call graph for this function:

void* radeon_gem_get_reloc_in_cs ( struct radeon_bo bo)

Definition at line 315 of file radeon_bo_gem.c.

{
    struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
    return &bo_gem->reloc_in_cs;
}

Here is the caller graph for this function:

uint32_t radeon_gem_name_bo ( struct radeon_bo bo)

Definition at line 309 of file radeon_bo_gem.c.

{
    struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
    return bo_gem->name;
}
int radeon_gem_set_domain ( struct radeon_bo bo,
uint32_t  read_domains,
uint32_t  write_domain 
)

Definition at line 336 of file radeon_bo_gem.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    struct drm_radeon_gem_set_domain args;
    int r;

    args.handle = bo->handle;
    args.read_domains = read_domains;
    args.write_domain = write_domain;

    r = drmCommandWriteRead(boi->bom->fd,
                            DRM_RADEON_GEM_SET_DOMAIN,
                            &args,
                            sizeof(args));
    return r;
}

Here is the call graph for this function: