android: pan/bi: Separate disasm/compiler targets Fixes the following building errors: ld.lld: error: undefined symbol: bi_interp_mode_name >>> referenced by bi_print.c:207 (external/mesa/src/panfrost/bifrost/bi_print.c:207) ... ld.lld: error: undefined symbol: bi_round_mode_name >>> referenced by bi_print.c:285 (external/mesa/src/panfrost/bifrost/bi_print.c:285) ld.lld: error: undefined symbol: bi_clause_type_name >>> referenced by disassemble.c:142 (external/mesa/src/panfrost/bifrost/disassemble.c:142) ... ld.lld: error: undefined symbol: bi_ldst_type_name >>> referenced by disassemble.c:0 (external/mesa/src/panfrost/bifrost/disassemble.c:0) Fixes: 14bb72c68 ("pan/bi: Separate disasm/compiler targets") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
android: pan/mdg: Separate disassembler and compiler targets Fixes the following building errors: ld.lld: error: undefined symbol: mir_print_constant_component >>> referenced by disassemble.c:356 (external/mesa/src/panfrost/midgard/disassemble.c:356) ... ld.lld: error: undefined symbol: mir_print_constant_component >>> referenced by disassemble.c:416 (external/mesa/src/panfrost/midgard/disassemble.c:416) Fixes: b792d613e ("pan/mdg: Separate disassembler and compiler targets") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
android: panfrost: Move pandecode into lib/ Fixes the following building errors: target C: libpanfrost_decode <= external/mesa/src/panfrost/pandecode/common.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/pandecode/common.c' clang: error: no input files Fixes: d62a6e7c5 ("panfrost: Move pandecode into lib/") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
android: panfrost: Rename encoder/ to lib/ Fixes the following building errors: target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_attributes.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_attributes.c' clang: error: no input files target C: libpanfrost_encoder <= external/mesa/src/panfrost/encoder/pan_afbc.c ... clang: error: no such file or directory: 'external/mesa/src/panfrost/encoder/pan_afbc.c' clang: error: no input files Fixes: 1c62b5528 ("panfrost: Rename encoder/ to lib/") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6261>
android: freedreno: move a2xx disasm out of gallium Fixes the following building errors: clang: error: no such file or directory: 'external/mesa/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c' clang: error: no input files FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so ld.lld: error: undefined symbol: disasm_a2xx >>> referenced by ir2_assemble.c:546 (external/mesa/src/gallium/drivers/freedreno/a2xx/ir2_assemble.c:546) >>> ir2_assemble.o:(assemble) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_freedreno_intermediates/libmesa_pipe_freedreno.a clang-9: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: f39afda1a7a ("freedreno: move a2xx disasm out of gallium") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>
panfrost: Align Android makefiles with recent changes Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Roman Stratiienko <roman.stratiienko@nure.ua> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4280> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4280>
freedreno: android: fix build of perfcounters. Some dependencies were missing on android causing a build failure. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3736>
etnaviv: update Android build files etnaviv no longer builds on Android, fix this. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3447>
android: radeonsi: fix build after vl refactoring (v2) vl functions moved from radeonsi to gallium/auxiliary/vl have left android build of radeonsi in broken state. libmesa_galliumvl static is need to build readeonsi, gallium_dri building rules are reworked to avoid multiple symbols and libmesa_galliumvl static dependency is needed in radeonsi. Here is the changelog: - android: gallium/auxiliary: add libmesa_galliumvl static - android: gallium_dri: move libmesa_gallium to static to prevent multiple symbols - android: radeonsi: fix build after vl refactoring Fixes the following building error: external/mesa/src/gallium/drivers/radeonsi/si_uvd.c:47: error: undefined reference to 'vl_video_buffer_create_as_resource' clang.real: error: linker command failed with exit code 1 (use -v to see invocation) Fixes: 86e60bc ("radeonsi: remove si_vid_join_surfaces and use combined planar allocations") Signed-off-by: Mauro Rossi <issor.oruam@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
android: Add panfrost support to build scripts Currently the Android build system doesn't expose the panfrost driver. This patch enables the panfrost driver to be build on for the Android platform. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-By: Rohan Garg <rohan.garg@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
android: fix linking issues with liblog Fixes Android build errors observed in Intel CI. Fixes: f9f7cbc1aa3 "util: android logging support" Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
lima: Fix Android.mk 1. Update LOCAL_SRC_FILES according to commit 54434fe67068 ("lima/gpir: Rework the scheduler"). 2. Add libpanfrost_shared.a dependency. 3. Generate lima_nir_algebraic.c with Android.mk Fixes Android build error introduced by commit 5adfc8602c63 ("lima/ppir: move sin/cos input scaling into NIR") Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com> Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Qiang Yu <yuq825@gmail.com>
mesa: android: freedreno: build libfreedreno_{drm,ir3} static libs Add libfreedreno_drm/ir3 to the build Cc: Rob Clark <robdclark@chromium.org> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Amit Pundir <amit.pundir@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Alistair Strachan <astrachan@google.com> Cc: Greg Hartman <ghartman@google.com> Cc: Tapani Pälli <tapani.palli@intel.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Fixes: b4476138d5a ("freedreno: move drm to common location") Fixes: aa0fed10d35 ("freedreno: move ir3 to common location") Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> [jstultz: Tweaked to add extra ir3 files from master] Signed-off-by: John Stultz <john.stultz@linaro.org>
android: static link with libexpat with Android O+ In Android O, MESA needs to statically link libexpat so that it's in same VNDK namespace. v2: apply change also to anv driver (Tapani) v3: use += in anv change (Eric Engestrom) Change-Id: I82b0be5c817c21e734dfdf5bfb6a9aa1d414ab33 Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com> Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
android: make libbacktrace optional on USE_LIBBACKTRACE Otherwise with VNDK enabled we fail linking: src/gallium/targets/dri/Android.mk: error: gallium_dri (native:vendor) should not link to libbacktrace.vendor (native:vndk_private) Option makes it possible to use libbacktrace only when VNDK is not enabled. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
gallium/util: Android backtrace support We can't use any of the existing implementations in u_debug_stack. Android technically has libunwind, but it's been modified to the point where it no longer compiles with the Mesa usage. The library is also not meant to be referenced by vendor libraries. The officially sanctioned way of obtaining backtraces is through the Android own libbacktrace, a C++ library. Access it through a separate C++ source file on Android only. Signed-off-by: Stefan Schake <stschake@gmail.com> Acked-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Android: move drivers' symlinks to /vendor (v2) Having moved gallium_dri.so library to /vendor/lib/dri also symlinks need to be coherently created using TARGET_OUT_VENDOR instead of TARGET_OUT or all non Intel drivers will not be loaded with Android N and earlier, thus causing SurfaceFlinger SIGABRT (v2) simplification of post install command Fixes: c3f75d483c ("Android: move libraries to /vendor") Cc: 17.3 <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (v1) Reviewed-by: Rob Herring <robh@kernel.org> (v1) Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Android: gallium_dri: pass dri.sym to linker Pass the dri.sym version script to the linker. This ensures only explicitly exported symbols are exported and shrinks the library by up to 60KB. HAVE_DLADDR also needs to be set so that __driDriverExtensions is defined. We need to pass "--undefined-version" because the Android build system sets --no-undefined-version by default and we get an error on driver specific symbols if those drivers are disabled without the option. Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
Android: fix typo in symlink for driver loading and 32 bit builds There is typo in the mkdir command path, the correct one is $(TARGET_OUT)/$(l)/$(MESA_DRI_MODULE_REL_PATH) The other issue is in 32bit builds, because lib64 does not exist there, we can use TARGET_IS_64_BIT to refine the post install command. Fixes: a3d98ca62f ("Android: use symlinks for driver loading") Signed-off-by: Rob Herring <robh@kernel.org>
Android: use symlinks for driver loading Instead of having special driver loading logic for Android, create symlinks to gallium_dri.so so we can use the standard loading logic. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Rob Herring <robh@kernel.org>