I am developing a graphical application in C++ on an embedded Linux system (Yocto distribution) running on an i.MX6 processor. The touchscreen display has a resolution of 480x272 and I am using the framebuffer.
I am working with LVGL v9.0.0. After initializing the library, I create the display using lv_linux_fbdev_create :
lv_init();
lv_display_t* display = lv_linux_fbdev_create();
lv_linux_fbdev_set_file(display, "/dev/fb0");
lv_display_set_resolution(display, 480, 272);
The execution freezes inside the lv_linux_fbdev_create function.
Inside this function, I modified the following line of code:
lv_display_t * disp = lv_display_create(800, 480);
to:
lv_display_t * disp = lv_display_create(480, 272);
In practice, I set my display resolution as the default, and this resolved the issue. It seems that the problem is caused by creating a display with a resolution higher than the actual framebuffer resolution.
Since I added the LVGL library to my project as a git submodule, I cannot commit this modification directly.
Is there a proper way to fix this from the application code without modifying the library source?