PDMA driver APIs. More...
Data Structures | |
| struct | pdma_plane_config |
| PDMA plane config. More... | |
| struct | pdma_output_config |
| PDMA output config. More... | |
| struct | pdma_config |
| PDMA config. More... | |
| struct | pdma_plane_info |
| PDMA plane info. More... | |
| struct | pdma_blit_option |
Macros | |
| #define | PDMA_MAKE_SCALE_SET(integer, fractional) (((integer) & 0x3) << 12 | ((fractional) & 0xFFF)) |
| PDMA make scale value. More... | |
Typedefs | |
| typedef enum pdma_plane | pdma_plane_t |
| PDMA plane. More... | |
| typedef enum pdma_flip | pdma_flip_t |
| PDMA flip. More... | |
| typedef enum pdma_rotate | pdma_rotate_t |
| PDMA rotate. More... | |
| typedef enum pdma_decimation | pdma_decimation_t |
| PDMA decimation. More... | |
| typedef enum pdma_blocksize | pdma_blocksize_t |
| PDMA block size. More... | |
| typedef struct pdma_plane_config | pdma_plane_config_t |
| PDMA plane config. More... | |
| typedef struct pdma_output_config | pdma_output_config_t |
| PDMA output config. More... | |
| typedef struct pdma_config | pdma_config_t |
| PDMA config. More... | |
| typedef struct pdma_plane_info | pdma_plane_info_t |
| PDMA plane info. More... | |
| typedef struct pdma_blit_option | pdma_blit_option_t |
Enumerations | |
| enum | { status_pdma_done = status_success , status_pdma_error = ((uint32_t)( status_group_pdma )*1000U + (uint32_t)( 1 )) , status_pdma_busy = ((uint32_t)( status_group_pdma )*1000U + (uint32_t)( 2 )) , status_pdma_idle = ((uint32_t)( status_group_pdma )*1000U + (uint32_t)( 3 )) } |
| PDMA status. More... | |
| enum | pdma_plane { pdma_plane_src = 0 , pdma_plane_dst = 1 , pdma_plane_both , pdma_plane_none } |
| PDMA plane. More... | |
| enum | pdma_flip { pdma_flip_none = 0 , pdma_flip_horizontal = 1 << 0 , pdma_flip_vertical = 1 << 1 , pdma_flip_both = pdma_flip_horizontal | pdma_flip_vertical } |
| PDMA flip. More... | |
| enum | pdma_rotate { pdma_rotate_0_degree = 0 , pdma_rotate_90_degree = 1 , pdma_rotate_180_degree = 2 , pdma_rotate_270_degree = 3 } |
| PDMA rotate. More... | |
| enum | pdma_decimation { pdma_decimation_by_1 = 0 , pdma_decimation_by_2 = 1 , pdma_decimation_by_4 = 2 , pdma_decimation_by_8 = 3 } |
| PDMA decimation. More... | |
| enum | pdma_blocksize { pdma_blocksize_16x16 , pdma_blocksize_8x8 } |
| PDMA block size. More... | |
Functions | |
| void | pdma_get_default_config (PDMA_Type *ptr, pdma_config_t *config, display_pixel_format_t pixel_format) |
| Get default configuration according to input pixel format. More... | |
| void | pdma_get_default_plane_config (PDMA_Type *ptr, pdma_plane_config_t *config, display_pixel_format_t pixel_format) |
| Get default plane configuration according input pixel format. More... | |
| void | pdma_get_default_yuv2rgb_coef_config (PDMA_Type *ptr, display_yuv2rgb_coef_t *yuv2rgb_coef, display_pixel_format_t source_format) |
| Get default YUV2RGB coefficient configuration according to input pixel format. More... | |
| void | pdma_get_default_output_config (PDMA_Type *ptr, pdma_output_config_t *config, display_pixel_format_t pixel_format) |
| Get default output configuration. More... | |
| void | pdma_enable_irq (PDMA_Type *ptr, uint32_t mask, bool enable) |
| PDMA enable/disable irq. More... | |
| void | pdma_config_output (PDMA_Type *ptr, pdma_output_config_t *config) |
| PDMA config output. More... | |
| void | pdma_config_planes (PDMA_Type *ptr, void *plane_src_config, void *plane_dst_config, void *yuv2rgb_coef) |
| Configure PDMA planes. More... | |
| void | pdma_init (PDMA_Type *ptr, pdma_config_t *config) |
| PDMA initialization. More... | |
| hpm_stat_t | pdma_check_status (PDMA_Type *ptr, uint32_t *status) |
| PDMA check status. More... | |
| hpm_stat_t | pdma_fill_color (PDMA_Type *ptr, uint32_t dst, uint32_t dst_width, uint32_t width, uint32_t height, uint32_t color, uint8_t alpha, display_pixel_format_t format, bool wait, uint32_t *status) |
| PDMA fill color. More... | |
| hpm_stat_t | pdma_flip_rotate (PDMA_Type *ptr, uint32_t dst, uint32_t dst_width, uint32_t src, uint32_t src_width, uint32_t x, uint32_t y, uint32_t width, uint32_t height, pdma_flip_t flip, pdma_rotate_t rotate, uint8_t alpha, display_pixel_format_t format, bool wait, uint32_t *status) |
| PDMA flip rotate plane. More... | |
| hpm_stat_t | pdma_blit (PDMA_Type *ptr, uint32_t dst, uint32_t dst_width, uint32_t src, uint32_t src_width, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint8_t alpha, display_pixel_format_t format, bool wait, uint32_t *status) |
| PDMA blit plane. More... | |
| hpm_stat_t | pdma_scale (PDMA_Type *ptr, uint32_t dst, uint32_t dst_width, uint32_t src, uint32_t src_width, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t target_width, uint32_t target_height, uint8_t alpha, display_pixel_format_t format, bool wait, uint32_t *status) |
| PDMA scale plane. More... | |
| void | pdma_get_default_blit_option (pdma_blit_option_t *op) |
| PDMA get default blit option. More... | |
| hpm_stat_t | pdma_blit_ex (PDMA_Type *ptr, display_buf_t *dst, display_buf_t *src, pdma_blit_option_t *op, bool wait, uint32_t *status) |
| PDMA blit plane by option. More... | |
| void | pdma_set_block_size (PDMA_Type *ptr, pdma_blocksize_t size) |
| PDMA set block size. More... | |
| void | pdma_stop (PDMA_Type *ptr) |
| PDMA stop. More... | |
| static uint32_t | pdma_get_status (PDMA_Type *ptr) |
| PDMA stop. More... | |
| static void | pdma_start (PDMA_Type *ptr) |
| PDMA start. More... | |
| static void | pdma_software_reset (PDMA_Type *ptr) |
| PDMA software reset. More... | |
| static void | pdma_set_plane_colorkey (PDMA_Type *ptr, uint8_t plane_index, uint32_t key_high, uint32_t key_low) |
| PDMA set plane color key limits. More... | |
PDMA driver APIs.
| #define PDMA_MAKE_SCALE_SET | ( | integer, | |
| fractional | |||
| ) | (((integer) & 0x3) << 12 | ((fractional) & 0xFFF)) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA make scale value.
| typedef struct pdma_blit_option pdma_blit_option_t |
#include <drivers/inc/hpm_pdma_drv.h>
| typedef enum pdma_blocksize pdma_blocksize_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA block size.
| typedef struct pdma_config pdma_config_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA config.
| typedef enum pdma_decimation pdma_decimation_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA decimation.
| typedef enum pdma_flip pdma_flip_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA flip.
| typedef struct pdma_output_config pdma_output_config_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA output config.
| typedef struct pdma_plane_config pdma_plane_config_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA plane config.
| typedef struct pdma_plane_info pdma_plane_info_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA plane info.
| typedef enum pdma_plane pdma_plane_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA plane.
| typedef enum pdma_rotate pdma_rotate_t |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA rotate.
| anonymous enum |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA status.
| Enumerator | |
|---|---|
| status_pdma_done | |
| status_pdma_error | |
| status_pdma_busy | |
| status_pdma_idle | |
| enum pdma_blocksize |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA block size.
| Enumerator | |
|---|---|
| pdma_blocksize_16x16 | |
| pdma_blocksize_8x8 | |
| enum pdma_decimation |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA decimation.
| Enumerator | |
|---|---|
| pdma_decimation_by_1 | |
| pdma_decimation_by_2 | |
| pdma_decimation_by_4 | |
| pdma_decimation_by_8 | |
| enum pdma_flip |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA flip.
| Enumerator | |
|---|---|
| pdma_flip_none | |
| pdma_flip_horizontal | |
| pdma_flip_vertical | |
| pdma_flip_both | |
| enum pdma_plane |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA plane.
| Enumerator | |
|---|---|
| pdma_plane_src | |
| pdma_plane_dst | |
| pdma_plane_both | |
| pdma_plane_none | |
| enum pdma_rotate |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA rotate.
| Enumerator | |
|---|---|
| pdma_rotate_0_degree | |
| pdma_rotate_90_degree | |
| pdma_rotate_180_degree | |
| pdma_rotate_270_degree | |
| hpm_stat_t pdma_blit | ( | PDMA_Type * | ptr, |
| uint32_t | dst, | ||
| uint32_t | dst_width, | ||
| uint32_t | src, | ||
| uint32_t | src_width, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint8_t | alpha, | ||
| display_pixel_format_t | format, | ||
| bool | wait, | ||
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA blit plane.
| [in] | ptr | PDMA base address |
| [in] | dst | target buff address |
| [in] | dst_width | target buff pixel width |
| [in] | src | source buff address |
| [in] | src_width | source buff pixel width |
| [in] | x | x coordinate n buffer |
| [in] | y | y coordinate n buffer |
| [in] | width | output image width |
| [in] | height | output image height |
| [in] | alpha | alpha value |
| [in] | format | display_pixel_format_t |
| [in] | wait | wait for execution to complete |
| [out] | status | pdma status |
| hpm_stat_t | status_success if flip and rotate plane without any error |
| hpm_stat_t pdma_blit_ex | ( | PDMA_Type * | ptr, |
| display_buf_t * | dst, | ||
| display_buf_t * | src, | ||
| pdma_blit_option_t * | op, | ||
| bool | wait, | ||
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA blit plane by option.
| ptr | PDMA base address |
| dst | target buff address |
| src | source buff address |
| op | option of blit |
| wait | wait for execution to complete |
| status | pdma status |
| hpm_stat_t | status_success if flip and rotate plane without any error |
| hpm_stat_t pdma_check_status | ( | PDMA_Type * | ptr, |
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA check status.
| [in] | ptr | PDMA base address |
| [out] | status | pdma status |
| void pdma_config_output | ( | PDMA_Type * | ptr, |
| pdma_output_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA config output.
| [in] | ptr | PDMA base address |
| [in] | config | pdma_output_config_t |
| void pdma_config_planes | ( | PDMA_Type * | ptr, |
| void * | plane_src_config, | ||
| void * | plane_dst_config, | ||
| void * | yuv2rgb_coef | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
Configure PDMA planes.
Note: The plane_src and plane_dst share one YUV2RGB_COEF, so not support convert one plane YUV422 format and another plane YCbCr422 format at same time
| [in] | ptr | PDMA base address |
| [in] | plane_src_config | Pointer to plane_src configuration structure |
| [in] | plane_dst_config | Pointer to plan_dst configuration structure |
| [in] | yuv2rgb_coef | Pointer to yuv2rgb_coef configuration structure |
| void pdma_enable_irq | ( | PDMA_Type * | ptr, |
| uint32_t | mask, | ||
| bool | enable | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA enable/disable irq.
| [in] | ptr | PDMA base address |
| [in] | mask | irq mask |
| [in] | enable | :
|
| hpm_stat_t pdma_fill_color | ( | PDMA_Type * | ptr, |
| uint32_t | dst, | ||
| uint32_t | dst_width, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | color, | ||
| uint8_t | alpha, | ||
| display_pixel_format_t | format, | ||
| bool | wait, | ||
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA fill color.
| [in] | ptr | PDMA base address |
| [in] | dst | target buff address |
| [in] | dst_width | target buff pixel width |
| [in] | width | output image width |
| [in] | height | output image height |
| [in] | color | color value |
| [in] | alpha | alpha value |
| [in] | format | display_pixel_format_t |
| [in] | wait | wait for execution to complete |
| [out] | status | pdma status |
| hpm_stat_t | status_success if flip and rotate plane without any error |
| hpm_stat_t pdma_flip_rotate | ( | PDMA_Type * | ptr, |
| uint32_t | dst, | ||
| uint32_t | dst_width, | ||
| uint32_t | src, | ||
| uint32_t | src_width, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| pdma_flip_t | flip, | ||
| pdma_rotate_t | rotate, | ||
| uint8_t | alpha, | ||
| display_pixel_format_t | format, | ||
| bool | wait, | ||
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA flip rotate plane.
| [in] | ptr | PDMA base address |
| [in] | dst | target buff address |
| [in] | dst_width | target buff pixel width |
| [in] | src | source buff address |
| [in] | src_width | source buff pixel width |
| [in] | x | x coordinate n buffer |
| [in] | y | y coordinate n buffer |
| [in] | width | output image width |
| [in] | height | output image height |
| [in] | flip | pdma_flip_t |
| [in] | rotate | pdma_rotate_t |
| [in] | alpha | alpha value |
| [in] | format | display_pixel_format_t |
| [in] | wait | wait for execution to complete |
| [out] | status | pdma status |
| hpm_stat_t | status_success if flip and rotate plane without any error |
| void pdma_get_default_blit_option | ( | pdma_blit_option_t * | op | ) |
| void pdma_get_default_config | ( | PDMA_Type * | ptr, |
| pdma_config_t * | config, | ||
| display_pixel_format_t | pixel_format | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
Get default configuration according to input pixel format.
| [in] | ptr | PDMA base address |
| [out] | config | pdma_config_t |
| [in] | pixel_format | display_pixel_format_t |
| void pdma_get_default_output_config | ( | PDMA_Type * | ptr, |
| pdma_output_config_t * | config, | ||
| display_pixel_format_t | pixel_format | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
Get default output configuration.
| [in] | ptr | PDMA base address |
| [out] | config | pdma_output_config_t |
| [in] | pixel_format | output data pixel format |
| void pdma_get_default_plane_config | ( | PDMA_Type * | ptr, |
| pdma_plane_config_t * | config, | ||
| display_pixel_format_t | pixel_format | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
Get default plane configuration according input pixel format.
| [in] | ptr | PDMA base address |
| [out] | config | pdma_plane_config_t |
| [in] | pixel_format | display_pixel_format_t |
| void pdma_get_default_yuv2rgb_coef_config | ( | PDMA_Type * | ptr, |
| display_yuv2rgb_coef_t * | yuv2rgb_coef, | ||
| display_pixel_format_t | source_format | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
Get default YUV2RGB coefficient configuration according to input pixel format.
| [in] | ptr | PDMA base address |
| [out] | yuv2rgb_coef | display_yuv2rgb_coef_t |
| [in] | source_format | the YUV2RGB input source pixel format |
|
inlinestatic |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA stop.
| [in] | ptr | PDMA base address |
| STAT | register value |
| void pdma_init | ( | PDMA_Type * | ptr, |
| pdma_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA initialization.
| [in] | ptr | PDMA base address |
| [in] | config | pdma_output_config_t |
| hpm_stat_t pdma_scale | ( | PDMA_Type * | ptr, |
| uint32_t | dst, | ||
| uint32_t | dst_width, | ||
| uint32_t | src, | ||
| uint32_t | src_width, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| uint32_t | target_width, | ||
| uint32_t | target_height, | ||
| uint8_t | alpha, | ||
| display_pixel_format_t | format, | ||
| bool | wait, | ||
| uint32_t * | status | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA scale plane.
| [in] | ptr | PDMA base address |
| [in] | dst | target buff address |
| [in] | dst_width | target buff pixel width |
| [in] | src | source buff address |
| [in] | src_width | source buff pixel width |
| [in] | x | x coordinate n buffer |
| [in] | y | y coordinate n buffer |
| [in] | width | input image width |
| [in] | height | input image height |
| [in] | target_width | output image width |
| [in] | target_height | output image height |
| [in] | alpha | alpha value |
| [in] | format | display_pixel_format_t |
| [in] | wait | wait for execution to complete |
| [out] | status | pdma status |
| hpm_stat_t | status_success if flip and rotate plane without any error |
| void pdma_set_block_size | ( | PDMA_Type * | ptr, |
| pdma_blocksize_t | size | ||
| ) |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA set block size.
| [in] | ptr | PDMA base address |
| [in] | size | pdma_blocksize_t |
|
inlinestatic |
#include <drivers/inc/hpm_pdma_drv.h>
PDMA set plane color key limits.
| [in] | ptr | PDMA base address |
| [in] | plane_index | plane index |
| [in] | key_high | color key high limits |
| [in] | key_low | color key low limits |
|
inlinestatic |
|
inlinestatic |
| void pdma_stop | ( | PDMA_Type * | ptr | ) |