mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 11:45:58 +08:00
feat(dave2d): always invalidate cache when using Renesas RZA
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
abec5b7c6e
commit
9d14a04e8a
@@ -32,8 +32,8 @@
|
|||||||
**********************/
|
**********************/
|
||||||
|
|
||||||
static void execute_drawing(lv_draw_dave2d_unit_t * u);
|
static void execute_drawing(lv_draw_dave2d_unit_t * u);
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
|
static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -114,16 +114,16 @@ void lv_draw_dave2d_init(void)
|
|||||||
static void lv_draw_buf_dave2d_init_handlers(void)
|
static void lv_draw_buf_dave2d_init_handlers(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
|
lv_draw_buf_handlers_t * handlers = lv_draw_buf_get_handlers();
|
||||||
handlers->invalidate_cache_cb = _dave2d_buf_invalidate_cache_cb;
|
handlers->invalidate_cache_cb = _dave2d_buf_invalidate_cache_cb;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
|
static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
|
||||||
{
|
{
|
||||||
const lv_image_header_t * header = &draw_buf->header;
|
const lv_image_header_t * header = &draw_buf->header;
|
||||||
@@ -141,7 +141,11 @@ static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, cons
|
|||||||
address = address + (area->x1 * (int32_t)bytes_per_pixel) + (stride * (uint32_t)area->y1);
|
address = address + (area->x1 * (int32_t)bytes_per_pixel) + (stride * (uint32_t)area->y1);
|
||||||
|
|
||||||
for(i = 0; i < lines; i++) {
|
for(i = 0; i < lines; i++) {
|
||||||
|
#if defined(RENESAS_CORTEX_M85)
|
||||||
SCB_CleanInvalidateDCache_by_Addr(address, bytes_to_flush_per_line);
|
SCB_CleanInvalidateDCache_by_Addr(address, bytes_to_flush_per_line);
|
||||||
|
#else /* _RENESAS_RZA_ */
|
||||||
|
R_BSP_CACHE_CleanInvalidateRange((uint64_t) address, (uint64_t) bytes_to_flush_per_line);
|
||||||
|
#endif
|
||||||
address += stride;
|
address += stride;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -474,8 +478,8 @@ static void execute_drawing(lv_draw_dave2d_unit_t * u)
|
|||||||
/* remember draw unit for access to unit's context */
|
/* remember draw unit for access to unit's context */
|
||||||
t->draw_unit = (lv_draw_unit_t *)u;
|
t->draw_unit = (lv_draw_unit_t *)u;
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
lv_layer_t * layer = t->target_layer;
|
lv_layer_t * layer = t->target_layer;
|
||||||
lv_area_t clipped_area;
|
lv_area_t clipped_area;
|
||||||
int32_t x;
|
int32_t x;
|
||||||
@@ -533,8 +537,8 @@ static void execute_drawing(lv_draw_dave2d_unit_t * u)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
lv_draw_buf_invalidate_cache(layer->draw_buf, &clipped_area);
|
lv_draw_buf_invalidate_cache(layer->draw_buf, &clipped_area);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ static void img_draw_core(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_d
|
|||||||
src_blend_mode = d2_getblendmodesrc(u->d2_handle);
|
src_blend_mode = d2_getblendmodesrc(u->d2_handle);
|
||||||
dst_blend_mode = d2_getblendmodedst(u->d2_handle);
|
dst_blend_mode = d2_getblendmodedst(u->d2_handle);
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
d1_cacheblockflush(u->d2_handle, 0, src_buf,
|
d1_cacheblockflush(u->d2_handle, 0, src_buf,
|
||||||
img_stride * header->h); //Stride is in bytes, not pixels/texels
|
img_stride * header->h); //Stride is in bytes, not pixels/texels
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ static void lv_draw_dave2d_draw_letter_cb(lv_draw_task_t * t, lv_draw_glyph_dsc_
|
|||||||
|
|
||||||
const lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data;
|
const lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data;
|
||||||
|
|
||||||
#if defined(RENESAS_CORTEX_M85)
|
#if defined(RENESAS_CORTEX_M85) || defined(_RENESAS_RZA_)
|
||||||
#if (BSP_CFG_DCACHE_ENABLED)
|
#if (BSP_CFG_DCACHE_ENABLED) || defined(_RENESAS_RZA_)
|
||||||
d1_cacheblockflush(unit->d2_handle, 0, draw_buf->data, draw_buf->data_size);
|
d1_cacheblockflush(unit->d2_handle, 0, draw_buf->data, draw_buf->data_size);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user