mirror of
https://github.com/lvgl/lvgl.git
synced 2026-09-28 16:10:54 +08:00
fix(vglite): update for v8
includes updates coming from NXP MCU SDK 2.10 with adaptation for lvgl v8: Fixed BLIT offset computation Previous implementation didn't take into account a possibility of non-zero offset in source image, so output was wrong if offset was used. With this fix, CPU and VG-Lite output is the same even with offsets. Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com> gpu: vglite: Buffer sync with BLITs Added buffer synchronisation with BLITs instead of memcpy for VG-Lite. In LVGL v8, buffer synchronisation acceleration is moved to littlevgl_support.c. Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com> gpu: vglite: Fixed BLIT boundary Fixed artifact issue revealed by buffer sync with BLIT feature. Caused by wrong BLIT boundary. Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com> gpu: vglite: BLIT quality degradation workaround for RT595 Limitation in RT595 causes BLIT image quality degradation when coordinates are above 368 px. This patch implements workaround that will break the BLIT into multiple smaller BLITs, so the quality is not affected for higher resolutions. Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com> gpu: vglite: Fix address alignment and stride requirements Fixed multiple issues: - The VGLite alignment requirement checks for the pixel destination buffer are not applicable in our case of Linear (non-tiled) format. - Some VGLite stride requirement requirement should be expressed in bytes, not in pixels. - Fix the Y alignment function to ensure that line starts at an address that the respects the alignment requirement of VG-Lite. Such mistakes do not break application, but cause a fallback to non-accelerated Blit by CPU. See MGG-741. Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com> gpu: vglite: fix some MISRA C 2012 violations fixed 56 violations: mainly implicit format casts and unchecked returned values. see JIRA MCUX-43327 Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com> gpu: vglite: fix stride requirement in _init_vg_buf() fix unit: need to convert the alignment requirement into bytes when checking stride parameter. fix condition: stride requirement applies only on source buffers. Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com> gpu: vglite: updates for v8 cache callback type changed in display driver struct Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com> gpu: vglite: update parameter type for v8 display driver is now a pointer in structure. Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
This commit is contained in:
@@ -701,8 +701,8 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
|
||||
blit.src_stride = lv_area_get_width(map_area) * sizeof(lv_color_t);
|
||||
blit.src_area.x1 = (draw_area->x1 - (map_area->x1 - disp_area->x1));
|
||||
blit.src_area.y1 = (draw_area->y1 - (map_area->y1 - disp_area->y1));
|
||||
blit.src_area.x2 = blit.src_area.x1 + draw_area_w;
|
||||
blit.src_area.y2 = blit.src_area.y1 + draw_area_h;
|
||||
blit.src_area.x2 = blit.src_area.x1 + draw_area_w - 1;
|
||||
blit.src_area.y2 = blit.src_area.y1 + draw_area_h - 1;
|
||||
|
||||
blit.dst = disp_buf;
|
||||
blit.dst_width = lv_area_get_width(disp_area);
|
||||
@@ -710,8 +710,8 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
|
||||
blit.dst_stride = lv_area_get_width(disp_area) * sizeof(lv_color_t);
|
||||
blit.dst_area.x1 = draw_area->x1;
|
||||
blit.dst_area.y1 = draw_area->y1;
|
||||
blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w;
|
||||
blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h;
|
||||
blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w - 1;
|
||||
blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h - 1;
|
||||
|
||||
blit.opa = opa;
|
||||
|
||||
@@ -751,8 +751,8 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
|
||||
blit.src_stride = lv_area_get_width(map_area) * sizeof(lv_color_t);
|
||||
blit.src_area.x1 = (draw_area->x1 - (map_area->x1 - disp_area->x1));
|
||||
blit.src_area.y1 = (draw_area->y1 - (map_area->y1 - disp_area->y1));
|
||||
blit.src_area.x2 = blit.src_area.x1 + draw_area_w;
|
||||
blit.src_area.y2 = blit.src_area.y1 + draw_area_h;
|
||||
blit.src_area.x2 = blit.src_area.x1 + draw_area_w - 1;
|
||||
blit.src_area.y2 = blit.src_area.y1 + draw_area_h - 1;
|
||||
|
||||
blit.dst = disp_buf;
|
||||
blit.dst_width = lv_area_get_width(disp_area);
|
||||
@@ -760,8 +760,8 @@ LV_ATTRIBUTE_FAST_MEM static void map_normal(const lv_area_t * disp_area, lv_col
|
||||
blit.dst_stride = lv_area_get_width(disp_area) * sizeof(lv_color_t);
|
||||
blit.dst_area.x1 = draw_area->x1;
|
||||
blit.dst_area.y1 = draw_area->y1;
|
||||
blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w;
|
||||
blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h;
|
||||
blit.dst_area.x2 = blit.dst_area.x1 + draw_area_w - 1;
|
||||
blit.dst_area.y2 = blit.dst_area.y1 + draw_area_h - 1;
|
||||
|
||||
blit.opa = opa;
|
||||
|
||||
|
||||
+515
-55
File diff suppressed because it is too large
Load Diff
@@ -43,8 +43,11 @@ extern "C" {
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/** Stride in px required by VG-Lite HW. Don't change this.*/
|
||||
#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16
|
||||
/** Use this symbol as limit to disable feature (value has to be larger than supported resolution) */
|
||||
#define LV_GPU_NXP_VG_LITE_FEATURE_DISABLED (1920*1080+1)
|
||||
|
||||
/** Stride in px required by VG-Lite HW. Don't change this. */
|
||||
#define LV_GPU_NXP_VG_LITE_STRIDE_ALIGN_PX 16U
|
||||
|
||||
#ifndef LV_GPU_NXP_VG_LITE_FILL_SIZE_LIMIT
|
||||
/** Minimum area (in pixels) to be filled by VG-Lite with 100% opacity*/
|
||||
@@ -61,6 +64,11 @@ extern "C" {
|
||||
#define LV_GPU_NXP_VG_LITE_BLIT_SIZE_LIMIT 32
|
||||
#endif
|
||||
|
||||
#ifndef LV_GPU_NXP_VG_LITE_BUFF_SYNC_BLIT_SIZE_LIMIT
|
||||
/** Minimum invalidated area (in pixels) to be synchronized by VG-Lite during buffer sync */
|
||||
#define LV_GPU_NXP_VG_LITE_BUFF_SYNC_BLIT_SIZE_LIMIT 32
|
||||
#endif
|
||||
|
||||
#ifndef LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT
|
||||
/** Minimum area (in pixels) for image copy with transparency to be handled by VG-Lite*/
|
||||
#define LV_GPU_NXP_VG_LITE_BLIT_OPA_SIZE_LIMIT 32
|
||||
|
||||
Reference in New Issue
Block a user