<div dir="ltr"><div class="gmail_extra">Hi Ander,<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Some comments inline.<br><br></div><div class="gmail_extra">And I have some further thinking about current GBM support, which is tied to specific implementation closely, although the GBM APIs are quite independent from mesa. I have some idea below to make GBM a generic solution. I'm not sure if anybody else in the community raised this before. What's your opinion?<br>
<br></div><div class="gmail_extra">- Decouple the GBM main library as standard API from mesa, and a separate repository can be maintained for this library, which defines callbacks for backend to implement. It can be packaged separately from mesa by distros.<br>
</div><div class="gmail_extra">- Build the DRI backend as a separate library (i.e, gbm_dri.so) just as the gallium backend, and it should still be part of mesa.<br></div><div class="gmail_extra">- New native backend can be implemented (i.e, gbm_intel.so), and the GBM backend can be specified in some configuration file (i.e, /etc/gbm.conf) if several backends can be used.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,<br>Jammy<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-03-13 22:02 GMT+08:00 Ander Conselvan de Oliveira <span dir="ltr"><<a href="mailto:conselvan2@gmail.com" target="_blank">conselvan2@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Ander Conselvan de Oliveira <<a href="mailto:ander.conselvan.de.oliveira@intel.com">ander.conselvan.de.oliveira@intel.com</a>><br>

<br>
Hi,<br>
<br>
This patch series implements an API for mapping an unapping GBM buffer<br>
objects. The native intel backend was implemented so that the map and<br>
unmap functionality wouldn't have to be implemented in the DRI image<br></blockquote><div><br>Can you elaborate more about why the map/unmap functionality cannot be implemented in the DRI image extension?<br></div><div>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
extension. A new EGL platform is necessary, since platform_drm.c<br>
assumes it is run on top of a gbm device with the dri backend.<br></blockquote><div><br>The new gbm platform is quite similar as the existing drm platform, why not improve the drm platform to satisfy the new requirements? For example, some abstraction can be done to decouple gbm_dri backend dependency.<br>
<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
This new platform is written so that it could support other native<br>
backends, not only intel.<br>
<br>
Comments are really welcome.<br>
<br>
Thanks,<br>
Ander<br>
<br>
Ander Conselvan de Oliveira (8):<br>
  egl/drm: Rename dri2_egl_surface field gbm_surf to gbm_dri_surf<br>
  egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM<br>
  gbm: Add a native intel backend<br>
  gbm_drm: Keep a reference to drm native objects<br>
  dri, i965: Add an extension for sharing the drm bufmgr<br>
  dri, i965: Add entry point for creating image from native handle<br>
  egl/dri: Add gbm platform<br>
  gbm: Add entry points for mapping and unmapping bos<br>
<br>
 <a href="http://configure.ac" target="_blank">configure.ac</a>                              |   7 +-<br>
 include/GL/internal/dri_interface.h       |  24 +-<br>
 src/egl/drivers/dri2/Makefile.am          |   5 +<br>
 src/egl/drivers/dri2/egl_dri2.c           |   8 +<br>
 src/egl/drivers/dri2/egl_dri2.h           |  16 +-<br>
 src/egl/drivers/dri2/platform_drm.c       |   6 +-<br>
 src/egl/drivers/dri2/platform_gbm.c       | 486 ++++++++++++++++++++++++++++++<br>
 src/egl/main/Makefile.am                  |   5 +<br>
 src/egl/main/egldisplay.c                 |   3 +-<br>
 src/egl/main/egldisplay.h                 |   1 +<br>
 src/gbm/Makefile.am                       |  14 +-<br>
 src/gbm/backends/dri/gbm_dri.c            |   3 +<br>
 src/gbm/backends/intel/gbm_intel.c        | 270 +++++++++++++++++<br>
 src/gbm/backends/intel/gbm_intel.h        |  76 +++++<br>
 src/gbm/main/backend.c                    |   2 +<br>
 src/gbm/main/common_drm.h                 |  13 +<br>
 src/gbm/main/gbm.c                        |  25 ++<br>
 src/gbm/main/gbm.h                        |  10 +<br>
 src/gbm/main/gbmint.h                     |   4 +<br>
 src/mesa/drivers/dri/common/dri_util.c    |   2 +<br>
 src/mesa/drivers/dri/common/dri_util.h    |   1 +<br>
 src/mesa/drivers/dri/i965/intel_regions.c |  50 +--<br>
 src/mesa/drivers/dri/i965/intel_regions.h |   6 +<br>
 src/mesa/drivers/dri/i965/intel_screen.c  |  46 ++-<br>
 24 files changed, 1044 insertions(+), 39 deletions(-)<br>
 create mode 100644 src/egl/drivers/dri2/platform_gbm.c<br>
 create mode 100644 src/gbm/backends/intel/gbm_intel.c<br>
 create mode 100644 src/gbm/backends/intel/gbm_intel.h<br>
<span class=""><font color="#888888"><br>
--<br>
1.8.3.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>