<div dir="ltr">Hi, everyone.<br><br>Trying to understand how drmModeAddFB work with gbm_bo object.<br><br>From google I know that I can use gbm_bo object as framebuffer with kms. The<br>code is like this.<br><br>struct gbm_device *gbm = gbm_create_device(fd);<br>struct gbm_bo *bo = gbm_bo_create(gbm, width, height,<br>                                  GBM_BO_FORMAT_XRGB8888,<br>                                  GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING );<br><br>and suppose we have set correct drm connector, encoders and EGL stuff.<br>Now we can create framebuffer with:<br><br>uint32_t handle = gbm_bo_get_handle(bo).u32;<br>uint32_t stride = gbm_bo_get_stride(bo);<br>drmModeAddFB(fd, width, height, 24, 32, stride, handle, &fb_id);<br>//and we can setCrtc now<br>drmModeSetCrtc(fd, crtc, fb_id, 0,0, connector_id, 1, mode);<br><br>But HOW did drmModeAddFB use the bo exactly? I have some example code using GL to<br>render something into a egl surface which is created from gbm_bo. And after<br>drmModeSetCrtc, I did get a triangle on my screen.<br><br>BTW, The example code is <a href="https://gist.github.com/dvdhrm/1364994">https://gist.github.com/dvdhrm/1364994</a><br><br>-Xeechem                                                                                                                                                                           <br></div>