| #ifndef _LCD_FNS_H_ |
| #define _LCD_FNS_H_ |
| |
| #define STRIDE_ALIGN 16 |
| #define WIDE_ALIGN(value, base) (((value) + ((base) - 1)) & ~((base) - 1)) |
| |
| enum image_pattern { |
| IMG_PATTERN_RED = 0, |
| IMG_PATTERN_GREEN, |
| IMG_PATTERN_BLUE, |
| IMG_PATTERN_WHITE, |
| IMG_PATTERN_HCB_5, |
| IMG_PATTERN_HCB_2, |
| IMG_PATTERN_VCB_5, |
| IMG_PATTERN_VCB_2, |
| IMG_PATTERN_LINE, |
| IMG_PATTERN_GREY_LEVEL, |
| IMG_PATTERN_AFBC_RGB, |
| IMG_PATTERN_AFBC_YUV, |
| IMG_PATTERN_MAX |
| }; |
| |
| struct s_compose_layer_setting { |
| unsigned int addr; |
| unsigned char format; |
| unsigned char alpha_sel; |
| unsigned char layer_en; |
| unsigned char layer_alpha; |
| unsigned int stride; |
| }; |
| |
| struct s_compose_setting { |
| unsigned int width; |
| unsigned int height; |
| struct s_compose_layer_setting layer_setting[3]; |
| unsigned int dest_addr; |
| unsigned int dest_stride; |
| unsigned char dest_format; |
| unsigned char alpha_mode; |
| unsigned int reserved; |
| }; |
| |
| int get_format_plane(unsigned int format); |
| int get_format_bpp(unsigned int format); |
| int is_format_yuv(unsigned int format); |
| int get_uv_height_dividor(unsigned int format); |
| |
| int lcd_draw_images(unsigned int addr_p1, unsigned int *addr_p2, unsigned int *addr_p3, |
| unsigned int format, unsigned int pattern, unsigned int width, |
| unsigned int height, unsigned int *stride_p1, unsigned int *stride_p2, |
| unsigned int *stride_p3); |
| int lcd_compare_buffers(unsigned int src, unsigned int dest, unsigned int width, |
| unsigned int height, unsigned int stride_src, unsigned int stride_dest, |
| unsigned int format, int log); |
| int lcd_compare_compose_buffer(struct s_compose_setting *compose_setting, int log); |
| |
| #endif /*_LCD_FNS_H_*/ |