Skip to contentSkip to conversation

Fix IGTs for Android

PATCH In review Arkadiusz Hiler 4 participants 24 messages May 16, 2017 – May 18, 2017 Library code

lore
Share & tools
lore
#0 lore raw

v2 cover Fix IGTs for Android

IGTs are broken for Android since the introduction of dependency on procps. Over time other incompatibilities built up.

I took the liberty to fix some of the issues, workaround couple of others and blacklist heavily incompatible tools/tests.

It builds on (almost) vanilla AOSP now.

Github: <https://github.com/ivyl/igt/commits/android>
Howto:  <https://gist.github.com/ivyl/1e05af15ae37b575e03dc69e5e2488fc>

now including docker exmaple / script for your convenience

DEP1: <https://github.com/ivyl/libkmod-android> - just builds Google's one
DEP2: <https://github.com/android-ia/external_libpciaccess>

We should include a note on Android compatibility in the README and do "continuous compilation" of the patches as they arrive on the mailing list, otherwise this **will get broken again soon**.

This is long as it is, but not complete yet.

Here are some of more obvious TODOs:
* introduce something like IGT_HAS_CAIRO define for convenience
* revise igt_kms dependency on cairo and enable everything what is independent
* revise kms tests and do the above
* review all things that are disabled on Android and try to enable them
* do something less ugly with config.h generation on Android

v2: couple of suggested fixed + everything that was not compatible since last
patch

Cc Petri Latvala <[email protected]>
Cc Antonio Argenziano <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Robert Foss <[email protected]>

Arkadiusz Hiler (13):
tests/drm_import_export: Include {i915_,}drm.h properly Make conditions on HAVE_UDEV consistent
lib/igt_aux: Include unistd.h for gettid() on Android lib/igt_aux: Make procps optional
chamelium: Fix build issues on Android tools/Android.mk: Add guc_logger and l3_parity skip list tests/Android.mk: Add perf to skip list
Android.mk: Fix libkmod use
Android.mk: Filter out *.h from src files
Android.mk: Use drm stubs
tools/Android.mk: Fix zlib inclusion tests/gem_exec_nop: Disable headless subtest on cairoless Android tests/gem_exec_nop: Rename signal() to fence_signal()

 benchmarks/Android.mk          |  5 ++++-
 configure.ac                   |  6 +++++-
 demos/Android.mk               |  3 ++-
 lib/Android.mk                 |  7 ++++---
 lib/Makefile.am                |  7 +++++++
 lib/Makefile.sources           |  7 -------
 lib/igt.h                      |  2 ++
 lib/igt_aux.c                  | 37 +++++++++++++++++++++++++++++++++----
 lib/igt_aux.h                  |  5 +++++
 lib/igt_chamelium.h            |  3 +++
 lib/igt_kmod.h                 |  4 ++++
 lib/tests/Android.mk           |  4 ++--
 tests/Android.mk               |  9 +++++----
 tests/Makefile.am              |  6 ++++++
 tests/Makefile.sources         |  6 ------
 tests/drm_import_export.c      |  4 ++--
 tests/gem_exec_nop.c           | 14 +++++++++-----
 tests/testdisplay_hotplug.c    |  2 +-
 tools/Android.mk               | 14 +++++++++-----
 tools/intel_l3_parity.c        |  2 +-
 tools/intel_l3_parity.h        |  2 +-
 tools/intel_l3_udev_listener.c |  2 +-
 22 files changed, 106 insertions(+), 45 deletions(-)
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH v2 1/13 tests/drm_import_export: Include {i915_, }drm.h properly

Using libdrm/ impairs compatibility with android build system and pkg-config manages -I for us on regular distros.

---
 tests/drm_import_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drm_import_export.c +2 -2
index cfe5f6d..f1234bd 100644
@@ -32,8 +32,8 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
-#include <libdrm/drm.h>
-#include <libdrm/i915_drm.h>
+#include <drm.h>
+#include <i915_drm.h>
 #include <xf86drm.h>
 #include <intel_bufmgr.h>
 #include <errno.h>
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH v2 2/13 Make conditions on HAVE_UDEV consistent

In reply to Arkadiusz Hiler

We have a lot of #ifdef HAVE_UDEV and #if HAVE_UDEV all over the place, but ifdef and if have a slightly different semantics.

Let make it consistent by using #ifdefs only.

---
 lib/igt_aux.c                  | 2 +-
 tests/testdisplay_hotplug.c    | 2 +-
 tools/intel_l3_parity.c        | 2 +-
 tools/intel_l3_parity.h        | 2 +-
 tools/intel_l3_udev_listener.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
lib/igt_aux.c +1 -1
index 1222806..2ec6b78 100644
@@ -388,7 +388,7 @@ void igt_stop_shrink_helper(void)
 	igt_stop_helper(&shrink_helper);
 }
 
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
 #include <libudev.h>
 
 static struct igt_helper_process hang_detector;
tests/testdisplay_hotplug.c +1 -1
index 3b900ca..cf15511 100644
@@ -34,7 +34,7 @@
 #endif
 
 
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
 #include <libudev.h>
 static struct udev_monitor *uevent_monitor;
 static struct udev *udev;
tools/intel_l3_parity.c +1 -1
index dce7f32..eb00c50 100644
@@ -42,7 +42,7 @@
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
 #include <libudev.h>
 #include <syslog.h>
 #endif
tools/intel_l3_parity.h +1 -1
index 65697c4..759c4f4 100644
@@ -18,7 +18,7 @@ struct l3_location {
 	uint8_t subbank;
 };
 
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
 int l3_uevent_setup(struct l3_parity *par);
 /* Listens (blocks) for an l3 parity event. Returns the location of the error. */
 int l3_listen(struct l3_parity *par, bool daemon, struct l3_location *loc);
tools/intel_l3_udev_listener.c +1 -1
index 0b94c1c..270bfff 100644
@@ -25,7 +25,7 @@
 #include "config.h"
 #endif
 
-#if HAVE_UDEV
+#ifdef HAVE_UDEV
 #include <libudev.h>
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH v2 3/13 lib/igt_aux: Include unistd.h for gettid() on Android

In reply to Arkadiusz Hiler

We define gettid() using syscall() because glibc does not provide a wrapper.

Android's bionic got the syscall covered though.

---
 lib/igt_aux.h | 5 +++++
 1 file changed, 5 insertions(+)
lib/igt_aux.h +5 -0
index e62858e..54b9716 100644
@@ -43,7 +43,12 @@ extern int num_trash_bos;
 #define NSEC_PER_SEC (1000*USEC_PER_SEC)
 
 /* signal interrupt helpers */
+#ifdef ANDROID
+#include <unistd.h> /* on Android bionic has this implemented */
+#else
 #define gettid() syscall(__NR_gettid)
+#endif
+
 #define sigev_notify_thread_id _sigev_un._tid
 
 /* auxialiary igt helpers from igt_aux.c */
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH v2 4/13 lib/igt_aux: Make procps optional

In reply to Arkadiusz Hiler

Android does not have procps and it's not easy to compile it as a dependency.

We can provide alternative, "naive" implementation that just shells out to external commands (i.e. pkill and lsof) in case we do not have the library.

v2: have separate functions for naive impls (J. Nikula)

---
 configure.ac  |  6 +++++-
 lib/igt_aux.c | 35 ++++++++++++++++++++++++++++++++---
 2 files changed, 37 insertions(+), 4 deletions(-)
configure.ac +5 -1
index 5342e33..72cb32f 100644
@@ -123,7 +123,11 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS)
 PKG_CHECK_MODULES(DRM, [libdrm])
 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
 PKG_CHECK_MODULES(KMOD, [libkmod])
-PKG_CHECK_MODULES(PROCPS, [libprocps])
+PKG_CHECK_MODULES(PROCPS, [libprocps], [procps=yes], [procps=no])
+AM_CONDITIONAL(HAVE_PROCPS, [test "x$procps" = xyes])
+if test x"$procps" = xyes; then
+	AC_DEFINE(HAVE_PROCPS,1,[Enable process managment without shelling out])
+fi
 PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
 
 if test x$have_valgrind = xyes; then
lib/igt_aux.c +32 -3
index 2ec6b78..f76e55d 100644
@@ -50,9 +50,7 @@
 #include <sys/utsname.h>
 #include <termios.h>
 #include <assert.h>
-
-#include <proc/readproc.h>
-
+#include <linux/limits.h>
 #include "drmtest.h"
 #include "i915_drm.h"
 #include "intel_chipset.h"
@@ -71,6 +69,10 @@
 #include <libgen.h>   /* for dirname() */
 #endif
 
+#ifdef HAVE_PROCPS
+#include <proc/readproc.h>
+#endif
+
 /**
  * SECTION:igt_aux
  * @short_description: Auxiliary libraries and support functions
@@ -1293,6 +1295,7 @@ void igt_set_module_param_int(const char *name, int val)
  * This function sends the signal @sig for a process found in process table
  * with name @comm.
  */
+#ifdef HAVE_PROCPS
 int igt_terminate_process(int sig, const char *comm)
 {
 	PROCTAB *proc;
@@ -1317,7 +1320,19 @@ int igt_terminate_process(int sig, const char *comm)
 	closeproc(proc);
 	return err;
 }
+#else
+#warning "No procps, using naive implementation of igt_terminate_process"
 
+int igt_terminate_process(int sig, const char *comm)
+{
+	char pkill_cmd[NAME_MAX];
+
+	snprintf(pkill_cmd, sizeof(pkill_cmd), "pkill -x -%d %s", sig, comm);
+	return system(pkill_cmd);
+}
+#endif
+
+#ifdef HAVE_PROCPS
 struct pinfo {
 	pid_t pid;
 	const char *comm;
@@ -1499,6 +1514,7 @@ __igt_lsof(const char *dir)
 
 	closeproc(proc);
 }
+#endif
 
 /**
  * igt_lsof: Lists information about files opened by processes.
@@ -1507,6 +1523,7 @@ __igt_lsof(const char *dir)
  * This function mimics (a restrictive form of) lsof(8), but also shows
  * information about opened fds.
  */
+#ifdef HAVE_PROCPS
 void
 igt_lsof(const char *dpath)
 {
@@ -1531,6 +1548,18 @@ igt_lsof(const char *dpath)
 
 	free(sanitized);
 }
+#else
+#warning "No procps, using naive implementation of igt_lsof"
+
+void
+igt_lsof(const char *dpath)
+{
+	char lsof_cmd[NAME_MAX];
+
+	snprintf(lsof_cmd, sizeof(lsof_cmd), "lsof +d %s", dpath);
+	system(lsof_cmd);
+}
+#endif
 
 static struct igt_siglatency {
 	timer_t timer;
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional

Quoted 6 lines · Arkadiusz Hiler

Android does not have procps and it's not easy to compile it as a dependency.

We can provide alternative, "naive" implementation that just shells out to external commands (i.e. pkill and lsof) in case we do not have the library.

This patch should carry a health warning: do not mix with kasan. :-p -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH v2 5/13 chamelium: Fix build issues on Android

In reply to Arkadiusz Hiler

Makefile.sources are included 1:1 in Android.mk files, and are not parsed by automake. And yet those had some automake conditional logic. Moving it to .am file is enough for now.

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H" guard, and the file itself was included unconditionally.

---
 lib/Makefile.am        | 7 +++++++
 lib/Makefile.sources   | 7 -------
 lib/igt.h              | 2 ++
 lib/igt_chamelium.h    | 3 +++
 tests/Makefile.am      | 6 ++++++
 tests/Makefile.sources | 6 ------
 6 files changed, 18 insertions(+), 13 deletions(-)
lib/Makefile.am +7 -0
index c0ddf29..91e72c4 100644
@@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
         stubs/drm/intel_bufmgr.h
 endif
 
+if HAVE_CHAMELIUM
+lib_source_list +=	 	\
+	igt_chamelium.h		\
+	igt_chamelium.c		\
+	$(NULL)
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = \
 	    $(CWARNFLAGS) \
lib/Makefile.sources +0 -7
index 6348487..53fdb54 100644
@@ -85,13 +85,6 @@ lib_source_list =	 	\
 	igt_kmod.h		\
 	$(NULL)
 
-if HAVE_CHAMELIUM
-lib_source_list +=	 	\
-	igt_chamelium.h		\
-	igt_chamelium.c		\
-	$(NULL)
-endif
-
 .PHONY: version.h.tmp
 
 # leaving a space here to work around automake's conditionals
lib/igt.h +2 -0
index a97923e..a069deb 100644
@@ -38,7 +38,9 @@
 #include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
+#endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
lib/igt_chamelium.h +3 -0
index f421d83..15f6024 100644
@@ -26,7 +26,10 @@
 #ifndef IGT_CHAMELIUM_H
 #define IGT_CHAMELIUM_H
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "igt.h"
 #include <stdbool.h>
 
tests/Makefile.am +6 -0
index 05681d5..61c7a15 100644
@@ -12,6 +12,12 @@ if HAVE_LIBDRM_VC4
     TESTS_progs_M += $(VC4_TESTS_M)
 endif
 
+if HAVE_CHAMELIUM
+TESTS_progs_M += \
+	chamelium \
+	$(NULL)
+endif
+
 if BUILD_TESTS
 test-list.txt: Makefile.sources
 	@echo TESTLIST > $@
tests/Makefile.sources +0 -6
index 9553e4d..df1fee5 100644
@@ -154,12 +154,6 @@ TESTS_progs_M = \
 	meta_test \
 	$(NULL)
 
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
-	chamelium \
-	$(NULL)
-endif
-
 TESTS_progs_XM = \
     gem_concurrent_all \
     $(NULL)
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

Re: [PATCH i-g-t 05/13] chamelium: Fix build issues on Android

Quoted 3 lines · Arkadiusz Hiler

Makefile.sources are included 1:1 in Android.mk files, and are not parsed by automake. And yet those had some automake conditional logic. Moving it to .am file is enough for now.

Hmm, all sources shall be listed only in Makefile.sources, which in turn, shall not have any logic.

Quoted 19 lines

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H" guard, and the file itself was included unconditionally.

---
 lib/Makefile.am        | 7 +++++++
 lib/Makefile.sources   | 7 -------
 lib/igt.h              | 2 ++
 lib/igt_chamelium.h    | 3 +++
 tests/Makefile.am      | 6 ++++++
 tests/Makefile.sources | 6 ------
 6 files changed, 18 insertions(+), 13 deletions(-)
lib/Makefile.am +0 -0
index c0ddf29..91e72c4 100644

lib/Makefile.am if !HAVE_LIBDRM_INTEL · line 31

Quoted 10 lines
lib/Makefile.am +7 -0
@@ -22,6 +22,13 @@ if !HAVE_LIBDRM_INTEL
         stubs/drm/intel_bufmgr.h
 endif
 
+if HAVE_CHAMELIUM
+lib_source_list +=	 	\
+	igt_chamelium.h		\
+	igt_chamelium.c		\
+	$(NULL)
+endif
+

Try this:

	if HAVE_CHAMELIUM
	lib_source_list += $(chamelium_lib_source_list)
	endif
Quoted 8 lines
lib/Makefile.am +0 -0
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = \
 	    $(CWARNFLAGS) \
lib/Makefile.sources +0 -0
index 6348487..53fdb54 100644

lib/Makefile.sources lib_source_list = \ · line 93

Quoted 9 lines
lib/Makefile.sources +0 -6
@@ -85,13 +85,6 @@ lib_source_list =	 	\
 	igt_kmod.h		\
 	$(NULL)
 
-if HAVE_CHAMELIUM
-lib_source_list +=	 	\
-	igt_chamelium.h		\
-	igt_chamelium.c		\
-	$(NULL)
-endif

Try this:

	chamelium_lib_source_list +=	\
		igt_chamelium.h		\
		igt_chamelium.c		\
		$(NULL)
Quoted 55 lines
lib/Makefile.sources +0 -1
-
 .PHONY: version.h.tmp
 
 # leaving a space here to work around automake's conditionals
lib/igt.h +2 -0
index a97923e..a069deb 100644
@@ -38,7 +38,9 @@
 #include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
+#endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
lib/igt_chamelium.h +3 -0
index f421d83..15f6024 100644
@@ -26,7 +26,10 @@
 #ifndef IGT_CHAMELIUM_H
 #define IGT_CHAMELIUM_H
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "igt.h"
 #include <stdbool.h>
 
tests/Makefile.am +6 -0
index 05681d5..61c7a15 100644
@@ -12,6 +12,12 @@ if HAVE_LIBDRM_VC4
     TESTS_progs_M += $(VC4_TESTS_M)
 endif
 
+if HAVE_CHAMELIUM
+TESTS_progs_M += \
+	chamelium \
+	$(NULL)
+endif
+
 if BUILD_TESTS
 test-list.txt: Makefile.sources
 	@echo TESTLIST > $@
tests/Makefile.sources +0 -0
index 9553e4d..df1fee5 100644

tests/Makefile.sources TESTS_progs_M = \ · line 162

Quoted 9 lines
tests/Makefile.sources +0 -6
@@ -154,12 +154,6 @@ TESTS_progs_M = \
 	meta_test \
 	$(NULL)
 
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
-	chamelium \
-	$(NULL)
-endif
-

Maybe instead of removing this from .sources, try this:

	CHAMELIUM_TESTS_progs_M += \
		chamelium \
		$(NULL)

and then use it in .am under HAVE_CHAMELIUM

Michal

Quoted 10 lines
tests/Makefile.sources +0 -0
 TESTS_progs_XM = \
     gem_concurrent_all \
     $(NULL)
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

PATCH 1/1 chamelium: Fix build issues on Android

Makefile.sources are included 1:1 in Android.mk files, and are not parsed by automake. And yet those had some automake conditional logic. Moving it to .am file is enough for now.

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H" guard, and the file itself was included unconditionally.

v2: keep lists of sources files in Makefile.sources (M. Wajdeczko)

Cc Michal Wajdeczko <[email protected]>
---
 lib/Makefile.am        | 4 ++++
 lib/Makefile.sources   | 8 +++-----
 lib/igt.h              | 2 ++
 lib/igt_chamelium.h    | 3 +++
 tests/Makefile.am      | 4 ++++
 tests/Makefile.sources | 4 +---
 6 files changed, 17 insertions(+), 8 deletions(-)
lib/Makefile.am +4 -0
index c0ddf29..d616da0 100644
@@ -22,6 +22,10 @@ if !HAVE_LIBDRM_INTEL
         stubs/drm/intel_bufmgr.h
 endif
 
+if HAVE_CHAMELIUM
+lib_source_list += $(chamelium_lib_source_list)
+endif
+
 AM_CPPFLAGS = -I$(top_srcdir)
 AM_CFLAGS = \
 	    $(CWARNFLAGS) \
lib/Makefile.sources +3 -5
index 6348487..3a1e739 100644
@@ -85,12 +85,10 @@ lib_source_list =	 	\
 	igt_kmod.h		\
 	$(NULL)
 
-if HAVE_CHAMELIUM
-lib_source_list +=	 	\
-	igt_chamelium.h		\
-	igt_chamelium.c		\
+chamelium_lib_source_list =	\
+	igt_chamelium.h			\
+	igt_chamelium.c			\
 	$(NULL)
-endif
 
 .PHONY: version.h.tmp
 
lib/igt.h +2 -0
index a97923e..a069deb 100644
@@ -38,7 +38,9 @@
 #include "igt_kms.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#ifdef HAVE_CHAMELIUM
 #include "igt_chamelium.h"
+#endif
 #include "instdone.h"
 #include "intel_batchbuffer.h"
 #include "intel_chipset.h"
lib/igt_chamelium.h +3 -0
index f421d83..15f6024 100644
@@ -26,7 +26,10 @@
 #ifndef IGT_CHAMELIUM_H
 #define IGT_CHAMELIUM_H
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
 #include "igt.h"
 #include <stdbool.h>
 
tests/Makefile.am +4 -0
index 05681d5..0783ac0 100644
@@ -12,6 +12,10 @@ if HAVE_LIBDRM_VC4
     TESTS_progs_M += $(VC4_TESTS_M)
 endif
 
+if HAVE_CHAMELIUM
+TESTS_progs_M += $(CHAMELIUM_TESTS_progs_M)
+endif
+
 if BUILD_TESTS
 test-list.txt: Makefile.sources
 	@echo TESTLIST > $@
tests/Makefile.sources +1 -3
index 9553e4d..253fc22 100644
@@ -154,11 +154,9 @@ TESTS_progs_M = \
 	meta_test \
 	$(NULL)
 
-if HAVE_CHAMELIUM
-TESTS_progs_M += \
+CHAMELIUM_TESTS_progs_M = \
 	chamelium \
 	$(NULL)
-endif
 
 TESTS_progs_XM = \
     gem_concurrent_all \
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#9 lore raw

Re: [PATCH] chamelium: Fix build issues on Android

Quoted 11 lines · Arkadiusz Hiler

Makefile.sources are included 1:1 in Android.mk files, and are not parsed by automake. And yet those had some automake conditional logic. Moving it to .am file is enough for now.

Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H" guard, and the file itself was included unconditionally.

v2: keep lists of sources files in Makefile.sources (M. Wajdeczko)

Cc Michal Wajdeczko <[email protected]>

Regards,
Michal
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

PATCH v2 6/13 tools/Android.mk: Add guc_logger and l3_parity skip list

In reply to Arkadiusz Hiler

Those tools does not build on Android due to "Linux-only" dependencies.

Let's blacklist them for now.

---
 tools/Android.mk | 2 ++
 1 file changed, 2 insertions(+)
tools/Android.mk +2 -0
index 6cdedeb..0602e8c 100644
@@ -59,6 +59,8 @@ bin_PROGRAMS := $(tools_prog_lists)
 
 skip_tools_list := \
     intel_framebuffer_dump \
+    intel_guc_logger \
+    intel_l3_parity \
     intel_reg_dumper \
     intel_vga_read \
     intel_vga_write
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

Re: [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list

Quoted 1 line · Arkadiusz Hiler

Those tools does not build on Android due to "Linux-only" dependencies.

s/does/do/

"to" missing in title.

--
Petri Latvala

Quoted 28 lines

Let's blacklist them for now.

---
 tools/Android.mk | 2 ++
 1 file changed, 2 insertions(+)
tools/Android.mk +2 -0
index 6cdedeb..0602e8c 100644
@@ -59,6 +59,8 @@ bin_PROGRAMS := $(tools_prog_lists)
 
 skip_tools_list := \
     intel_framebuffer_dump \
+    intel_guc_logger \
+    intel_l3_parity \
     intel_reg_dumper \
     intel_vga_read \
     intel_vga_write
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

PATCH v2 1/1 tools/Android.mk: Add guc_logger and l3_parity to skip list

Those tools do not build on Android due to "Linux-only" dependencies.

Let's blacklist them for now.

v2: commit message fixup (P. Latvala)

---
 tools/Android.mk | 2 ++
 1 file changed, 2 insertions(+)
tools/Android.mk +2 -0
index 6cdedeb..0602e8c 100644
@@ -59,6 +59,8 @@ bin_PROGRAMS := $(tools_prog_lists)
 
 skip_tools_list := \
     intel_framebuffer_dump \
+    intel_guc_logger \
+    intel_l3_parity \
     intel_reg_dumper \
     intel_vga_read \
     intel_vga_write
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#13 lore raw

PATCH v2 7/13 tests/Android.mk: Add perf to skip list

In reply to Arkadiusz Hiler

It does not build on Android with top libdrm.

Temporary hax.

---
 tests/Android.mk | 1 +
 1 file changed, 1 insertion(+)
tests/Android.mk +1 -0
index 3186a2a..c67ddbd 100644
@@ -59,6 +59,7 @@ else
     pm_lpsp \
 	drm_read \
 	gem_exec_blt \
+	perf \
 	prime_mmap_kms
 
 # All kms tests depend on cairo
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#14 lore raw

Re: [PATCH i-g-t 07/13] tests/Android.mk: Add perf to skip list

Quoted 1 line · Arkadiusz Hiler

It does not build on Android with top libdrm.

Ah, libdrm strikes back. I was thinking that Android is definitely a target for the kernel interface so wondered how much work it will be to fix.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#15 lore raw

PATCH v2 8/13 Android.mk: Fix libkmod use

In reply to Arkadiusz Hiler

On Android libkmod.h is nested under libkmod directory, so we should include appropriately.

Also we need to link with it.

---
 benchmarks/Android.mk | 2 ++
 lib/Android.mk        | 1 +
 lib/igt_kmod.h        | 4 ++++
 tests/Android.mk      | 4 ++--
 tools/Android.mk      | 2 ++
 5 files changed, 11 insertions(+), 2 deletions(-)
benchmarks/Android.mk +2 -0
index c0fa09f..faa73b7 100644
@@ -18,6 +18,7 @@ define add_benchmark
     LOCAL_CFLAGS += -Wno-error=return-type
     # Excessive complaining for established cases. Rely on the Linux version warnings.
     LOCAL_CFLAGS += -Wno-sign-compare
+    LOCAL_LDFLAGS += -lkmod
 
     LOCAL_MODULE := $1_benchmark
     LOCAL_MODULE_TAGS := optional
@@ -26,6 +27,7 @@ define add_benchmark
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
 
     LOCAL_SHARED_LIBRARIES := libpciaccess  \
+                              libkmod       \
                               libdrm        \
                               libdrm_intel
 
lib/Android.mk +1 -0
index eb72f84..0596e4a 100644
@@ -29,6 +29,7 @@ LOCAL_CFLAGS += -std=gnu99 -UNDEBUG
 LOCAL_MODULE:= libintel_gpu_tools
 
 LOCAL_SHARED_LIBRARIES := libpciaccess  \
+			  libkmod       \
 			  libdrm        \
 			  libdrm_intel
 
lib/igt_kmod.h +4 -0
index fd307a4..6a7584f 100644
@@ -24,7 +24,11 @@
 #ifndef IGT_KMOD_H
 #define IGT_KMOD_H
 
+#ifdef ANDROID
+#include <libkmod/libkmod.h>
+#else
 #include <libkmod.h>
+#endif
 
 #include "igt_aux.h"
 
tests/Android.mk +2 -2
index c67ddbd..b664dff 100644
@@ -19,7 +19,7 @@ define add_test
 
     LOCAL_MODULE_TAGS := optional
     # ask linker to define a specific symbol; we use this to identify IGT tests
-    LOCAL_LDFLAGS := -Wl,--defsym=$2=0
+    LOCAL_LDFLAGS := -Wl,--defsym=$2=0 -lkmod
     LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt
 
     include $(BUILD_EXECUTABLE)
@@ -45,7 +45,7 @@ IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
 
 # set local libraries
 IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel
+IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libkmod libdrm libdrm_intel
 
 # handle cairo requirements if it is enabled
 ifeq ("${ANDROID_HAS_CAIRO}", "1")
tools/Android.mk +2 -0
index 0602e8c..a8e649b 100644
@@ -23,6 +23,7 @@ define add_tool
     LOCAL_CFLAGS += -Wno-error=return-type
     # Excessive complaining for established cases. Rely on the Linux version warnings.
     LOCAL_CFLAGS += -Wno-sign-compare
+    LOCAL_LDFLAGS += -lkmod
     ifeq ($($(1)_LDFLAGS),)
     else
         LOCAL_LDFLAGS += $($(1)_LDFLAGS)
@@ -38,6 +39,7 @@ define add_tool
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
 
     LOCAL_SHARED_LIBRARIES := libpciaccess  \
+                              libkmod       \
                               libdrm        \
                               libdrm_intel
 
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw

PATCH v2 9/13 Android.mk: Filter out *.h from src files

In reply to Arkadiusz Hiler

Newer Android's build system complains about unused files if we leave those there.

---
 lib/Android.mk   | 2 +-
 tools/Android.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/Android.mk +1 -1
index 0596e4a..003ade5 100644
@@ -45,7 +45,7 @@ skip_lib_list := \
     -DANDROID_HAS_CAIRO=0
 endif
 
-LOCAL_SRC_FILES := $(filter-out $(skip_lib_list),$(lib_source_list))
+LOCAL_SRC_FILES := $(filter-out %.h $(skip_lib_list),$(lib_source_list))
 
 include $(BUILD_STATIC_LIBRARY)
 
tools/Android.mk +1 -1
index a8e649b..0bad29c 100644
@@ -12,7 +12,7 @@ define add_tool
     ifeq ($($(1)_SOURCES),)
         LOCAL_SRC_FILES := $1.c
     else
-        LOCAL_SRC_FILES := $($(1)_SOURCES)
+        LOCAL_SRC_FILES := $(filter-out %.h,$($(1)_SOURCES))
     endif
 
     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#17 lore raw

PATCH v2 10/13 Android.mk: Use drm stubs

In reply to Arkadiusz Hiler

Use drm stubs that sit under lib/stubs.

Also drop strange, nonexistent additions to LOCAL_C_INCLUDES.

---
 benchmarks/Android.mk | 3 ++-
 demos/Android.mk      | 3 ++-
 lib/Android.mk        | 4 ++--
 lib/tests/Android.mk  | 4 ++--
 tests/Android.mk      | 4 ++--
 tools/Android.mk      | 2 +-
 6 files changed, 11 insertions(+), 9 deletions(-)
benchmarks/Android.mk +2 -1
index faa73b7..4ea275c 100644
@@ -10,7 +10,8 @@ define add_benchmark
 
     LOCAL_SRC_FILES := $1.c
 
-    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
+    LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES} \
+                       $(LOCAL_PATH)/../lib/stubs/drm/
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
     LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h"
     LOCAL_CFLAGS += -std=gnu99
demos/Android.mk +2 -1
index 90d8b37..1f50fdc 100644
@@ -16,7 +16,8 @@ LOCAL_CFLAGS += -std=gnu99
 # Excessive complaining for established cases. Rely on the Linux version warnings.
 LOCAL_CFLAGS += -Wno-sign-compare
 
-LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
+LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+                   $(LOCAL_PATH)/../lib/stubs/drm/
 
 LOCAL_MODULE := intel_sprite_on
 
lib/Android.mk +2 -2
index 003ade5..31f88be 100644
@@ -17,8 +17,8 @@ LOCAL_GENERATED_SOURCES :=       \
 	$(IGT_LIB_PATH)/version.h  \
 	$(GPU_TOOLS_PATH)/config.h
 
-LOCAL_C_INCLUDES +=              \
-	$(LOCAL_PATH)/..
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. \
+                    $(LOCAL_PATH)/stubs/drm/
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
 
lib/tests/Android.mk +2 -2
index 026f17f..bbbd4d8 100644
@@ -30,8 +30,8 @@ IGT_LOCAL_CFLAGS += -std=gnu99
 IGT_LOCAL_CFLAGS += -Wno-error=return-type
 
 # set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+                       $(LOCAL_PATH)/../lib/stubs/drm/
 
 # set local libraries
 IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
tests/Android.mk +2 -2
index b664dff..c6e966f 100644
@@ -40,8 +40,8 @@ IGT_LOCAL_CFLAGS += -Wno-error=return-type
 IGT_LOCAL_CFLAGS += -Wno-sign-compare
 
 # set local includes
-IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+                       $(LOCAL_PATH)/../lib/stubs/drm/
 
 # set local libraries
 IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
tools/Android.mk +1 -1
index 0bad29c..5653572 100644
@@ -30,7 +30,7 @@ define add_tool
     endif
 
     LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-    LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
+    LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lib/stubs/drm/
     LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/zlib
 
     LOCAL_MODULE := $1_tool
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#18 lore raw

PATCH v2 11/13 tools/Android.mk: Fix zlib inclusion

In reply to Arkadiusz Hiler

Add dependency on libz instead of doing path magic.

---
 tools/Android.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/Android.mk +4 -4
index 5653572..96075c9 100644
@@ -29,9 +29,8 @@ define add_tool
         LOCAL_LDFLAGS += $($(1)_LDFLAGS)
     endif
 
-    LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
-    LOCAL_C_INCLUDES += $(LOCAL_PATH)/../lib/stubs/drm/
-    LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/zlib
+    LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib \
+                       $(LOCAL_PATH)/../lib/stubs/drm/
 
     LOCAL_MODULE := $1_tool
     LOCAL_MODULE_TAGS := optional
@@ -41,7 +40,8 @@ define add_tool
     LOCAL_SHARED_LIBRARIES := libpciaccess  \
                               libkmod       \
                               libdrm        \
-                              libdrm_intel
+                              libdrm_intel \
+                              libz
 
     # Tools dir on host
     LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/$(LOCAL_TOOLS_DIR)
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#19 lore raw

PATCH v2 12/13 tests/gem_exec_nop: Disable headless subtest on cairoless Android

In reply to Arkadiusz Hiler

Currently whole igt_kms.c is disabled while compiling on Android without cairo, so this tests does not compile.

There should be cleaner a way to disable only cairo dependant parts which should allow us to enable at least some of the KMS tests, but that's a bigger rework for another time.

v2: simplified #ifs on CAIRO/ANDROID (P. Latvala)

---
 tests/gem_exec_nop.c | 4 ++++
 1 file changed, 4 insertions(+)
tests/gem_exec_nop.c +4 -0
index 440e357..d96f068 100644
@@ -139,6 +139,7 @@ stable_nop_on_ring(int fd, uint32_t handle, unsigned int engine,
 	return n;
 }
 
+#if !defined(ANDROID) || ANDROID_HAS_CAIRO
 #define assert_within_epsilon(x, ref, tolerance) \
         igt_assert_f((x) <= (1.0 + tolerance) * ref && \
                      (x) >= (1.0 - tolerance) * ref, \
@@ -183,6 +184,7 @@ static void headless(int fd, uint32_t handle)
 	/* check that the two execution speeds are roughly the same */
 	assert_within_epsilon(n_headless, n_display, 0.1f);
 }
+#endif
 
 static bool ignore_engine(int fd, unsigned engine)
 {
@@ -681,8 +683,10 @@ igt_main
 	igt_subtest("context-sequential")
 		sequential(device, handle, FORKED | CONTEXT, 150);
 
+#if !defined(ANDROID) || ANDROID_HAS_CAIRO
 	igt_subtest("headless")
 		headless(device, handle);
+#endif
 
 	igt_fixture {
 		igt_stop_hang_detector();
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#20 lore raw

PATCH v2 13/13 tests/gem_exec_nop: Rename signal() to fence_signal()

In reply to Arkadiusz Hiler

Unfortunately <signal.h> is included through some obscure dependencies when using bionic, so we have a name clash on signal().

Changed the test function name to fence_signal() to avoid this, but left the test cases names unchanged.

---
 tests/gem_exec_nop.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tests/gem_exec_nop.c +5 -5
index d96f068..d61e120 100644
@@ -517,9 +517,9 @@ static bool fence_wait(int fence)
 	return poll(&(struct pollfd){fence, POLLIN}, 1, -1) == 1;
 }
 
-static void signal(int fd, uint32_t handle,
-		   unsigned ring_id, const char *ring_name,
-		   int timeout)
+static void fence_signal(int fd, uint32_t handle,
+			 unsigned ring_id, const char *ring_name,
+			 int timeout)
 {
 #define NFENCES 512
 	struct drm_i915_gem_execbuffer2 execbuf;
@@ -659,11 +659,11 @@ igt_main
 		igt_subtest_f("%s", e->name)
 			single(device, handle, e->exec_id | e->flags, e->name);
 		igt_subtest_f("signal-%s", e->name)
-			signal(device, handle, e->exec_id | e->flags, e->name, 5);
+			fence_signal(device, handle, e->exec_id | e->flags, e->name, 5);
 	}
 
 	igt_subtest("signal-all")
-		signal(device, handle, -1, "all", 150);
+		fence_signal(device, handle, -1, "all", 150);
 
 	igt_subtest("series")
 		series(device, handle, 150);
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#21 lore raw

Re: [PATCH i-g-t 13/13] tests/gem_exec_nop: Rename signal() to fence_signal()

Quoted 5 lines · Arkadiusz Hiler

Unfortunately <signal.h> is included through some obscure dependencies when using bionic, so we have a name clash on signal().

Changed the test function name to fence_signal() to avoid this, but left the test cases names unchanged.

Ack.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on the v2 series
#22 lore raw
In reply to Arkadiusz Hiler

Patches 1-4 and 6-13 are

Nitpicks on the commit message on patch 6 (replied to it).

--
Petri Latvala

Quoted 68 lines · Arkadiusz Hiler

IGTs are broken for Android since the introduction of dependency on procps. Over time other incompatibilities built up.

I took the liberty to fix some of the issues, workaround couple of others and blacklist heavily incompatible tools/tests.

It builds on (almost) vanilla AOSP now.

Github: <https://github.com/ivyl/igt/commits/android>
Howto:  <https://gist.github.com/ivyl/1e05af15ae37b575e03dc69e5e2488fc>

now including docker exmaple / script for your convenience

DEP1: <https://github.com/ivyl/libkmod-android> - just builds Google's one
DEP2: <https://github.com/android-ia/external_libpciaccess>

We should include a note on Android compatibility in the README and do "continuous compilation" of the patches as they arrive on the mailing list, otherwise this **will get broken again soon**.

This is long as it is, but not complete yet.

Here are some of more obvious TODOs:
* introduce something like IGT_HAS_CAIRO define for convenience
* revise igt_kms dependency on cairo and enable everything what is independent
* revise kms tests and do the above
* review all things that are disabled on Android and try to enable them
* do something less ugly with config.h generation on Android

v2: couple of suggested fixed + everything that was not compatible since last
patch

Cc Petri Latvala <[email protected]>
Cc Antonio Argenziano <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Robert Foss <[email protected]>

Arkadiusz Hiler (13):
tests/drm_import_export: Include {i915_,}drm.h properly Make conditions on HAVE_UDEV consistent
lib/igt_aux: Include unistd.h for gettid() on Android lib/igt_aux: Make procps optional
chamelium: Fix build issues on Android tools/Android.mk: Add guc_logger and l3_parity skip list tests/Android.mk: Add perf to skip list
Android.mk: Fix libkmod use
Android.mk: Filter out *.h from src files
Android.mk: Use drm stubs
tools/Android.mk: Fix zlib inclusion tests/gem_exec_nop: Disable headless subtest on cairoless Android tests/gem_exec_nop: Rename signal() to fence_signal()

 benchmarks/Android.mk          |  5 ++++-
 configure.ac                   |  6 +++++-
 demos/Android.mk               |  3 ++-
 lib/Android.mk                 |  7 ++++---
 lib/Makefile.am                |  7 +++++++
 lib/Makefile.sources           |  7 -------
 lib/igt.h                      |  2 ++
 lib/igt_aux.c                  | 37 +++++++++++++++++++++++++++++++++----
 lib/igt_aux.h                  |  5 +++++
 lib/igt_chamelium.h            |  3 +++
 lib/igt_kmod.h                 |  4 ++++
 lib/tests/Android.mk           |  4 ++--
 tests/Android.mk               |  9 +++++----
 tests/Makefile.am              |  6 ++++++
 tests/Makefile.sources         |  6 ------
Quoted 12 lines
 tests/drm_import_export.c      |  4 ++--
 tests/gem_exec_nop.c           | 14 +++++++++-----
 tests/testdisplay_hotplug.c    |  2 +-
 tools/Android.mk               | 14 +++++++++-----
 tools/intel_l3_parity.c        |  2 +-
 tools/intel_l3_parity.h        |  2 +-
 tools/intel_l3_udev_listener.c |  2 +-
 22 files changed, 106 insertions(+), 45 deletions(-)
Signature · 1 line
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#23 lore raw

Re: [PATCH i-g-t v2 00/13] Fix IGTs for Android\

Quoted 2 lines · Petri Latvala

Patches 1-4 and 6-13 are

Send v2 of patch 5 that incorporates Michal's feedback.

Quoted 3 lines

Nitpicks on the commit message on patch 6 (replied to it).

Sent fixed version.

Thanks!

Signature · 2 lines
Cheers,
Arek
Quoted 78 lines · Arkadiusz Hiler
Quoted 77 lines

IGTs are broken for Android since the introduction of dependency on procps. Over time other incompatibilities built up.

I took the liberty to fix some of the issues, workaround couple of others and blacklist heavily incompatible tools/tests.

It builds on (almost) vanilla AOSP now.

Github: <https://github.com/ivyl/igt/commits/android>
Howto:  <https://gist.github.com/ivyl/1e05af15ae37b575e03dc69e5e2488fc>

now including docker exmaple / script for your convenience

DEP1: <https://github.com/ivyl/libkmod-android> - just builds Google's one
DEP2: <https://github.com/android-ia/external_libpciaccess>

We should include a note on Android compatibility in the README and do "continuous compilation" of the patches as they arrive on the mailing list, otherwise this **will get broken again soon**.

This is long as it is, but not complete yet.

Here are some of more obvious TODOs:
* introduce something like IGT_HAS_CAIRO define for convenience
* revise igt_kms dependency on cairo and enable everything what is independent
* revise kms tests and do the above
* review all things that are disabled on Android and try to enable them
* do something less ugly with config.h generation on Android

v2: couple of suggested fixed + everything that was not compatible since last
patch

Cc Petri Latvala <[email protected]>
Cc Antonio Argenziano <[email protected]>
Cc Vinay Belgaumkar <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Robert Foss <[email protected]>

Arkadiusz Hiler (13):
tests/drm_import_export: Include {i915_,}drm.h properly Make conditions on HAVE_UDEV consistent
lib/igt_aux: Include unistd.h for gettid() on Android lib/igt_aux: Make procps optional
chamelium: Fix build issues on Android tools/Android.mk: Add guc_logger and l3_parity skip list tests/Android.mk: Add perf to skip list
Android.mk: Fix libkmod use
Android.mk: Filter out *.h from src files
Android.mk: Use drm stubs
tools/Android.mk: Fix zlib inclusion tests/gem_exec_nop: Disable headless subtest on cairoless Android tests/gem_exec_nop: Rename signal() to fence_signal()

 benchmarks/Android.mk          |  5 ++++-
 configure.ac                   |  6 +++++-
 demos/Android.mk               |  3 ++-
 lib/Android.mk                 |  7 ++++---
 lib/Makefile.am                |  7 +++++++
 lib/Makefile.sources           |  7 -------
 lib/igt.h                      |  2 ++
 lib/igt_aux.c                  | 37 +++++++++++++++++++++++++++++++++----
 lib/igt_aux.h                  |  5 +++++
 lib/igt_chamelium.h            |  3 +++
 lib/igt_kmod.h                 |  4 ++++
 lib/tests/Android.mk           |  4 ++--
 tests/Android.mk               |  9 +++++----
 tests/Makefile.am              |  6 ++++++
 tests/Makefile.sources         |  6 ------
 tests/drm_import_export.c      |  4 ++--
 tests/gem_exec_nop.c           | 14 +++++++++-----
 tests/testdisplay_hotplug.c    |  2 +-
 tools/Android.mk               | 14 +++++++++-----
 tools/intel_l3_parity.c        |  2 +-
 tools/intel_l3_parity.h        |  2 +-
 tools/intel_l3_udev_listener.c |  2 +-
 22 files changed, 106 insertions(+), 45 deletions(-)
Quoted 3 lines
Quoted 3 lines
Signature · 1 line
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx