[Mesa-dev] [PATCH 00/13] egl: gbm: Misc cleanups and robustness patches

Emil Velikov emil.l.velikov at gmail.com
Thu May 11 18:57:44 UTC 2017


Hi all,

I was around the EGL/GBM codebase and I've noticed that we do a few 
things, rather badly: 
 - we have unnessesary layer of abstraction in GBM like the following
gbm_dri_foo -> gbm_drm_foo -> gbm_foo
 - the teardown path of platform_foo initialize is in bad shape
Destroying someone else's dri screen, leaks etc.
 - gbm copies a bunch of EGL's extension management
Every so often we have to add DRI extension foo to GBM to align with 
EGL.

The lot can be found in branch 'egl-gbm-less-copy' at 
https://github.com/evelikov/Mesa

I've gone through the DRM/GBM, wayland and X11 platforms - both hardware 
and swrast based.

Extra testong on different platforms will still be appreciated.

Thanks


Emil Velikov (13):
  gbm: remove unused gbm_dri_device::loader
  gbm: remove "struct gbm_drm_bo" abstraction
  gbm: move gbm_drm_device::driver_name to gbm_dri_device
  gbm: remove unneeded gbm_drm_device abstraction
  egl: split out a dri2_display_destroy() helper
  egl/android: make use of dri2_display_destroy() helper
  egl/drm: make use of the dri2_display_destroy() helper
  egl/surfaceless: make use of the dri2_display_destroy() helper
  egl/wayland: make use of the dri2_display_destroy() helper
  egl/x11: make use of the dri2_display_destroy() helper
  egl: refactor dri2_create_screen() into three separate functions
  egl/drm: use dri2_setup_extensions() over the extensions provided by
    GBM
  gbm: don't manage our set of DRI extensions

 src/egl/drivers/dri2/egl_dri2.c             |  48 +++++-----
 src/egl/drivers/dri2/egl_dri2.h             |   6 ++
 src/egl/drivers/dri2/platform_android.c     |  32 +++----
 src/egl/drivers/dri2/platform_drm.c         |  42 ++++-----
 src/egl/drivers/dri2/platform_surfaceless.c |  29 +++---
 src/egl/drivers/dri2/platform_wayland.c     |  94 +++++++------------
 src/egl/drivers/dri2/platform_x11.c         |  93 ++++++++-----------
 src/gbm/Makefile.sources                    |   1 -
 src/gbm/backends/dri/gbm_dri.c              | 139 ++++++++++++----------------
 src/gbm/backends/dri/gbm_driint.h           |  19 ++--
 src/gbm/main/common_drm.h                   |  48 ----------
 11 files changed, 222 insertions(+), 329 deletions(-)
 delete mode 100644 src/gbm/main/common_drm.h

-- 
2.12.2



More information about the mesa-dev mailing list