Functions
Functions
Graphics » Common » GPU Memory Interfaces
Collaboration diagram for Functions:

## Functions
int | tsi_malloc_init_pool (int pool, void *base_virt, uintptr_t base_phys, int size, int reset)
| Initial memory pool, command list memory malloc base on pool. More...
void * | tsi_malloc_pool (int pool, int size)
| Malloc memory from pool. More...
void | tsi_free (void *ptr)
| Free memory. More...
uintptr_t | tsi_virt2phys (void *addr)
| Free memory. More...

## Detailed Description

## Function Documentation

## ◆ tsi_free()

void tsi_free | ( | void * | ptr | ) |

Free memory.

Parameters

  [in] | ptr | Memory addr

## ◆ tsi_malloc_init_pool()

int tsi_malloc_init_pool | ( | int | pool,
|  | void * | base_virt,
|  | uintptr_t | base_phys,
|  | int | size,
|  | int | reset
| ) |  |

Initial memory pool, command list memory malloc base on pool.

Parameters

  [in] | pool | Pool id, the value is fixed – 0
  [in] | base_virt | Virtual addr, equel physical address
  [in] | base_phys | Physical address
  [in] | size | Pool memory size
  [in] | reset | If 0, reset the memory

Returns
  Return Negative mean initial failure

## ◆ tsi_malloc_pool()

void* tsi_malloc_pool | ( | int | pool,
|  | int | size
| ) |  |

Malloc memory from pool.

Parameters

  [in] | pool | Pool id, the value is fixed – 0
  [in] | size | Malloc size

Returns
  Return the malloc memory addr

## ◆ tsi_virt2phys()

uintptr_t tsi_virt2phys | ( | void * | addr | ) |

Free memory.

Parameters

  [in] | addr | Memory virtual addr, equel physical address

Returns
  Return memory addr