Tizen HAL API  1.0
TBM

The TBM provides functions for managing graphic buffer.

Required Header

#include <hal-tbm.h>

Overview

The TBM functions provides an managing interface of the graphic buffer including:

For more information on the TBM features and the macros, see HAL TBM programming guides and tutorials.

Typedefs

typedef struct
_hal_tbm_backend_data 
hal_tbm_backend_data
 The structure type of the tbm backend data.
typedef struct
_hal_tbm_bufmgr_funcs 
hal_tbm_bufmgr_funcs
 The structure type of the TBM HAL's buffer management functions of backend.
typedef struct
_hal_tbm_surface_funcs 
hal_tbm_surface_funcs
 The structure type of the TBM HAL's surface functions of backend.
typedef struct _hal_tbm_bo_funcs hal_tbm_bo_funcs
 The structure type of the TBM HAL's buffer object functions of backend.
typedef hal_tbm_error(* hal_tbm_authenticated_drm_fd_handler )(hal_tbm_fd auth_fd, void *user_data)
 The Event handler function when drm file descriptor is authernticated.
typedef struct
_hal_tbm_surface_buffer_data 
hal_tbm_surface_buffer_data
 Definition for the buffer data of hal_tbm_surface.
typedef union _hal_tbm_bo_handle hal_tbm_bo_handle
 hal_tbm_bo_handle abstraction of the memory handle by hal_tbm_bo_device_type
typedef void hal_tbm_backend
 Definition for hal_tbm_backend handle.
typedef void hal_tbm_bufmgr
 Definition for hal_tbm_bufmgr handle created by hal tbm backend.
typedef void hal_tbm_surface
 Definition for the tizen surface object.
typedef void hal_tbm_bo
 Definition for the tizen buffer object.
typedef void hal_tbm_native_display
 Definition for native display (wl_display in tizen)
typedef int32_t hal_tbm_fd
 Definition for the file descriptor of the system buffer manager.
typedef uint32_t hal_tbm_key
 Definition for the key associated with the buffer object.
typedef struct _hal_tbm_surface * hal_tbm_surface_h
 Definition for the Tizen buffer surface.
typedef uint32_t hal_tbm_format
 Definition for the Tizen buffer surface format.

Defines

#define HAL_TBM_FORMAT_C8   __hal_tbm_fourcc_code('C', '8', ' ', ' ')
 Definition for the TBM surface format C8 ([7:0] C).
#define HAL_TBM_FORMAT_RGB332   __hal_tbm_fourcc_code('R', 'G', 'B', '8')
 Definition for the TBM surface format RGB322 ([7:0] R:G:B 3:3:2).
#define HAL_TBM_FORMAT_BGR233   __hal_tbm_fourcc_code('B', 'G', 'R', '8')
 Definition for the TBM surface format RGB233 ([7:0] B:G:R 2:3:3).
#define HAL_TBM_FORMAT_XRGB4444   __hal_tbm_fourcc_code('X', 'R', '1', '2')
 Definition for the TBM surface format XRGB4444 ([15:0] x:R:G:B 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_XBGR4444   __hal_tbm_fourcc_code('X', 'B', '1', '2')
 Definition for the TBM surface format XBRG4444 ([15:0] x:B:G:R 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_RGBX4444   __hal_tbm_fourcc_code('R', 'X', '1', '2')
 Definition for the TBM surface format RGBX4444 ([15:0] R:G:B:x 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_BGRX4444   __hal_tbm_fourcc_code('B', 'X', '1', '2')
 Definition for the TBM surface format BGRX4444 ([15:0] B:G:R:x 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_ARGB4444   __hal_tbm_fourcc_code('A', 'R', '1', '2')
 Definition for the TBM surface format ARGB4444 ([15:0] A:R:G:B 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_ABGR4444   __hal_tbm_fourcc_code('A', 'B', '1', '2')
 Definition for the TBM surface format ABGR4444 ([15:0] A:B:G:R 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_RGBA4444   __hal_tbm_fourcc_code('R', 'A', '1', '2')
 Definition for the TBM surface format RGBA4444 ([15:0] R:G:B:A 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_BGRA4444   __hal_tbm_fourcc_code('B', 'A', '1', '2')
 Definition for the TBM surface format BGRA4444 ([15:0] B:G:R:A 4:4:4:4 little endian).
#define HAL_TBM_FORMAT_XRGB1555   __hal_tbm_fourcc_code('X', 'R', '1', '5')
 Definition for the TBM surface format XRGB1555 ([15:0] x:R:G:B 1:5:5:5 little endian).
#define HAL_TBM_FORMAT_XBGR1555   __hal_tbm_fourcc_code('X', 'B', '1', '5')
 Definition for the TBM surface format XBGR1555 ([15:0] x:B:G:R 1:5:5:5 little endian).
#define HAL_TBM_FORMAT_RGBX5551   __hal_tbm_fourcc_code('R', 'X', '1', '5')
 Definition for the TBM surface format RGBX5551 ([15:0] R:G:B:x 5:5:5:1 little endian).
#define HAL_TBM_FORMAT_BGRX5551   __hal_tbm_fourcc_code('B', 'X', '1', '5')
 Definition for the TBM surface format BGRX5551 ([15:0] B:G:R:x 5:5:5:1 little endian).
#define HAL_TBM_FORMAT_ARGB1555   __hal_tbm_fourcc_code('A', 'R', '1', '5')
 Definition for the TBM surface format ARGB1555 ([15:0] A:R:G:B 1:5:5:5 little endian).
#define HAL_TBM_FORMAT_ABGR1555   __hal_tbm_fourcc_code('A', 'B', '1', '5')
 Definition for the TBM surface format ABGR1555 ([15:0] A:B:G:R 1:5:5:5 little endian).
#define HAL_TBM_FORMAT_RGBA5551   __hal_tbm_fourcc_code('R', 'A', '1', '5')
 Definition for the TBM surface format RGBA5551 ([15:0] R:G:B:A 5:5:5:1 little endian).
#define HAL_TBM_FORMAT_BGRA5551   __hal_tbm_fourcc_code('B', 'A', '1', '5')
 Definition for the TBM surface format BGRA5551 ([15:0] B:G:R:A 5:5:5:1 little endian).
#define HAL_TBM_FORMAT_RGB565   __hal_tbm_fourcc_code('R', 'G', '1', '6')
 Definition for the TBM surface format RGB565 ([15:0] R:G:B 5:6:5 little endian).
#define HAL_TBM_FORMAT_BGR565   __hal_tbm_fourcc_code('B', 'G', '1', '6')
 Definition for the TBM surface format BGR565 ([15:0] B:G:R 5:6:5 little endian).
#define HAL_TBM_FORMAT_RGB888   __hal_tbm_fourcc_code('R', 'G', '2', '4')
 Definition for the TBM surface format RGB888 ([23:0] R:G:B little endian).
#define HAL_TBM_FORMAT_BGR888   __hal_tbm_fourcc_code('B', 'G', '2', '4')
 Definition for the TBM surface format BGR888 ([23:0] B:G:R little endian).
#define HAL_TBM_FORMAT_XRGB8888   __hal_tbm_fourcc_code('X', 'R', '2', '4')
 Definition for the TBM surface format XRGB8888 ([31:0] x:R:G:B 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_XBGR8888   __hal_tbm_fourcc_code('X', 'B', '2', '4')
 Definition for the TBM surface format XBGR8888 ([31:0] x:B:G:R 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_RGBX8888   __hal_tbm_fourcc_code('R', 'X', '2', '4')
 Definition for the TBM surface format RGBX8888 ([31:0] R:G:B:x 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_BGRX8888   __hal_tbm_fourcc_code('B', 'X', '2', '4')
 Definition for the TBM surface format BGRX8888 ([31:0] B:G:R:x 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_ARGB8888   __hal_tbm_fourcc_code('A', 'R', '2', '4')
 Definition for the TBM surface format ARGB8888 ([31:0] A:R:G:B 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_ABGR8888   __hal_tbm_fourcc_code('A', 'B', '2', '4')
 Definition for the TBM surface format ABGR8888 ([31:0] [31:0] A:B:G:R 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_RGBA8888   __hal_tbm_fourcc_code('R', 'A', '2', '4')
 Definition for the TBM surface format RGBA8888 ([31:0] R:G:B:A 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_BGRA8888   __hal_tbm_fourcc_code('B', 'A', '2', '4')
 Definition for the TBM surface format BGRA8888 ([31:0] B:G:R:A 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_XRGB2101010   __hal_tbm_fourcc_code('X', 'R', '3', '0')
 Definition for the TBM surface format XRGB2101010 ([31:0] x:R:G:B 2:10:10:10 little endian).
#define HAL_TBM_FORMAT_XBGR2101010   __hal_tbm_fourcc_code('X', 'B', '3', '0')
 Definition for the TBM surface format XBGR2101010 ([31:0] x:B:G:R 2:10:10:10 little endian).
#define HAL_TBM_FORMAT_RGBX1010102   __hal_tbm_fourcc_code('R', 'X', '3', '0')
 Definition for the TBM surface format RGBX1010102 ([31:0] R:G:B:x 10:10:10:2 little endian).
#define HAL_TBM_FORMAT_BGRX1010102   __hal_tbm_fourcc_code('B', 'X', '3', '0')
 Definition for the TBM surface format BGRX1010102 ([31:0] B:G:R:x 10:10:10:2 little endian).
#define HAL_TBM_FORMAT_ARGB2101010   __hal_tbm_fourcc_code('A', 'R', '3', '0')
 Definition for the TBM surface format ARGB2101010 ([31:0] A:R:G:B 2:10:10:10 little endian).
#define HAL_TBM_FORMAT_ABGR2101010   __hal_tbm_fourcc_code('A', 'B', '3', '0')
 Definition for the TBM surface format ABGR2101010 ([31:0] A:B:G:R 2:10:10:10 little endian).
#define HAL_TBM_FORMAT_RGBA1010102   __hal_tbm_fourcc_code('R', 'A', '3', '0')
 Definition for the TBM surface format RGBA1010102 ([31:0] R:G:B:A 10:10:10:2 little endian).
#define HAL_TBM_FORMAT_BGRA1010102   __hal_tbm_fourcc_code('B', 'A', '3', '0')
 Definition for the TBM surface format BGRA1010102 ([31:0] B:G:R:A 10:10:10:2 little endian).
#define HAL_TBM_FORMAT_YUYV   __hal_tbm_fourcc_code('Y', 'U', 'Y', 'V')
 Definition for the TBM surface format YUYV ([31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_YVYU   __hal_tbm_fourcc_code('Y', 'V', 'Y', 'U')
 Definition for the TBM surface format YVYU ([31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_UYVY   __hal_tbm_fourcc_code('U', 'Y', 'V', 'Y')
 Definition for the TBM surface format UYVY ([31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_VYUY   __hal_tbm_fourcc_code('V', 'Y', 'U', 'Y')
 Definition for the TBM surface format VYUY ([31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_AYUV   __hal_tbm_fourcc_code('A', 'Y', 'U', 'V')
 Definition for the TBM surface format AYUV ([31:0] A:Y:Cb:Cr 8:8:8:8 little endian).
#define HAL_TBM_FORMAT_NV12   __hal_tbm_fourcc_code('N', 'V', '1', '2')
 Definition for the TBM surface format NV12 (2x2 subsampled Cr:Cb plane).
#define HAL_TBM_FORMAT_NV21   __hal_tbm_fourcc_code('N', 'V', '2', '1')
 Definition for the TBM surface format NV21 (2x2 subsampled Cb:Cr plane).
#define HAL_TBM_FORMAT_NV16   __hal_tbm_fourcc_code('N', 'V', '1', '6')
 Definition for the TBM surface format NV16 (2x1 subsampled Cr:Cb plane).
#define HAL_TBM_FORMAT_NV61   __hal_tbm_fourcc_code('N', 'V', '6', '1')
 Definition for the TBM surface format NV61 (2x1 subsampled Cb:Cr plane).
#define HAL_TBM_FORMAT_YUV410   __hal_tbm_fourcc_code('Y', 'U', 'V', '9')
 Definition for the TBM surface format YUV410 (4x4 subsampled Cb (1) and Cr (2) planes).
#define HAL_TBM_FORMAT_YVU410   __hal_tbm_fourcc_code('Y', 'V', 'U', '9')
 Definition for the TBM surface format YVU410 (4x4 subsampled Cr (1) and Cb (2) planes).
#define HAL_TBM_FORMAT_YUV411   __hal_tbm_fourcc_code('Y', 'U', '1', '1')
 Definition for the TBM surface format YUV411 (4x1 subsampled Cb (1) and Cr (2) planes).
#define HAL_TBM_FORMAT_YVU411   __hal_tbm_fourcc_code('Y', 'V', '1', '1')
 Definition for the TBM surface format YVU411 (4x1 subsampled Cr (1) and Cb (2) planes).
#define HAL_TBM_FORMAT_YUV420   __hal_tbm_fourcc_code('Y', 'U', '1', '2')
 Definition for the TBM surface format YUV420 (2x2 subsampled Cb (1) and Cr (2) planes).
#define HAL_TBM_FORMAT_YVU420   __hal_tbm_fourcc_code('Y', 'V', '1', '2')
 Definition for the TBM surface format YVU420 (2x2 subsampled Cr (1) and Cb (2) planes).
#define HAL_TBM_FORMAT_YUV422   __hal_tbm_fourcc_code('Y', 'U', '1', '6')
 Definition for the TBM surface format YUV422 (2x1 subsampled Cb (1) and Cr (2) planes).
#define HAL_TBM_FORMAT_YVU422   __hal_tbm_fourcc_code('Y', 'V', '1', '6')
 Definition for the TBM surface format YVU422 (2x1 subsampled Cr (1) and Cb (2) planes).
#define HAL_TBM_FORMAT_YUV444   __hal_tbm_fourcc_code('Y', 'U', '2', '4')
 Definition for the TBM surface format YUV444 (non-subsampled Cb (1) and Cr (2) planes).
#define HAL_TBM_FORMAT_YVU444   __hal_tbm_fourcc_code('Y', 'V', '2', '4')
 Definition for the TBM surface format YVU444 (non-subsampled Cr (1) and Cb (2) planes).
#define HAL_TBM_FORMAT_NV12MT   __hal_tbm_fourcc_code('T', 'M', '1', '2')
 Definition for the TBM surface format NV12MT (tiled '64x32' & multi-plane version of NV12).

Data Structure Documentation

struct _hal_tbm_backend_data

The structure type of the tbm backend data.

Since:
HAL_MODULE_TBM 1.0

Data Fields

hal_tbm_bufmgrbufmgr
int has_drm_device
hal_tbm_bufmgr_funcsbufmgr_funcs
hal_tbm_surface_funcssurface_funcs
hal_tbm_bo_funcsbo_funcs
hal_tbm_fd drm_fd
int is_master
hal_tbm_authenticated_drm_fd_handler auth_drm_fd_func
void * user_data

Field Documentation

The Event handler function when drm file descriptor is authernticated.

The TBM Buffer Object's functions of backend

The buffer manager's functions of backend

The drm file descriptor

The flag of having drm device or not

The flag of master or not

The TBM Surface's functions of backend

The user data for callback

struct _hal_tbm_bufmgr_funcs

The structure type of the TBM HAL's buffer management functions of backend.

Since:
HAL_MODULE_TBM 1.0

Data Fields

hal_tbm_bufmgr_capability(* bufmgr_get_capabilities )(hal_tbm_bufmgr *bufmgr, hal_tbm_error *error)
hal_tbm_error(* bufmgr_get_supported_formats )(hal_tbm_bufmgr *bufmgr, uint32_t **formats, uint32_t *num)
hal_tbm_error(* bufmgr_get_plane_data )(hal_tbm_bufmgr *bufmgr, hal_tbm_format format, int plane_idx, int width, int height, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx)
hal_tbm_surface *(* bufmgr_alloc_surface )(hal_tbm_bufmgr *bufmgr, uint32_t width, uint32_t height, hal_tbm_format format, hal_tbm_bo_memory_type mem_types, uint64_t *modifiers, uint32_t num_modifiers, hal_tbm_error *error)
hal_tbm_surface *(* bufmgr_import_surface )(hal_tbm_bufmgr *bufmgr, uint32_t width, uint32_t height, hal_tbm_format format, hal_tbm_surface_buffer_data *buffer_data, hal_tbm_error *error)
hal_tbm_bo *(* bufmgr_alloc_bo )(hal_tbm_bufmgr *bufmgr, unsigned int size, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error)
hal_tbm_bo *(* bufmgr_alloc_bo_with_format )(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, int bpp, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error)
hal_tbm_bo *(* bufmgr_import_fd )(hal_tbm_bufmgr *bufmgr, hal_tbm_fd fd, hal_tbm_error *error)
hal_tbm_bo *(* bufmgr_import_key )(hal_tbm_bufmgr *bufmgr, hal_tbm_key key, hal_tbm_error *error)

Field Documentation

Allocate the buffer object.

hal_tbm_bo*(* _hal_tbm_bufmgr_funcs::bufmgr_alloc_bo_with_format)(hal_tbm_bufmgr *bufmgr, int format, int bo_idx, int width, int height, int bpp, hal_tbm_bo_memory_type mem_types, hal_tbm_error *error)

Allocate the buffer object at buffer object index in surface according to the format.

hal_tbm_surface*(* _hal_tbm_bufmgr_funcs::bufmgr_alloc_surface)(hal_tbm_bufmgr *bufmgr, uint32_t width, uint32_t height, hal_tbm_format format, hal_tbm_bo_memory_type mem_types, uint64_t *modifiers, uint32_t num_modifiers, hal_tbm_error *error)

Allocate the surface according to the color format.

Get the capabilities of a buffer manager

hal_tbm_error(* _hal_tbm_bufmgr_funcs::bufmgr_get_plane_data)(hal_tbm_bufmgr *bufmgr, hal_tbm_format format, int plane_idx, int width, int height, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx)

Get plane's information from TBM buffer manager HAL according to the color format

Get supported color format from TBM buffer manager.

Import the buffer object associated with the tbm_fd(prime fd).

Import the buffer object associated with the tbm_key

Import the surface according to the format.

struct _hal_tbm_surface_funcs

The structure type of the TBM HAL's surface functions of backend.

Since:
HAL_MODULE_TBM 1.0

Data Fields

void(* surface_free )(hal_tbm_surface *surface)
hal_tbm_bo **(* surface_get_bos )(hal_tbm_surface *surface, int *num_bos, hal_tbm_error *error)
hal_tbm_error(* surface_get_plane_data )(hal_tbm_surface *surface, int plane_idx, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx)
hal_tbm_surface_buffer_data *(* surface_export )(hal_tbm_surface *surface, hal_tbm_error *error)

Field Documentation

Export a buffer_data of tbm_surface.

Deallocate tbm_surface using backend's surface free function.

Get the number of buffer objects associated with the tbm_surface.

hal_tbm_error(* _hal_tbm_surface_funcs::surface_get_plane_data)(hal_tbm_surface *surface, int plane_idx, uint32_t *size, uint32_t *offset, uint32_t *pitch, int *bo_idx)

Get size, offset, pitch, buffer object index related with plane_index from tbm_surface.

struct _hal_tbm_bo_funcs

The structure type of the TBM HAL's buffer object functions of backend.

Since:
HAL_MODULE_TBM 1.0

Data Fields

void(* bo_free )(hal_tbm_bo *bo)
int(* bo_get_size )(hal_tbm_bo *bo, hal_tbm_error *error)
hal_tbm_bo_memory_type(* bo_get_memory_types )(hal_tbm_bo *bo, hal_tbm_error *error)
hal_tbm_bo_handle(* bo_get_handle )(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_error *error)
hal_tbm_bo_handle(* bo_map )(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_bo_access_option opt, hal_tbm_error *error)
hal_tbm_error(* bo_unmap )(hal_tbm_bo *bo)
hal_tbm_error(* bo_lock )(hal_tbm_bo *bo, hal_tbm_bo_device_type device, hal_tbm_bo_access_option opt)
hal_tbm_error(* bo_unlock )(hal_tbm_bo *bo)
hal_tbm_fd(* bo_export_fd )(hal_tbm_bo *bo, hal_tbm_error *error)
hal_tbm_key(* bo_export_key )(hal_tbm_bo *bo, hal_tbm_error *error)

Field Documentation

Export file descriptor used by the buffer object

Export tbm_key used by the buffer object

Free the buffer object.

Get the handle of TBM buffer object according to the device type.

Get the memory type of buffer object

Get the size of a buffer object.

Map the buffer object according to the device type and the option.

Unlock the buffer object.

Unmap the buffer object.

struct _hal_tbm_surface_buffer_data

Definition for the buffer data of hal_tbm_surface.

Since:
HAL_MODULE_TBM 1.0

Data Fields

int * fds
unsigned int num_fds
int * meta_data
unsigned int num_meta_data
void * reserved1
void * reserved2

Field Documentation

an array of dmabuf fds

an array of meta data

the number of dmabuf fds

the number of meta data

union _hal_tbm_bo_handle

hal_tbm_bo_handle abstraction of the memory handle by hal_tbm_bo_device_type

Since:
HAL_MODULE_TBM 1.0

Define Documentation

#define HAL_TBM_FORMAT_ABGR1555   __hal_tbm_fourcc_code('A', 'B', '1', '5')

Definition for the TBM surface format ABGR1555 ([15:0] A:B:G:R 1:5:5:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ABGR2101010   __hal_tbm_fourcc_code('A', 'B', '3', '0')

Definition for the TBM surface format ABGR2101010 ([31:0] A:B:G:R 2:10:10:10 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ABGR4444   __hal_tbm_fourcc_code('A', 'B', '1', '2')

Definition for the TBM surface format ABGR4444 ([15:0] A:B:G:R 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ABGR8888   __hal_tbm_fourcc_code('A', 'B', '2', '4')

Definition for the TBM surface format ABGR8888 ([31:0] [31:0] A:B:G:R 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ARGB1555   __hal_tbm_fourcc_code('A', 'R', '1', '5')

Definition for the TBM surface format ARGB1555 ([15:0] A:R:G:B 1:5:5:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ARGB2101010   __hal_tbm_fourcc_code('A', 'R', '3', '0')

Definition for the TBM surface format ARGB2101010 ([31:0] A:R:G:B 2:10:10:10 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ARGB4444   __hal_tbm_fourcc_code('A', 'R', '1', '2')

Definition for the TBM surface format ARGB4444 ([15:0] A:R:G:B 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_ARGB8888   __hal_tbm_fourcc_code('A', 'R', '2', '4')

Definition for the TBM surface format ARGB8888 ([31:0] A:R:G:B 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_AYUV   __hal_tbm_fourcc_code('A', 'Y', 'U', 'V')

Definition for the TBM surface format AYUV ([31:0] A:Y:Cb:Cr 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGR233   __hal_tbm_fourcc_code('B', 'G', 'R', '8')

Definition for the TBM surface format RGB233 ([7:0] B:G:R 2:3:3).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGR565   __hal_tbm_fourcc_code('B', 'G', '1', '6')

Definition for the TBM surface format BGR565 ([15:0] B:G:R 5:6:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGR888   __hal_tbm_fourcc_code('B', 'G', '2', '4')

Definition for the TBM surface format BGR888 ([23:0] B:G:R little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRA1010102   __hal_tbm_fourcc_code('B', 'A', '3', '0')

Definition for the TBM surface format BGRA1010102 ([31:0] B:G:R:A 10:10:10:2 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRA4444   __hal_tbm_fourcc_code('B', 'A', '1', '2')

Definition for the TBM surface format BGRA4444 ([15:0] B:G:R:A 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRA5551   __hal_tbm_fourcc_code('B', 'A', '1', '5')

Definition for the TBM surface format BGRA5551 ([15:0] B:G:R:A 5:5:5:1 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRA8888   __hal_tbm_fourcc_code('B', 'A', '2', '4')

Definition for the TBM surface format BGRA8888 ([31:0] B:G:R:A 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRX1010102   __hal_tbm_fourcc_code('B', 'X', '3', '0')

Definition for the TBM surface format BGRX1010102 ([31:0] B:G:R:x 10:10:10:2 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRX4444   __hal_tbm_fourcc_code('B', 'X', '1', '2')

Definition for the TBM surface format BGRX4444 ([15:0] B:G:R:x 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRX5551   __hal_tbm_fourcc_code('B', 'X', '1', '5')

Definition for the TBM surface format BGRX5551 ([15:0] B:G:R:x 5:5:5:1 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_BGRX8888   __hal_tbm_fourcc_code('B', 'X', '2', '4')

Definition for the TBM surface format BGRX8888 ([31:0] B:G:R:x 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_C8   __hal_tbm_fourcc_code('C', '8', ' ', ' ')

Definition for the TBM surface format C8 ([7:0] C).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_NV12   __hal_tbm_fourcc_code('N', 'V', '1', '2')

Definition for the TBM surface format NV12 (2x2 subsampled Cr:Cb plane).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_NV12MT   __hal_tbm_fourcc_code('T', 'M', '1', '2')

Definition for the TBM surface format NV12MT (tiled '64x32' & multi-plane version of NV12).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_NV16   __hal_tbm_fourcc_code('N', 'V', '1', '6')

Definition for the TBM surface format NV16 (2x1 subsampled Cr:Cb plane).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_NV21   __hal_tbm_fourcc_code('N', 'V', '2', '1')

Definition for the TBM surface format NV21 (2x2 subsampled Cb:Cr plane).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_NV61   __hal_tbm_fourcc_code('N', 'V', '6', '1')

Definition for the TBM surface format NV61 (2x1 subsampled Cb:Cr plane).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGB332   __hal_tbm_fourcc_code('R', 'G', 'B', '8')

Definition for the TBM surface format RGB322 ([7:0] R:G:B 3:3:2).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGB565   __hal_tbm_fourcc_code('R', 'G', '1', '6')

Definition for the TBM surface format RGB565 ([15:0] R:G:B 5:6:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGB888   __hal_tbm_fourcc_code('R', 'G', '2', '4')

Definition for the TBM surface format RGB888 ([23:0] R:G:B little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBA1010102   __hal_tbm_fourcc_code('R', 'A', '3', '0')

Definition for the TBM surface format RGBA1010102 ([31:0] R:G:B:A 10:10:10:2 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBA4444   __hal_tbm_fourcc_code('R', 'A', '1', '2')

Definition for the TBM surface format RGBA4444 ([15:0] R:G:B:A 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBA5551   __hal_tbm_fourcc_code('R', 'A', '1', '5')

Definition for the TBM surface format RGBA5551 ([15:0] R:G:B:A 5:5:5:1 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBA8888   __hal_tbm_fourcc_code('R', 'A', '2', '4')

Definition for the TBM surface format RGBA8888 ([31:0] R:G:B:A 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBX1010102   __hal_tbm_fourcc_code('R', 'X', '3', '0')

Definition for the TBM surface format RGBX1010102 ([31:0] R:G:B:x 10:10:10:2 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBX4444   __hal_tbm_fourcc_code('R', 'X', '1', '2')

Definition for the TBM surface format RGBX4444 ([15:0] R:G:B:x 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBX5551   __hal_tbm_fourcc_code('R', 'X', '1', '5')

Definition for the TBM surface format RGBX5551 ([15:0] R:G:B:x 5:5:5:1 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_RGBX8888   __hal_tbm_fourcc_code('R', 'X', '2', '4')

Definition for the TBM surface format RGBX8888 ([31:0] R:G:B:x 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_UYVY   __hal_tbm_fourcc_code('U', 'Y', 'V', 'Y')

Definition for the TBM surface format UYVY ([31:0] Y1:Cr0:Y0:Cb0 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_VYUY   __hal_tbm_fourcc_code('V', 'Y', 'U', 'Y')

Definition for the TBM surface format VYUY ([31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XBGR1555   __hal_tbm_fourcc_code('X', 'B', '1', '5')

Definition for the TBM surface format XBGR1555 ([15:0] x:B:G:R 1:5:5:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XBGR2101010   __hal_tbm_fourcc_code('X', 'B', '3', '0')

Definition for the TBM surface format XBGR2101010 ([31:0] x:B:G:R 2:10:10:10 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XBGR4444   __hal_tbm_fourcc_code('X', 'B', '1', '2')

Definition for the TBM surface format XBRG4444 ([15:0] x:B:G:R 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XBGR8888   __hal_tbm_fourcc_code('X', 'B', '2', '4')

Definition for the TBM surface format XBGR8888 ([31:0] x:B:G:R 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XRGB1555   __hal_tbm_fourcc_code('X', 'R', '1', '5')

Definition for the TBM surface format XRGB1555 ([15:0] x:R:G:B 1:5:5:5 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XRGB2101010   __hal_tbm_fourcc_code('X', 'R', '3', '0')

Definition for the TBM surface format XRGB2101010 ([31:0] x:R:G:B 2:10:10:10 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XRGB4444   __hal_tbm_fourcc_code('X', 'R', '1', '2')

Definition for the TBM surface format XRGB4444 ([15:0] x:R:G:B 4:4:4:4 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_XRGB8888   __hal_tbm_fourcc_code('X', 'R', '2', '4')

Definition for the TBM surface format XRGB8888 ([31:0] x:R:G:B 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUV410   __hal_tbm_fourcc_code('Y', 'U', 'V', '9')

Definition for the TBM surface format YUV410 (4x4 subsampled Cb (1) and Cr (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUV411   __hal_tbm_fourcc_code('Y', 'U', '1', '1')

Definition for the TBM surface format YUV411 (4x1 subsampled Cb (1) and Cr (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUV420   __hal_tbm_fourcc_code('Y', 'U', '1', '2')

Definition for the TBM surface format YUV420 (2x2 subsampled Cb (1) and Cr (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUV422   __hal_tbm_fourcc_code('Y', 'U', '1', '6')

Definition for the TBM surface format YUV422 (2x1 subsampled Cb (1) and Cr (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUV444   __hal_tbm_fourcc_code('Y', 'U', '2', '4')

Definition for the TBM surface format YUV444 (non-subsampled Cb (1) and Cr (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YUYV   __hal_tbm_fourcc_code('Y', 'U', 'Y', 'V')

Definition for the TBM surface format YUYV ([31:0] Cr0:Y1:Cb0:Y0 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVU410   __hal_tbm_fourcc_code('Y', 'V', 'U', '9')

Definition for the TBM surface format YVU410 (4x4 subsampled Cr (1) and Cb (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVU411   __hal_tbm_fourcc_code('Y', 'V', '1', '1')

Definition for the TBM surface format YVU411 (4x1 subsampled Cr (1) and Cb (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVU420   __hal_tbm_fourcc_code('Y', 'V', '1', '2')

Definition for the TBM surface format YVU420 (2x2 subsampled Cr (1) and Cb (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVU422   __hal_tbm_fourcc_code('Y', 'V', '1', '6')

Definition for the TBM surface format YVU422 (2x1 subsampled Cr (1) and Cb (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVU444   __hal_tbm_fourcc_code('Y', 'V', '2', '4')

Definition for the TBM surface format YVU444 (non-subsampled Cr (1) and Cb (2) planes).

Since:
HAL_MODULE_TBM 1.0
#define HAL_TBM_FORMAT_YVYU   __hal_tbm_fourcc_code('Y', 'V', 'Y', 'U')

Definition for the TBM surface format YVYU ([31:0] Cb0:Y1:Cr0:Y0 8:8:8:8 little endian).

Since:
HAL_MODULE_TBM 1.0

Typedef Documentation

typedef hal_tbm_error(* hal_tbm_authenticated_drm_fd_handler)(hal_tbm_fd auth_fd, void *user_data)

The Event handler function when drm file descriptor is authernticated.

Since:
HAL_MODULE_TBM 1.0
Parameters:
[in]auth_fdauthernticated drm file descriptor.
[in]user_dataThe user data for handler.
Precondition:
hal_tbm_backend_set_authenticated_drm_fd() will invoke this handler.
See also:
hal_tbm_backend_set_authenticated_drm_fd().
hal_tbm_backend_get_master_drm_fd().
typedef void hal_tbm_backend

Definition for hal_tbm_backend handle.

Since:
HAL_MODULE_TBM 1.0

The structure type of the tbm backend data.

Since:
HAL_MODULE_TBM 1.0
See also:
_hal_tbm_backend_data
typedef void hal_tbm_bo

Definition for the tizen buffer object.

Since:
HAL_MODULE_TBM 1.0

The structure type of the TBM HAL's buffer object functions of backend.

Since:
HAL_MODULE_TBM 1.0
See also:
_hal_tbm_bo_funcs

hal_tbm_bo_handle abstraction of the memory handle by hal_tbm_bo_device_type

Since:
HAL_MODULE_TBM 1.0
typedef void hal_tbm_bufmgr

Definition for hal_tbm_bufmgr handle created by hal tbm backend.

Since:
HAL_MODULE_TBM 1.0

The structure type of the TBM HAL's buffer management functions of backend.

Since:
HAL_MODULE_TBM 1.0
See also:
_hal_tbm_bufmgr_funcs
typedef int32_t hal_tbm_fd

Definition for the file descriptor of the system buffer manager.

Since:
HAL_MODULE_TBM 1.0
typedef uint32_t hal_tbm_format

Definition for the Tizen buffer surface format.

Since:
HAL_MODULE_TBM 1.0
typedef uint32_t hal_tbm_key

Definition for the key associated with the buffer object.

Since:
HAL_MODULE_TBM 1.0
typedef void hal_tbm_native_display

Definition for native display (wl_display in tizen)

Since:
HAL_MODULE_TBM 1.0
typedef void hal_tbm_surface

Definition for the tizen surface object.

Since:
HAL_MODULE_TBM 1.0

Definition for the buffer data of hal_tbm_surface.

Since:
HAL_MODULE_TBM 1.0

The structure type of the TBM HAL's surface functions of backend.

Since:
HAL_MODULE_TBM 1.0
See also:
_hal_tbm_surface_funcs
typedef struct _hal_tbm_surface* hal_tbm_surface_h

Definition for the Tizen buffer surface.

Since:
HAL_MODULE_TBM 1.0

Enumeration Type Documentation

Definition for the option to access hal_tbm_bo.

Since:
HAL_MODULE_TBM 1.0
Enumerator:
HAL_TBM_OPTION_NONE 

The option is none

HAL_TBM_OPTION_READ 

The option to access to read the bo

HAL_TBM_OPTION_WRITE 

The option to access to write the bo

HAL_TBM_OPTION_VENDOR 

The the vendor specific option that depends on the backend

Definition for the device type to access hal_tbm_bo.

Since:
HAL_MODULE_TBM 1.0
Enumerator:
HAL_TBM_DEVICE_DEFAULT 

The device type to get the default handle

HAL_TBM_DEVICE_CPU 

The device type to get the virtual memory

HAL_TBM_DEVICE_2D 

The device type to get the 2D memory handle

HAL_TBM_DEVICE_3D 

The device type to get the 3D memory handle

HAL_TBM_DEVICE_MM 

The device type to get the the multimedia handle

Enumeration of bo memory type.

Since:
HAL_MODULE_TBM 1.0
Enumerator:
HAL_TBM_BO_DEFAULT 

Default memory: it depends on the backend

HAL_TBM_BO_SCANOUT 

Scanout memory

HAL_TBM_BO_NONCACHABLE 

Non-cacheable memory

HAL_TBM_BO_WC 

Write-combine memory

HAL_TBM_BO_TILED 

Tiled memory

HAL_TBM_BO_PROTECTED 

Protected memory (Since 1.1)

HAL_TBM_BO_VENDOR 

Vendor specific memory: it depends on the backend

Enumeration of tbm buffer manager capability.

Since:
HAL_MODULE_TBM 1.0
Enumerator:
HAL_TBM_BUFMGR_CAPABILITY_NONE 

Not Support capability

HAL_TBM_BUFMGR_CAPABILITY_SHARE_KEY 

Support sharing buffer by tbm key

HAL_TBM_BUFMGR_CAPABILITY_SHARE_FD 

Support sharing buffer by tbm fd

HAL_TBM_BUFMGR_CAPABILITY_TBM_SYNC 

Support timeline sync

HAL_TBM_BUFMGR_CAPABILITY_TILED_MEMORY 

Support tiled memory

HAL_TBM_BUFMGR_CAPABILITY_SHARE_SURFACE 

Support sharing surface by buffer data

Enumeration for hal tbm error type.

Since:
HAL_MODULE_TBM 1.0

Error's enumulation has group using offset 0x0101. HAL_TBM_ERROR_XXX. start from (HAL_TBM_ERROR_BASE | 0x0001) to (HAL_TBM_ERROR_BASE | 0x0099) HAL_TBM_BO_ERROR_XXX. start from (HAL_TBM_ERROR_BASE | 0x0101) to (HAL_TBM_ERROR_BASE | 0x0199)

Enumerator:
HAL_TBM_ERROR_NONE 

Successful

HAL_TBM_ERROR_OUT_OF_MEMORY 

Out of memory

HAL_TBM_ERROR_INVALID_PARAMETER 

Invalid function parameter

HAL_TBM_ERROR_INVALID_OPERATION 

Function not implemented

HAL_TBM_ERROR_NOT_SUPPORTED 

Not supported

HAL_TBM_BO_ERROR_GET_FD_FAILED 

Failed to get fd in bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_HEAP_ALLOC_FAILED 

Failed to allocate the heap memory in bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_LOAD_MODULE_FAILED 

Failed to load module

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_THREAD_INIT_FAILED 

Failed to initialize the pthread

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_BO_ALLOC_FAILED 

Failed to allocate hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_INIT_STATE_FAILED 

Failed to initialize the state of hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_IMPORT_FAILED 

Failed to import the handle of hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_IMPORT_FD_FAILED 

Failed to import fd of hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_EXPORT_FAILED 

Failed to export the handle of the hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_EXPORT_FD_FAILED 

Failed to export fd of hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_GET_HANDLE_FAILED 

Failed to get the hal_tbm_bo_handle

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_LOCK_FAILED 

Failed to lock the hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_MAP_FAILED 

Failed to map the hal_tbm_bo to get the hal_tbm_bo_handle

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_UNMAP_FAILED 

Failed to unmap the hal_tbm_bo

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_SWAP_FAILED 

Failed to swap the tbm_bos

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0
HAL_TBM_BO_ERROR_DUP_FD_FAILED 

Failed to duplicate fd

Deprecated:
Deprecated since HAL_MODULE_TBM 1.0