dri/drm/kms question with regards to minor faults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I have an application I'm working on where I'm using OpenGLES / EGL and dri/drm/kms. The main loop of my application looks like the code below. When running htop, I see that the number of minor faults (memory) are increasing over time at a rate of about 500 per second, due to the code below. Is this normal and something to worry about, and is there a way to get rid of the minor faults? I'm on the rockchip rk3288 platform. The faults do not come from my OpenGLES code. 

      while (true) {
                 struct gbm_bo *next_bo;
                 int waiting_for_flip = 1;
          
                 // do OpenGLES stuff ... 

                 eglSwapBuffers(gl.display, gl.surface);
                 next_bo = gbm_surface_lock_front_buffer(gbm.surface);
                 g_fb = drm_fb_get_from_bo(next_bo);

                 ret = drmModePageFlip(drm.fd, drm.crtc_id, g_fb->fb_id,
                                 DRM_MODE_PAGE_FLIP_EVENT, &waiting_for_flip);
                 if (ret) {
                         printf("failed to queue page flip: %s\n", strerror(errno));
                         return -1;
                 }

                 while (waiting_for_flip) {
                         ret = select(drm.fd + 1, &fds, NULL, NULL, NULL);
                         if (ret < 0) {
                                 printf("select err: %s\n", strerror(errno));
                                 return ret;
                         } else if (ret == 0) {
                                 printf("select timeout!\n");
                                 return -1;
                         } else if (FD_ISSET(0, &fds)) {
                                 printf("user interrupted!\n");
                                 break;
                         }
                         drmHandleEvent(drm.fd, &evctx);
                 }
                 gbm_surface_release_buffer(gbm.surface, g_bo);
                 g_bo = next_bo;
        }

Thanks!
Bert



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux