diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-04-20 12:15:23 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-05 13:47:48 -0400 |
commit | 3c5fe78801dbadc82cc25f4a63a983fea15d938b (patch) | |
tree | e97fd50eab3dedd713e6aaf8454984072a933620 /configure.ac | |
parent | 09361395363805b5892d48d7bc10cf717e4d2927 (diff) |
drm: add tests/amdgpu (v3)
This adds some basic unit tests for the new amdgpu driver.
v2: use common util_math.h
v3: implement suggestions from Emil
replace malloc/memset with calloc
make header guards all caps
use posix_memalign rather than mem_align
replace malloc with calloc for pm4 allocations
make CU_SuiteInfo static
fix Makefile.am
fix fd numbering
use drmGetVersion/drmFreeVersion rather than open coding it
close fd, clean up CU registry on error
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 81ffb2c5..71c45ab1 100644 --- a/configure.ac +++ b/configure.ac @@ -362,6 +362,28 @@ fi AM_CONDITIONAL(HAVE_AMDGPU, [test "x$AMDGPU" = xyes]) if test "x$AMDGPU" = xyes; then AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support]) + + # Detect cunit library + PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no]) + + # If pkg-config does not find cunit, check it using AC_CHECK_LIB. We + # do this because Debian (Ubuntu) lacks pkg-config file for cunit. + if test "x${have_cunit}" = "xno"; then + AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no]) + if test "x${have_cunit}" = "xyes"; then + CUNIT_LIBS="-lcunit" + CUNIT_CFLAGS="" + AC_SUBST([CUNIT_LIBS]) + AC_SUBST([CUNIT_CFLAGS]) + fi + fi + + AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"]) + AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support]) + + if test "x$have_cunit" = "xno"; then + AC_MSG_WARN([Could not find cunit library. Disabling amdgpu tests]) + fi fi AM_CONDITIONAL(HAVE_TEGRA, [test "x$TEGRA" = xyes]) @@ -480,6 +502,7 @@ AC_CONFIG_FILES([ tests/kmstest/Makefile tests/proptest/Makefile tests/radeon/Makefile + tests/amdgpu/Makefile tests/vbltest/Makefile tests/exynos/Makefile tests/tegra/Makefile |