2416504_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2416504_en-US

2416504_en-US

PXP screen rotation issue based on i.MXRT1052

I'm using rt1052PXP to rotate a landscape view to a portrait view, but the overall display shifts downwards when I refresh the page. Why is this happening?

6c748ddab78cfa48c73261b73c48d335.jpg

86894d601e3681f3125f4b431dd8ea77.jpg

10b9f2639f1f4168404de7e021d1486b.jpg

 

static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{

lv_area_t dest_area =
{
.x1 = 0,
.x2 = 480 - 1,
.y1 = 0,
.y2 = 800 - 1,
};

lv_gpu_nxp_pxp_blit(((lv_color_t *)s_inactiveFrameBuffer), area, 800, color_p, area,480, LV_OPA_COVER, LV_DISP_ROT_270);

DCACHE_CleanInvalidateByRange((uint32_t)color_p, DEMO_FB_SIZE);

ELCDIF_SetNextBufferAddr(LCDIF, (uint32_t)s_inactiveFrameBuffer);

s_framePending = true;if (xSemaphoreTake(s_frameSema, portMAX_DELAY) == pdTRUE)
{
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
else
{
PRINTF("Display flush failed\r\n");
assert(0);
}

}

 

i.MXRT 105x回复: 基于i.MXRT1052的pxp屏幕旋转问题I've noticed an offset issue when drawing with PXP. Is it because the default initialization `#define LV_USE_GPU_NXP_PXP_AUTO_INIT 1` generated by guiguider can't be used directly?

void lv_disp_drv_init(lv_disp_drv_t * driver)
{
lv_memset_00(driver, sizeof(lv_disp_drv_t));

driver->hor_res = 320;
driver->ver_res = 240;
driver->physical_hor_res = -1;
driver->physical_ver_res = -1;
driver->offset_x = 0;
driver->offset_y = 0;
driver->antialiasing = LV_COLOR_DEPTH > 8 ? 1 : 0;
driver->screen_transp = 0;
driver->dpi = LV_DPI_DEF;
driver->color_chroma_key = LV_COLOR_CHROMA_KEY;

#if LV_USE_GPU_NXP_PXP
// driver->draw_ctx_init = lv_draw_pxp_ctx_init;
// driver->draw_ctx_deinit = lv_draw_pxp_ctx_deinit;
// driver->draw_ctx_size = sizeof(lv_draw_pxp_ctx_t);
driver->draw_ctx_init = lv_draw_sw_init_ctx;
driver->draw_ctx_deinit = lv_draw_sw_init_ctx;
driver->draw_ctx_size = sizeof(lv_draw_sw_ctx_t);


#else
driver->draw_ctx_init = lv_draw_sw_init_ctx;
driver->draw_ctx_deinit = lv_draw_sw_init_ctx;
driver->draw_ctx_size = sizeof(lv_draw_sw_ctx_t);
#endif

}
回复: 基于i.MXRT1052的pxp屏幕旋转问题

Hi  @dsd,

The LV_USE_GPU_NXP_PXP_AUTO_INIT allows LVGL to leverage the user of PXP for internal widget rendering, which could definitely cause issues when the application also uses this PXP in parallel for whole screen rotation. However, it is likely not the source of the issue.

From the initial code, it seems like you are not using dest_area, or rather you are using area as both source and destination for the PXP blit, which means that only the partial dirty region might be getting placed on different absolute positions rather than the intended.


回复: 基于i.MXRT1052的pxp屏幕旋转问题I used the code generated by guiguider to test it, even without using pxp rotation.
static void DEMO_FlushDisplay(lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p)
{
DCACHE_CleanInvalidateByRange((uint32_t)color_p, DEMO_FB_SIZE);

ELCDIF_SetNextBufferAddr(LCDIF, (uint32_t)color_p);

s_framePending = true;

if (xSemaphoreTake(s_frameSema, portMAX_DELAY) == pdTRUE)
{
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
else
{
PRINTF("Display flush failed\r\n");
assert(0);
}
}
Simply modify the macro /*Use NXP's PXP GPU iMX RTxxx platforms*/
#define LV_USE_GPU_NXP_PXP 1
#if LV_USE_GPU_NXP_PXP
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol SDK_OS_FREE_RTOS
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
/
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 1
#endif /* LV_USE_GPU_NXP_PXP */
The same problem will occur, and the direction of the offset will be the same as after rotation.
回复: 基于i.MXRT1052的pxp屏幕旋转问题

What's even stranger is that there are two different results within the same project, even though I thought the configuration should be the same.


No display offset occurred

aa54bb55bcbe69edeb3ed99d2d5b34f6.jpg

Display offset occurs

48bd7586b0015a50b87d64e4ffe42438.jpg

 

 

タグ(1)
評価なし
バージョン履歴
最終更新日:
57 分前
更新者: