Hi,
I have a program running on Raspberry Pi OS Lite Bookworm 64 bits that makes use of DRM+GBM, EGL and GLES.
The program makes use of a custom DPI bridge for VGA666 like devices and was running fine in all Pi3, Pi4 and Pi5 models so far.
The problem came when I started with the development of on the fly timing changes. I'm developing over a RPi4 and I was able to do multiple full video subsystem re-init in about 32ms, and the result was amazing. Everything working properly with many stress tests.
After doing all this testing, I moved to the Pi5 (same SD) and the program is running fine until a re-init is performed and a segfault is raised. So after some debugging with GDB I noticed that the second time that I execute the below chunk of code, drmModeGetResources, drmModeGetConnector and get_video_mode are retrieving all information properly but drmModeGetEncoder it is always returning NULL. This is only happening in the Pi5:
Is there any known BUG related to DRM management in Pi5 model?
I have a program running on Raspberry Pi OS Lite Bookworm 64 bits that makes use of DRM+GBM, EGL and GLES.
The program makes use of a custom DPI bridge for VGA666 like devices and was running fine in all Pi3, Pi4 and Pi5 models so far.
The problem came when I started with the development of on the fly timing changes. I'm developing over a RPi4 and I was able to do multiple full video subsystem re-init in about 32ms, and the result was amazing. Everything working properly with many stress tests.
After doing all this testing, I moved to the Pi5 (same SD) and the program is running fine until a re-init is performed and a segfault is raised. So after some debugging with GDB I noticed that the second time that I execute the below chunk of code, drmModeGetResources, drmModeGetConnector and get_video_mode are retrieving all information properly but drmModeGetEncoder it is always returning NULL. This is only happening in the Pi5:
Code:
p_res = drmModeGetResources(gbm_ctx.fd);drm_ctx.connector_vga = drmModeGetConnector(gbm_ctx.fd, p_res->connectors[video_cfg_ctx.vga_connector]); // Can refresh modes/* Select the first mode with native resolution */native_h = video_cfg_ctx.replay_video_mode_h = drm_ctx.connector_vga->modes[0].hdisplay;native_v = video_cfg_ctx.replay_video_mode_v = drm_ctx.connector_vga->modes[0].vdisplay;native_r = video_cfg_ctx.replay_video_mode_r = drm_ctx.connector_vga->modes[0].vrefresh;/* Get video mode */drm_ctx.video_mode_vga = get_video_mode(native_h, native_v, native_r, drm_ctx.connector_vga);drm_ctx.mode_info_vga = drm_ctx.connector_vga->modes[drm_ctx.video_mode_vga];/* Get encoder */drm_ctx.encoder_vga = drmModeGetEncoder(gbm_ctx.fd, drm_ctx.connector_vga->encoder_id);drmModeFreeResources(p_res);
Statistics: Posted by rTomasa — Sun Mar 31, 2024 11:44 pm