mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-25 05:28:55 +00:00
v1.0.3
This commit is contained in:
13
packages/third-party/awtk-ui/Kconfig
vendored
13
packages/third-party/awtk-ui/Kconfig
vendored
@@ -177,7 +177,7 @@ endchoice
|
||||
menu "AWTK thread config"
|
||||
config TK_UI_THREAD_STACK_SIZE
|
||||
int "UI thread stack size"
|
||||
default 40000
|
||||
default 10000
|
||||
|
||||
config TK_UI_THREAD_PRIORITY
|
||||
int "UI thread prority"
|
||||
@@ -189,7 +189,7 @@ menu "AWTK thread config"
|
||||
|
||||
config TK_TOUCH_THREAD_STACK_SIZE
|
||||
int "Touch thread stack size"
|
||||
default 2048
|
||||
default 1536
|
||||
|
||||
config TK_TOUCH_THREAD_PRIORITY
|
||||
int "Touch thread prority"
|
||||
@@ -202,15 +202,18 @@ menu "AWTK thread config"
|
||||
endmenu
|
||||
|
||||
menu "AWTK input device config"
|
||||
config AIC_TOUCH_PANEL_GT911
|
||||
config AWTK_TOUCH_INPUT_DEV
|
||||
depends on AIC_TOUCH_PANEL_GT911
|
||||
bool "Using the input device gt911"
|
||||
default y
|
||||
|
||||
config AIC_TOUCH_PANEL_GT911_NAME
|
||||
depends on AIC_TOUCH_PANEL_GT911
|
||||
depends on AWTK_TOUCH_INPUT_DEV
|
||||
string "The name of the input device is gt911"
|
||||
default "gt911"
|
||||
|
||||
config AIC_TOUCH_PANEL_GT911_DEBUG
|
||||
depends on AIC_TOUCH_PANEL_GT911
|
||||
depends on AWTK_TOUCH_INPUT_DEV
|
||||
bool "The input device gt911 debug"
|
||||
default n
|
||||
endmenu
|
||||
|
||||
@@ -149,7 +149,7 @@ static graphic_buffer_t* graphic_buffer_aic_create(uint32_t w, uint32_t h,
|
||||
memset(buffer->data_head, 0x00, size);
|
||||
buffer->w = w;
|
||||
buffer->h = h;
|
||||
buffer->data = (unsigned int*)buffer->cma_buff.phy_addr;
|
||||
buffer->data = (unsigned char*)buffer->cma_buff.phy_addr;
|
||||
|
||||
buffer->graphic_buffer.vt = &s_graphic_buffer_aic_vtable;
|
||||
buffer->graphic_buffer.vt->get_line_length(&buffer->graphic_buffer);
|
||||
@@ -175,9 +175,9 @@ graphic_buffer_t* graphic_buffer_aic_create_with_data(void* data) {
|
||||
return_value_if_fail(buffer != NULL, NULL);
|
||||
|
||||
buffer->cma_buff.data = dec_asset;
|
||||
buffer->cma_buff.size = dec_asset->frame.buf.size.height * dec_asset->frame.buf.stride[0];
|
||||
buffer->cma_buff.size = dec_asset->frame_asset->cma_buf[0].size;
|
||||
buffer->cma_buff.phy_addr = (unsigned int)dec_asset->frame_asset->cma_buf[0].phy_addr;
|
||||
buffer->cma_buff.type = CTX_ASSET_TYPE;
|
||||
buffer->cma_buff.phy_addr = (unsigned int)dec_asset->frame.buf.phy_addr[0];
|
||||
buffer->cma_buff.buf = (void *)buffer->cma_buff.phy_addr;
|
||||
aic_cma_buf_add_ge(&buffer->cma_buff);
|
||||
|
||||
|
||||
@@ -146,34 +146,36 @@ static void cma_buf_hash_destroy(cma_buffer_hash_map *map) {
|
||||
int aic_cma_buf_malloc(cma_buffer *back, int size, int align_size) {
|
||||
void *cma_buf = NULL;
|
||||
int malloc_size = 0;
|
||||
int cache_align_size = 0;
|
||||
|
||||
if (align_size <= 0)
|
||||
malloc_size = size + CACHE_LINE_SIZE;
|
||||
else
|
||||
malloc_size = size + align_size;
|
||||
if (align_size <= 0) {
|
||||
malloc_size = size + CACHE_LINE_SIZE * 2;
|
||||
cache_align_size = BYTE_ALIGN(size, CACHE_LINE_SIZE);
|
||||
} else {
|
||||
malloc_size = size + align_size * 2;
|
||||
cache_align_size = BYTE_ALIGN(size, align_size);
|
||||
}
|
||||
|
||||
cma_buf = aicos_malloc(MEM_CMA, malloc_size);
|
||||
if (!cma_buf) {
|
||||
log_error("aic_cma_buf_malloc fail, size = %d, malloc size = %d\n",
|
||||
size, malloc_size);
|
||||
log_error("aic_cma_buf_malloc fail, malloc size = %d\n", malloc_size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
back->type = PHY_TYPE;
|
||||
back->phy_addr = (unsigned int)BYTE_ALIGN(((uintptr_t)cma_buf), CACHE_LINE_SIZE);
|
||||
back->buf_head = cma_buf;
|
||||
back->size = size;
|
||||
back->size = cache_align_size;
|
||||
|
||||
if (align_size <= 0) {
|
||||
back->phy_addr = (unsigned int)BYTE_ALIGN(((uintptr_t)cma_buf), CACHE_LINE_SIZE);
|
||||
} else {
|
||||
back->phy_addr = (unsigned int)BYTE_ALIGN(((uintptr_t)cma_buf), align_size);
|
||||
}
|
||||
back->buf = (void *)back->phy_addr;
|
||||
|
||||
if (align_size <= 0)
|
||||
back->phy_addr = (unsigned int)BYTE_ALIGN(((uintptr_t)cma_buf), CACHE_LINE_SIZE);
|
||||
else
|
||||
back->phy_addr = (unsigned int)BYTE_ALIGN(((uintptr_t)cma_buf), align_size);
|
||||
aicos_dcache_clean_invalid_range((unsigned long *)back->phy_addr, (long long)cache_align_size);
|
||||
|
||||
memset((void *)back->phy_addr, 0, size);
|
||||
aicos_dcache_clean_invalid_range((unsigned long *)back->phy_addr, (long long)size);
|
||||
|
||||
g_hash_map->cma_size += size;
|
||||
g_hash_map->cma_size += cache_align_size;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ static void awtk_start_ui_thread(void) {
|
||||
TK_UI_THREAD_PRIORITY,
|
||||
TK_UI_THREAD_TICK);
|
||||
rt_thread_startup(ui_thread);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int awtk_init(int argc, char **argv) {
|
||||
|
||||
Reference in New Issue
Block a user