lvgl / lv_port_linux

LVGL configured to work with a standard Linux framebuffer
MIT License
253 stars 159 forks source link

Zybo-Z7-10 Petalinux /dev/fb0 frame buffer fbdev #2

Closed martin-scott-bluefruit closed 5 years ago

martin-scott-bluefruit commented 5 years ago

I have downloaded and cross compiled the demo on Ubuntu VM. Following transfer to the Zybo it runs under Petalinux but the image is distorted and lined.

If I run fbset I get

image

Can this be fixed with some parameter changes in the demo?

embeddedt commented 5 years ago

What is the problem?

martin-scott-bluefruit commented 5 years ago

Hi, the image is distorted - it is double width, looks monochrome, and has vertical striations. The text is readable. I am wondering if there is a format mismatch - i am not sure what the rgba definition means and how it relates to the littlevgl formats

embeddedt commented 5 years ago

It's likely that lv_drivers/display/fbdev.c needs some modifications to accomodate your framebuffer's color format.

martin-scott-bluefruit commented 5 years ago

ok, i'll do some more research, thanks

martin-scott-bluefruit commented 5 years ago

Problem seems to be that memcpy (in fbdev_flush) cannot be used to copy to this 24bpp framebuffer because the color_p format is 32 bits. Therefore memcpy should be substituted with a version that skips every 4th byte, or support for a different color_p format is required. I tried changing petalinux /dev/fb0 to 32bpp but it does not seem to stick.

embeddedt commented 5 years ago

memcpy should be substituted with a version that skips every 4th byte

This is probably the simplest solution.