Back to index

libdrm  2.4.37
Classes | Defines | Functions
radeon_bo.h File Reference
#include <stdio.h>
#include <stdint.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  radeon_bo

Defines

#define RADEON_BO_FLAGS_MACRO_TILE   1
#define RADEON_BO_FLAGS_MICRO_TILE   2
#define RADEON_BO_FLAGS_MICRO_TILE_SQUARE   0x20

Functions

void radeon_bo_debug (struct radeon_bo *bo, const char *op)
struct radeon_boradeon_bo_open (struct radeon_bo_manager *bom, uint32_t handle, uint32_t size, uint32_t alignment, uint32_t domains, uint32_t flags)
void radeon_bo_ref (struct radeon_bo *bo)
struct radeon_boradeon_bo_unref (struct radeon_bo *bo)
int radeon_bo_map (struct radeon_bo *bo, int write)
int radeon_bo_unmap (struct radeon_bo *bo)
int radeon_bo_wait (struct radeon_bo *bo)
int radeon_bo_is_busy (struct radeon_bo *bo, uint32_t *domain)
int radeon_bo_set_tiling (struct radeon_bo *bo, uint32_t tiling_flags, uint32_t pitch)
int radeon_bo_get_tiling (struct radeon_bo *bo, uint32_t *tiling_flags, uint32_t *pitch)
int radeon_bo_is_static (struct radeon_bo *bo)
int radeon_bo_is_referenced_by_cs (struct radeon_bo *bo, struct radeon_cs *cs)
uint32_t radeon_bo_get_handle (struct radeon_bo *bo)
uint32_t radeon_bo_get_src_domain (struct radeon_bo *bo)

Class Documentation

struct radeon_bo

Definition at line 47 of file radeon.c.

Class Members
uint32_t flags
uint32_t handle
unsigned map_count
void * ptr
uint32_t size

Define Documentation

Definition at line 37 of file radeon_bo.h.

Definition at line 38 of file radeon_bo.h.

Definition at line 39 of file radeon_bo.h.


Function Documentation

void radeon_bo_debug ( struct radeon_bo bo,
const char *  op 
)

Definition at line 35 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;

    fprintf(stderr, "%s %p 0x%08X 0x%08X 0x%08X\n",
            op, bo, bo->handle, boi->size, boi->cref);
}
uint32_t radeon_bo_get_handle ( struct radeon_bo bo)

Definition at line 126 of file radeon_bo.c.

{
    return bo->handle;
}
uint32_t radeon_bo_get_src_domain ( struct radeon_bo bo)

Definition at line 131 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    uint32_t src_domain;

    src_domain = boi->space_accounted & 0xffff;
    if (!src_domain)
        src_domain = boi->space_accounted >> 16;

    return src_domain;
}
int radeon_bo_get_tiling ( struct radeon_bo bo,
uint32_t *  tiling_flags,
uint32_t *  pitch 
)

Definition at line 105 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->bom->funcs->bo_get_tiling(boi, tiling_flags, pitch);
}
int radeon_bo_is_busy ( struct radeon_bo bo,
uint32_t *  domain 
)

Definition at line 92 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->bom->funcs->bo_is_busy(boi, domain);
}
int radeon_bo_is_referenced_by_cs ( struct radeon_bo bo,
struct radeon_cs cs 
)

Definition at line 120 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->cref > 1;
}
int radeon_bo_is_static ( struct radeon_bo bo)

Definition at line 112 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    if (boi->bom->funcs->bo_is_static)
        return boi->bom->funcs->bo_is_static(boi);
    return 0;
}

Here is the caller graph for this function:

int radeon_bo_map ( struct radeon_bo bo,
int  write 
)

Definition at line 72 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->bom->funcs->bo_map(boi, write);
}
struct radeon_bo* radeon_bo_open ( struct radeon_bo_manager bom,
uint32_t  handle,
uint32_t  size,
uint32_t  alignment,
uint32_t  domains,
uint32_t  flags 
) [read]

Definition at line 43 of file radeon_bo.c.

{
    struct radeon_bo *bo;
    bo = bom->funcs->bo_open(bom, handle, size, alignment, domains, flags);
    return bo;
}
void radeon_bo_ref ( struct radeon_bo bo)

Definition at line 55 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    boi->cref++;
    boi->bom->funcs->bo_ref(boi);
}

Here is the caller graph for this function:

int radeon_bo_set_tiling ( struct radeon_bo bo,
uint32_t  tiling_flags,
uint32_t  pitch 
)

Definition at line 98 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->bom->funcs->bo_set_tiling(boi, tiling_flags, pitch);
}
int radeon_bo_unmap ( struct radeon_bo bo)

Definition at line 78 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    return boi->bom->funcs->bo_unmap(boi);
}
struct radeon_bo* radeon_bo_unref ( struct radeon_bo bo) [read]

Definition at line 62 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    if (bo == NULL)
        return NULL;

    boi->cref--;
    return boi->bom->funcs->bo_unref(boi);
}

Here is the caller graph for this function:

int radeon_bo_wait ( struct radeon_bo bo)

Definition at line 84 of file radeon_bo.c.

{
    struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
    if (!boi->bom->funcs->bo_wait)
        return 0;
    return boi->bom->funcs->bo_wait(boi);
}