We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to use RPi4 with DRM dispplay driver
drm_init(); /*A small buffer for LittlevGL to draw the screen's content*/ static lv_color_t buf[DISP_BUF_SIZE],buf1[DISP_BUF_SIZE]; /*Initialize a descriptor for the buffer*/ static lv_disp_draw_buf_t disp_buf; lv_disp_draw_buf_init(&disp_buf, buf, buf1, DISP_BUF_SIZE); /*Initialize and register a display driver*/ static lv_disp_drv_t disp_drv; lv_disp_drv_init(&disp_drv); disp_drv.draw_buf = &disp_buf; disp_drv.flush_cb = drm_flush; disp_drv.wait_cb = drm_wait_vsync; disp_drv.hor_res = 800; disp_drv.ver_res = 480; lv_disp_drv_register(&disp_drv);
When starting my program it fails with
drm: Found plane_id: 86 connector_id: 32 crtc_id: 96 drm: 2560x1440 (550mm X 310mm) pixel format AR24 error: mmap fail (errno 22) error: DRM buffer allocation failed
Any idea what's wrong?
The text was updated successfully, but these errors were encountered:
errno 22 means "invalid argument" in mmap. Can you print the arguments passed to mmap?
mmap
Sorry, something went wrong.
// drm.c 644:649 /* perform actual memory mapping */ buf->map = mmap(0, creq.size, PROT_READ | PROT_WRITE, MAP_SHARED, drm_dev.fd, mreq.offset); if (buf->map == MAP_FAILED) { err("mmap fail (errno=%i), creq.size=%" PRIu64 ", drm_dev.fd=%i, mreq.offset=%" PRIx64, errno, creq.size, drm_dev.fd, mreq.offset); return -1; }
Running the demo gives:
drm: Found plane_id: 86 connector_id: 32 crtc_id: 96 drm: 2560x1440 (550mm X 310mm) pixel format AR24 error: mmap fail (errno=22), creq.size=14745600, drm_dev.fd=3, mreq.offset=118a7c000 error: DRM buffer allocation failed Segmentation fault
These values makes sense to me. I suspect that it's a Raspberry issue. 🙁
No branches or pull requests
I try to use RPi4 with DRM dispplay driver
When starting my program it fails with
Any idea what's wrong?
The text was updated successfully, but these errors were encountered: