[Mesa-dev] [PATCH 0/2] code de-duplication and non-pci support

Ian Romanick idr at freedesktop.org
Fri Jan 17 13:18:48 PST 2014


With Kristian's comment about keeping the original copyright notices
intact addressed, patches 1, 2, 3, 4, 7, 8, and 10 are

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 12/14/2013 11:28 AM, Rob Clark wrote:
> From: Rob Clark <robclark at freedesktop.org>
> 
> It seems that over time, code related to finding driver name, dealing
> with pci-id table, etc, has been copy/pasted everywhere it was needed.
> Which is lame.  And annoying if you have a device which is not pci.
> 
> This patchset refactors it out into a simple loader util lib which is
> statically linked wherever it is needed.  Perhaps there is some room
> for sharing other util bits (like _eglLog, perhaps) later.
> 
> And once all this code is collected in one place, the 2nd patch only
> has to fix one place to add support for platform devices ;-)
> 
> Rob Clark (2):
>   loader: refactor duplicated code into loader util lib
>   loader: fallback to drmGetVersion() for non-pci devices
> 
>  configure.ac                                       |   1 +
>  include/pci_ids/pci_id_driver_map.h                |  29 ++-
>  src/Makefile.am                                    |   2 +-
>  src/egl/drivers/dri2/Makefile.am                   |   5 +-
>  src/egl/drivers/dri2/common.c                      | 144 -----------
>  src/egl/drivers/dri2/egl_dri2.h                    |   5 -
>  src/egl/drivers/dri2/platform_android.c            | 105 +-------
>  src/egl/drivers/dri2/platform_drm.c                |   5 +-
>  src/egl/drivers/dri2/platform_wayland.c            |   5 +-
>  src/gallium/auxiliary/pipe-loader/Makefile.am      |   4 +
>  src/gallium/auxiliary/pipe-loader/pipe_loader.h    |   1 +
>  .../auxiliary/pipe-loader/pipe_loader_drm.c        |  92 +------
>  src/gallium/state_trackers/clover/core/device.cpp  |   2 +
>  src/gallium/targets/egl-static/Makefile.am         |   2 +
>  src/gallium/targets/egl-static/egl.c               | 186 +-------------
>  src/gbm/Makefile.am                                |  10 +-
>  src/gbm/backends/dri/driver_name.c                 |  89 -------
>  src/gbm/backends/dri/gbm_dri.c                     |   3 +-
>  src/gbm/backends/dri/gbm_driint.h                  |   3 -
>  src/glx/dri3_common.c                              | 146 -----------
>  src/glx/dri3_glx.c                                 |   3 +-
>  src/glx/dri3_priv.h                                |   3 -
>  src/loader/Makefile.am                             |  37 +++
>  src/loader/loader.c                                | 276 +++++++++++++++++++++
>  src/loader/loader.h                                |  57 +++++
>  25 files changed, 442 insertions(+), 773 deletions(-)
>  delete mode 100644 src/egl/drivers/dri2/common.c
>  delete mode 100644 src/gbm/backends/dri/driver_name.c
>  delete mode 100644 src/glx/dri3_common.c
>  create mode 100644 src/loader/Makefile.am
>  create mode 100644 src/loader/loader.c
>  create mode 100644 src/loader/loader.h
> 



More information about the mesa-dev mailing list