Open moroslantia opened 1 year ago
errno 22 means "invalid argument" in mmap
. Can you print the arguments passed to mmap
?
// 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. :slightly_frowning_face:
I try to use RPi4 with DRM dispplay driver
When starting my program it fails with
Any idea what's wrong?