Coder Social home page Coder Social logo

Some bug-like issues about lv_port_linux HOT 11 CLOSED

pan1024 avatar pan1024 commented on July 29, 2024
Some bug-like issues

from lv_port_linux.

Comments (11)

pan1024 avatar pan1024 commented on July 29, 2024

I got this error "[Error] (4292956.517, +4292956517) lv_display_set_buffers: Asserted at expression: stride * h <= buf_size DIRECT mode requires screen sized buffer(s) lv_display.c:419"

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

I don't know how to set this due to the change of interface, but I found LV_LINUX_FBDEV_BUFFER_SIZE in lv_config.h and set it to my screen size (480*480) but this is invalid and I still get that error.

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

Until I found out about this
lv_display_t * lv_linux_fbdev_create(void)
{
static bool inited = false;
if(!inited) {
lv_tick_set_cb(tick_get_cb),
inited = true;
}

lv_linux_fb_t * dsc = lv_malloc_zeroed(sizeof(lv_linux_fb_t));
LV_ASSERT_MALLOC(dsc);
if(dsc == NULL) return NULL;

lv_display_t * disp = lv_display_create(800, 480);
if(disp == NULL) {
    lv_free(dsc);
    return NULL;
}
dsc->fbfd = -1;
lv_display_set_driver_data(disp, dsc);
lv_display_set_flush_cb(disp, flush_cb);

return disp;

}
Maybe you found the problem, lv_display_t * disp = lv_display_create(800, 480); When I modify it to lv_display_t * disp = lv_display_create(480, 480); The program is ready to run, and I found the same problem in the DRM code

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

As I continued reading the source code, I found this
if(LV_LINUX_FBDEV_RENDER_MODE == LV_DISPLAY_RENDER_MODE_PARTIAL) {
draw_buf_size *= LV_LINUX_FBDEV_BUFFER_SIZE;}
However, there is no LV_DISPLAY_RENDER_MODE_PARTIAL in lv_conf.h, and perhaps more details are needed to refine the use of the new version

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

Hi,

Can you send a code snippet to reproduce the issue with

  • how you create the display
  • the FBDEV related part of lv_conf.h

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

Hi,

Can you send a code snippet to reproduce the issue with

  • how you create the display
  • the FBDEV related part of lv_conf.h

I didn't make any changes to the project after I got it, I put it on my board after cross-compiling it according to the README, at this point I was already wondering why there was no screen configuration similar to v8.3, and then the error I mentioned occurred at runtime

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

Hi,
Can you send a code snippet to reproduce the issue with

  • how you create the display
  • the FBDEV related part of lv_conf.h

I didn't make any changes to the project after I got it, I put it on my board after cross-compiling it according to the README, at this point I was already wondering why there was no screen configuration similar to v8.3, and then the error I mentioned occurred at runtime

lv_display_t * lv_linux_fbdev_create (void) It comes from lvgl/src/drivers/display/fb

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

Please print dsc->vinfo.bits_per_pixel.

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

Please print dsc->vinfo.bits_per_pixel.
dsc->vinfo.bits_per_pixel:32

from lv_port_linux.

pan1024 avatar pan1024 commented on July 29, 2024

Please print dsc->vinfo.bits_per_pixel.

I'm not sure you understand what I mean, but I mean from the main.c example so far lv_linux_fbdev_create the (void) design may not be flexible enough, and when I want to change the screen size, I need to go into the source code to modify it, if there is an easier way, please let me know

from lv_port_linux.

kisvegabor avatar kisvegabor commented on July 29, 2024

what I mean, but I mean from the main.c example so far lv_linux_fbdev_create the (void) design may not be flexible enough, and when I want to change the screen size, I need to go into the source code to modify it, if there is an easier way, please let me know

Oh, I really misunderstood it and it's really set the the screen's resolution by default. What we can do is calling lv_display_set_resolution(display, hor_res, ver_res) from main.c but in lv_linux_fbdev_create we can add an LV_EVENT_RESOLUTION_CHANGED event to the display where we can reallocate the buffers.

from lv_port_linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.