Re: [Mesa-dev] [PATCH 0/2] code de-duplication and non-pci support
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.roman...@intel.com On 12/14/2013 11:28 AM, Rob Clark wrote: From: Rob Clark robcl...@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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/2] code de-duplication and non-pci support
bump.. Any chance someone from the pci camp could have a look at this series? Also, I'm not quite sure about other build systems (android.. and is scons still a thing?).. something is probably needed for those, but I wouldn't know how to build with either of those. But something like this patchset is needed for those of us without PC (well, right now freedreno, but there are a couple more that hopefully end up upstream eventually). So would like to know how to move forward. BR, -R On Tue, Dec 17, 2013 at 1:01 PM, Erik Faye-Lund kusmab...@gmail.com wrote: On Sat, Dec 14, 2013 at 8:28 PM, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@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 Nice. I've replaced Thierry's patch that does the latter, but only for GBM, and the result still works fine. So: Tested-by: Erik Faye-Lund kusmab...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 0/2] code de-duplication and non-pci support
On Sat, Dec 14, 2013 at 8:28 PM, Rob Clark robdcl...@gmail.com wrote: From: Rob Clark robcl...@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 Nice. I've replaced Thierry's patch that does the latter, but only for GBM, and the result still works fine. So: Tested-by: Erik Faye-Lund kusmab...@gmail.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev