igt: Remove Android support
Subsystems (2)
PATCH 1/2 igt: Remove Android support
This patch gets rid of Android support, deleting all the hacks and moving code around to the places it belong.
Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate.
It's a good time to drop the illusion of providing any support.
If there is someone who actually needs that, please step up and help us with the maintenance.
--- Android.mk | 4 -- assembler/ralloc.c | 5 --- benchmarks/Android.mk | 46 --------------------- benchmarks/gem_syslatency.c | 2 - lib/Android.mk | 53 ------------------------ lib/drmtest.h | 16 -------- lib/igt_aux.c | 95 -------------------------------------------- lib/igt_aux.h | 5 --- lib/igt_core.c | 68 ------------------------------- lib/igt_debugfs.c | 25 +----------- lib/igt_fb.h | 7 ---- lib/igt_kmod.h | 4 -- lib/igt_kms.c | 89 +++++++++++++++++++++++++++++++++++++++++ lib/tests/Android.mk | 41 ------------------- tests/Android.mk | 83 -------------------------------------- tests/core_get_client_auth.c | 4 +- tests/gem_exec_nop.c | 4 -- tools/Android.mk | 82 -------------------------------------- 18 files changed, 91 insertions(+), 542 deletions(-) delete mode 100644 Android.mk delete mode 100644 benchmarks/Android.mk delete mode 100644 lib/Android.mk delete mode 100644 lib/tests/Android.mk delete mode 100644 tests/Android.mk delete mode 100644 tools/Android.mk
Android.mk deleted +0 -4
@@ -1,4 +0,0 @@ -HAVE_LIBDRM_INTEL := true - -include $(call all-named-subdir-makefiles, lib tests tools benchmarks) -
assembler/ralloc.c +0 -5
@@ -28,11 +28,6 @@#include <string.h> #include <stdint.h> -/* Android defines SIZE_MAX in limits.h, instead of the standard stdint.h */ -#ifdef ANDROID -#include <limits.h> -#endif -/* Some versions of MinGW are missing _vscprintf's declaration, although they * still provide the symbol in the import library. */ #ifdef __MINGW32__
benchmarks/Android.mk deleted +0 -46
46 lines not on this page · raw message
benchmarks/gem_syslatency.c +0 -2
@@ -183,7 +183,6 @@ static void *sys_wait(void *arg)static void bind_cpu (pthread_attr_t *attr,int cpu) {#ifdef __USE_GNU -#ifndef ANDROID cpu_set_t mask;if (cpu ==-1 )
@@ -194,7 +193,6 @@ static void bind_cpu(pthread_attr_t *attr, int cpu)pthread_attr_setaffinity_np (attr,sizeof (mask), &mask);#endif -#endif }static void rtprio (pthread_attr_t *attr,int prio)
lib/Android.mk deleted +0 -53
53 lines not on this page · raw message
lib/drmtest.h +0 -16
@@ -51,22 +51,6 @@*/ #define DRIVER_ANY ~(DRIVER_VGEM) - -#ifdef ANDROID -#if (!(definedHAVE_MMAP64 )) && (!(defined __x86_64__)) -extern void *__mmap2 (void *,size_t ,int ,int ,int ,off_t ); - -/* mmap64 is a recent addition to bionic and not available in all android builds. */ -/* I can find no reliable way to know if it is defined or not - so just avoid it */ -#define mmap64 igt_mmap64 -static inline void *igt_mmap64 (void *addr,size_t length,int prot,int flags, -int fd,off64_t offset) -{ -return __mmap2 (addr, length, prot, flags, fd, offset >>12 ); -} -#endif -#endif -/** * ARRAY_SIZE: * @arr: static array
lib/igt_aux.c +0 -95
101 lines not on this page · raw message
lib/igt_aux.h +0 -5
@@ -43,12 +43,7 @@ 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 */
lib/igt_core.c +0 -68
84 lines not on this page · raw message
lib/igt_debugfs.c +1 -24
@@ -1153,30 +1153,7 @@ int igt_get_stable_obj_count(int driver) obj_count =get_object_count (driver);/* The test relies on the system being in the same state before and * after the test so any difference in the object count is a result of -* leaks during the test. gem_quiescent_gpu() mostly achieves this but -* on android occasionally obj_count can still change briefly. -* The loop ensures obj_count has remained stable over several checks -*/ -#ifdef ANDROID - { -int loop_count =0 ; -int prev_obj_count = obj_count; -while (loop_count <4 ) { -usleep (200000 ); -gem_quiescent_gpu (driver); - obj_count =get_object_count (driver); -if (obj_count == prev_obj_count) { - loop_count++; - }else { -igt_debug ("loop_count=%d, obj_count=%d, prev_obj_count=%d\n" , - loop_count, obj_count, prev_obj_count); - loop_count =0 ; - prev_obj_count = obj_count; - } - - } - } -#endif +* leaks during the test. */ return obj_count; }
lib/igt_fb.h +0 -7
@@ -28,14 +28,7 @@#ifndef __IGT_FB_H__#define __IGT_FB_H__ -/* cairo is assumed available on linux. On Android we check for ANDROID_HAS_CAIRO */ -#if (!defined(ANDROID )) || (defined(ANDROID ) &&ANDROID_HAS_CAIRO )#include <cairo.h> -#else -typedef struct _cairo_surface cairo_surface_t ; -typedef struct _cairo cairo_t ; -#endif -#include <stddef.h> #include <stdbool.h> #include <drm_fourcc.h>
lib/igt_kmod.h +0 -4
@@ -24,11 +24,7 @@#ifndef IGT_KMOD_H #define IGT_KMOD_H -#ifdef ANDROID -#include <libkmod/libkmod.h> -#else #include <libkmod.h> -#endif #include "igt_aux.h"
lib/igt_kms.c +89 -0
95 lines not on this page · raw message
lib/tests/Android.mk deleted +0 -41
41 lines not on this page · raw message
tests/Android.mk deleted +0 -83
83 lines not on this page · raw message
tests/core_get_client_auth.c +1 -3
@@ -51,12 +51,10 @@ is_local_tid(pid_t tid) {#ifndef __linux__return pthread_self () == tid; -#elif !defined(ANDROID ) +#else /* On Linux systems, drmGetClient() would return the thread ID instead of the actual process ID */ return syscall (SYS_gettid) == tid; -#else -return gettid () == tid;#endif }
tests/gem_exec_nop.c +0 -4
@@ -139,7 +139,6 @@ 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, \
@@ -184,7 +183,6 @@ 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) {
@@ -667,10 +665,8 @@ 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 ();
tools/Android.mk deleted +0 -82
82 lines not on this page · raw message
Signature · 9 lines
2.13.5 PS. I'll let the patch to float on the mailing list for a week or so before merging it, but if we would find someone to do the work post-merge, I'll be happy to revert it. _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 Revert "lib/igt_aux: Make procps optional"
This reverts commit d7d3f4e87b827152f00bdf89a67871736672b492 and gets rid of the config option from the meson.build.
It was needed only for the Android support.
--- configure.ac | 6 +----- lib/igt_aux.c | 35 +++-------------------------------- meson.build | 5 +---- 3 files changed, 5 insertions(+), 41 deletions(-)
configure.ac +1 -5
@@ -123,11 +123,7 @@ AC_SUBST(ASSEMBLER_WARN_CFLAGS) PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.82]) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) PKG_CHECK_MODULES(KMOD, [libkmod]) -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(PROCPS, [libprocps]) PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no]) if test x$have_valgrind = xyes; then
lib/igt_aux.c +3 -32
@@ -48,7 +48,9 @@#include <sys/utsname.h> #include <termios.h> #include <assert.h> -#include <linux/limits.h> + +#include <proc/readproc.h> +#include "drmtest.h" #include "i915_drm.h" #include "intel_chipset.h"
@@ -68,10 +70,6 @@#include <libgen.h> /* for dirname() */ #endif -#ifdef HAVE_PROCPS -#include <proc/readproc.h> -#endif -/** * SECTION:igt_aux * @short_description: Auxiliary libraries and support functions
@@ -1242,7 +1240,6 @@ 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;
@@ -1267,19 +1264,7 @@ 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;
@@ -1461,7 +1446,6 @@ __igt_lsof(const char *dir)closeproc (proc); } -#endif /** * igt_lsof: Lists information about files opened by processes.
@@ -1470,7 +1454,6 @@ __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) {
@@ -1495,18 +1478,6 @@ 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;
meson.build +1 -4
@@ -38,10 +38,7 @@ libdrm_amdgpu = dependency('libdrm_amdgpu', required : false) pciaccess = dependency('pciaccess', version : '>=0.10') libkmod = dependency('libkmod') -libprocps = dependency('libprocps', required : false) -if libprocps.found() - config_h.set('HAVE_PROCPS', 1) -endif +libprocps = dependency('libprocps', required : true) valgrind = dependency('valgrind', required : false) if valgrind.found()
Signature · 6 lines
2.13.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/2] igt: Remove Android support
In reply to Arkadiusz Hiler== Series Details ==
== Series Details ==
Series: series starting with [1/2] igt: Remove Android support
URL : https://patchwork.freedesktop.org/series/30276/
State : success
== Summary ==
IGT patchset tested on top of latest successful buildc718ba805208e55d675defe9b2a66852e2ae038c lib/igt_kmod: Allow specifying libkmod config via environment variables
with latest DRM-Tip kernel build CI_DRM_308476f9b11f445f drm-tip: 2017y-09m-13d-12h-28m-54s UTC integration manifest
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-snb-2600) fdo#100215
Subgroup basic-flip-before-cursor-atomic:
incomplete -> PASS (fi-bxt-j4205) fdo#102705fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#102705 https://bugs.freedesktop.org/show_bug.cgi?id=102705
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:452s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:380s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:269s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:514s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:508s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:503s fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:552s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:442s fi-glk-2a total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:596s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:432s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:411s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:436s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:495s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:466s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:494s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:581s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:552s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:463s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:527s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:503s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:464s fi-skl-x1585l total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:492s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:573s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:429s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_183/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/2] igt: Remove Android support
In reply to Arkadiusz Hiler== Series Details ==
== Series Details ==
Series: series starting with [1/2] igt: Remove Android support
URL : https://patchwork.freedesktop.org/series/30276/
State : success
== Summary ==
Test perf:
Subgroup blocking:
fail -> PASS (shard-hsw) fdo#102252 +1fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2313 pass:1247 dwarn:0 dfail:0 fail:11 skip:1055 time:9496s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_183/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx