* [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS
@ 2019-04-01 14:39 Guillaume Tucker
2019-04-02 5:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Guillaume Tucker @ 2019-04-01 14:39 UTC (permalink / raw)
To: Arkadiusz Hiler, Petri Latvala; +Cc: igt-dev, Guillaume Tucker, intel-gfx
The MIPS architecture doesn't provide the hardware atomics that are
required for the "create-clear" sub-test such as
__sync_add_and_fetch(). As a simple and pragmatic solution, disable
this sub-test when building for MIPS. A better approach would be to
add a fallback implementation for these operations.
Fixes: 6727e17c00b2 ("i915/gem_create: Verify that all new objects are clear")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
---
tests/i915/gem_create.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
index 2a861ca8a7ec..8a48496e6c19 100644
--- a/tests/i915/gem_create.c
+++ b/tests/i915/gem_create.c
@@ -142,6 +142,7 @@ static void invalid_nonaligned_size(int fd)
gem_close(fd, handle);
}
+#if !defined(__mips__) /* MIPS doesn't provide the required hardware atomics */
static uint64_t get_npages(uint64_t *global, uint64_t npages)
{
uint64_t try, old, max;
@@ -208,6 +209,7 @@ static void always_clear(int i915, int timeout)
for (int i = 0; i < ncpus; i++)
pthread_join(thread[i], NULL);
}
+#endif /* !defined(__mips__) */
igt_main
{
@@ -231,6 +233,8 @@ igt_main
igt_subtest("create-invalid-nonaligned")
invalid_nonaligned_size(fd);
+#if !defined(__mips__)
igt_subtest("create-clear")
always_clear(fd, 30);
+#endif
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 8+ messages in thread* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_create: Do not build create-clear for MIPS 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker @ 2019-04-02 5:27 ` Patchwork 2019-04-02 6:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork ` (3 subsequent siblings) 4 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-04-02 5:27 UTC (permalink / raw) To: Guillaume Tucker; +Cc: igt-dev == Series Details == Series: i915/gem_create: Do not build create-clear for MIPS URL : https://patchwork.freedesktop.org/series/58837/ State : success == Summary == CI Bug Log - changes from CI_DRM_5852 -> IGTPW_2754 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58837/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2754 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@amdgpu/amd_cs_nop@fork-compute0: - fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17 * igt@gem_exec_basic@basic-bsd2: - fi-icl-y: NOTRUN -> SKIP [fdo#109276] +7 * igt@gem_exec_parse@basic-rejected: - fi-icl-y: NOTRUN -> SKIP [fdo#109289] +1 * igt@i915_selftest@live_contexts: - fi-icl-y: NOTRUN -> DMESG-FAIL [fdo#108569] * igt@kms_chamelium@dp-crc-fast: - fi-icl-y: NOTRUN -> SKIP [fdo#109284] +8 * igt@kms_force_connector_basic@force-load-detect: - fi-icl-y: NOTRUN -> SKIP [fdo#109285] +3 * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@kms_psr@primary_mmap_gtt: - fi-icl-y: NOTRUN -> SKIP [fdo#110189] +3 * igt@prime_vgem@basic-fence-flip: - fi-icl-y: NOTRUN -> SKIP [fdo#109294] #### Possible fixes #### * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: DMESG-FAIL [fdo#110235 ] -> PASS - fi-hsw-peppy: DMESG-FAIL -> PASS * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (50 -> 43) ------------------------------ Additional (1): fi-icl-y Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bsw-n3050 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus Build changes ------------- * IGT: IGT_4917 -> IGTPW_2754 CI_DRM_5852: ddcab27b76cf685a9136cf26f11103765fd7d8d5 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2754: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2754/ IGT_4917: ec9792ad770d5055d6f42e2a481b8314754c9218 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2754/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_create: Do not build create-clear for MIPS 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker 2019-04-02 5:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork @ 2019-04-02 6:59 ` Patchwork 2019-04-02 8:35 ` [igt-dev] [PATCH i-g-t] " Petri Latvala ` (2 subsequent siblings) 4 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-04-02 6:59 UTC (permalink / raw) To: Guillaume Tucker; +Cc: igt-dev == Series Details == Series: i915/gem_create: Do not build create-clear for MIPS URL : https://patchwork.freedesktop.org/series/58837/ State : success == Summary == CI Bug Log - changes from CI_DRM_5852_full -> IGTPW_2754_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58837/revisions/1/mbox/ Known issues ------------ Here are the changes found in IGTPW_2754_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_schedule@smoketest-blt: - shard-hsw: NOTRUN -> SKIP [fdo#109271] +21 * igt@gem_tiled_swapping@non-threaded: - shard-hsw: PASS -> INCOMPLETE [fdo#103540] +1 * igt@kms_busy@basic-modeset-f: - shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_busy@extended-modeset-hang-newfb-render-c: - shard-hsw: PASS -> DMESG-WARN [fdo#110222] - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b: - shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +10 * igt@kms_chamelium@common-hpd-after-suspend: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +1 * igt@kms_concurrent@pipe-f: - shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_content_protection@legacy: - shard-snb: NOTRUN -> SKIP [fdo#109271] +82 * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc: - shard-apl: PASS -> FAIL [fdo#108145] * igt@kms_plane_scaling@pipe-b-scaler-with-clipping-clamping: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_setmode@basic: - shard-kbl: PASS -> FAIL [fdo#99912] * igt@kms_vblank@pipe-a-ts-continuation-dpms-suspend: - shard-kbl: PASS -> FAIL [fdo#104894] * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend: - shard-apl: PASS -> FAIL [fdo#104894] +1 * igt@prime_nv_pcopy@test1_micro: - shard-glk: NOTRUN -> SKIP [fdo#109271] +3 #### Possible fixes #### * igt@gem_create@create-clear: - shard-snb: INCOMPLETE [fdo#105411] -> PASS * igt@kms_busy@extended-modeset-hang-newfb-render-b: - shard-hsw: DMESG-WARN [fdo#110222] -> PASS +2 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b: - shard-snb: DMESG-WARN [fdo#110222] -> PASS +1 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c: - shard-kbl: DMESG-WARN [fdo#110222] -> PASS +1 * igt@kms_cursor_crc@cursor-128x42-sliding: - shard-kbl: FAIL [fdo#103232] -> PASS - shard-apl: FAIL [fdo#103232] -> PASS * igt@kms_flip@2x-flip-vs-expired-vblank: - shard-hsw: FAIL [fdo#102887] -> PASS * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt: - shard-hsw: INCOMPLETE [fdo#103540] -> PASS * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-cpu: - shard-glk: FAIL [fdo#103167] -> PASS * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb: - shard-glk: FAIL [fdo#108145] -> PASS - shard-apl: FAIL [fdo#108145] -> PASS - shard-kbl: FAIL [fdo#108145] -> PASS * igt@kms_setmode@basic: - shard-apl: FAIL [fdo#99912] -> PASS * igt@kms_vblank@pipe-b-ts-continuation-suspend: - shard-kbl: INCOMPLETE [fdo#103665] -> PASS +1 [fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540 [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665 [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894 [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 Participating hosts (10 -> 5) ------------------------------ Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u Build changes ------------- * IGT: IGT_4917 -> IGTPW_2754 * Piglit: piglit_4509 -> None CI_DRM_5852: ddcab27b76cf685a9136cf26f11103765fd7d8d5 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2754: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2754/ IGT_4917: ec9792ad770d5055d6f42e2a481b8314754c9218 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2754/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker 2019-04-02 5:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-04-02 6:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork @ 2019-04-02 8:35 ` Petri Latvala 2019-04-03 7:25 ` Guillaume Tucker 2019-04-02 9:12 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_create: Do not build create-clear for MIPS (rev2) Patchwork 2019-04-02 14:34 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 4 siblings, 1 reply; 8+ messages in thread From: Petri Latvala @ 2019-04-02 8:35 UTC (permalink / raw) To: Guillaume Tucker; +Cc: igt-dev, intel-gfx On Mon, Apr 01, 2019 at 04:39:24PM +0200, Guillaume Tucker wrote: > The MIPS architecture doesn't provide the hardware atomics that are > required for the "create-clear" sub-test such as > __sync_add_and_fetch(). As a simple and pragmatic solution, disable > this sub-test when building for MIPS. A better approach would be to > add a fallback implementation for these operations. > > Fixes: 6727e17c00b2 ("i915/gem_create: Verify that all new objects are clear") > Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> > --- > tests/i915/gem_create.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c > index 2a861ca8a7ec..8a48496e6c19 100644 > --- a/tests/i915/gem_create.c > +++ b/tests/i915/gem_create.c > @@ -142,6 +142,7 @@ static void invalid_nonaligned_size(int fd) > gem_close(fd, handle); > } > > +#if !defined(__mips__) /* MIPS doesn't provide the required hardware atomics */ > static uint64_t get_npages(uint64_t *global, uint64_t npages) > { > uint64_t try, old, max; > @@ -208,6 +209,7 @@ static void always_clear(int i915, int timeout) > for (int i = 0; i < ncpus; i++) > pthread_join(thread[i], NULL); > } > +#endif /* !defined(__mips__) */ > > igt_main > { > @@ -231,6 +233,8 @@ igt_main > igt_subtest("create-invalid-nonaligned") > invalid_nonaligned_size(fd); > > +#if !defined(__mips__) > igt_subtest("create-clear") > always_clear(fd, 30); > +#endif > } It's a bit ugly. I wonder how much work a fallback mechanism would be? The test is i915 specific and using those on non-x86 architectures sounds silly. We could limit building tests/i915/* only if host_machine.cpu_family() is x86 or x86_64. But that requires revisiting this issue if ever the day comes when i915 can be used on other architectures *cough*. Apropos, compile-testing on MIPS in gitlab-CI? A compile-tested-only fallback mechanism suggestion, and a bad spot for placing the fallback functions: diff --git a/meson.build b/meson.build index 557400a5..0552e858 100644 --- a/meson.build +++ b/meson.build @@ -246,6 +246,9 @@ endif have = cc.has_function('memfd_create', prefix : '''#include <sys/mman.h>''', args : '-D_GNU_SOURCE') config.set10('HAVE_MEMFD_CREATE', have) +have_atomics = cc.compiles('void f() { int x, y; __sync_add_and_fetch(&x, y); }') +config.set10('HAVE_BUILTIN_ATOMICS', have_atomics) + add_project_arguments('-D_GNU_SOURCE', language : 'c') add_project_arguments('-include', 'config.h', language : 'c') diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 2a861ca8..615bb475 100644 --- a/tests/i915/gem_create.c +++ b/tests/i915/gem_create.c @@ -62,6 +62,18 @@ IGT_TEST_DESCRIPTION("This is a test for the extended & old gem_create ioctl," " that includes allocation of object from stolen memory" " and shmem."); +#if !HAVE_BUILTIN_ATOMICS +int __sync_add_and_fetch(void *ptr, uint64_t val) +{ + igt_assert_f(false, "Don't have builtin atomics\n"); +} + +int __sync_val_compare_and_swap(void *ptr, uint64_t old, uint64_t new) +{ + igt_assert_f(false, "Don't have builtin atomics\n"); +} +#endif + #define CLEAR(s) memset(&s, 0, sizeof(s)) #define PAGE_SIZE 4096 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS 2019-04-02 8:35 ` [igt-dev] [PATCH i-g-t] " Petri Latvala @ 2019-04-03 7:25 ` Guillaume Tucker 2019-06-05 20:46 ` Guillaume Tucker 0 siblings, 1 reply; 8+ messages in thread From: Guillaume Tucker @ 2019-04-03 7:25 UTC (permalink / raw) To: Petri Latvala; +Cc: igt-dev, Kevin Hilman, intel-gfx On 02/04/2019 09:35, Petri Latvala wrote: > On Mon, Apr 01, 2019 at 04:39:24PM +0200, Guillaume Tucker wrote: >> The MIPS architecture doesn't provide the hardware atomics that are >> required for the "create-clear" sub-test such as >> __sync_add_and_fetch(). As a simple and pragmatic solution, disable >> this sub-test when building for MIPS. A better approach would be to >> add a fallback implementation for these operations. >> >> Fixes: 6727e17c00b2 ("i915/gem_create: Verify that all new objects are clear") >> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> >> --- >> tests/i915/gem_create.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c >> index 2a861ca8a7ec..8a48496e6c19 100644 >> --- a/tests/i915/gem_create.c >> +++ b/tests/i915/gem_create.c >> @@ -142,6 +142,7 @@ static void invalid_nonaligned_size(int fd) >> gem_close(fd, handle); >> } >> >> +#if !defined(__mips__) /* MIPS doesn't provide the required hardware atomics */ >> static uint64_t get_npages(uint64_t *global, uint64_t npages) >> { >> uint64_t try, old, max; >> @@ -208,6 +209,7 @@ static void always_clear(int i915, int timeout) >> for (int i = 0; i < ncpus; i++) >> pthread_join(thread[i], NULL); >> } >> +#endif /* !defined(__mips__) */ >> >> igt_main >> { >> @@ -231,6 +233,8 @@ igt_main >> igt_subtest("create-invalid-nonaligned") >> invalid_nonaligned_size(fd); >> >> +#if !defined(__mips__) >> igt_subtest("create-clear") >> always_clear(fd, 30); >> +#endif >> } > > > It's a bit ugly. I wonder how much work a fallback mechanism would be? Sorry I should have sent this as RFC. > The test is i915 specific and using those on non-x86 architectures > sounds silly. We could limit building tests/i915/* only if > host_machine.cpu_family() is x86 or x86_64. But that requires > revisiting this issue if ever the day comes when i915 can be used on > other architectures *cough*. Right, I thought it might not be worth implementing fallback functions if there is no MIPS hardware on which this test can be run. Still it would be a shame to leave i-g-t failing to build on MIPS. > Apropos, compile-testing on MIPS in gitlab-CI? This issue was actually hit while building the KernelCI root file system with i-g-t tests. We're starting to add some MIPS platforms, so running the generic DRM/KMS tests on them might start to make sense at some point (cc khilman). And yes I guess it seems worth considering adding MIPS to Gitlab-CI as it only appears to be covering x86, armhf and arm64 (although I did fix an armhf build issue a few weeks ago). > A compile-tested-only fallback mechanism suggestion, and a bad spot > for placing the fallback functions: Thanks, I agree that does look like a sustainable way forward. We don't quite have a MIPS platform to test that yet in KernelCI, so hopefully QEMU can be used to test a fallback implementation. I guess adding placeholder functions as in your example with igt_assert_f() statements would just add some technical debt with little added benefit, so I'll work on a v2 with something that works. Meanwhile we'll just skip i-g-t KernelCI builds on MIPS. > diff --git a/meson.build b/meson.build > index 557400a5..0552e858 100644 > --- a/meson.build > +++ b/meson.build > @@ -246,6 +246,9 @@ endif > have = cc.has_function('memfd_create', prefix : '''#include <sys/mman.h>''', args : '-D_GNU_SOURCE') > config.set10('HAVE_MEMFD_CREATE', have) > > +have_atomics = cc.compiles('void f() { int x, y; __sync_add_and_fetch(&x, y); }') > +config.set10('HAVE_BUILTIN_ATOMICS', have_atomics) > + > add_project_arguments('-D_GNU_SOURCE', language : 'c') > add_project_arguments('-include', 'config.h', language : 'c') > > diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c > index 2a861ca8..615bb475 100644 > --- a/tests/i915/gem_create.c > +++ b/tests/i915/gem_create.c > @@ -62,6 +62,18 @@ IGT_TEST_DESCRIPTION("This is a test for the extended & old gem_create ioctl," > " that includes allocation of object from stolen memory" > " and shmem."); > > +#if !HAVE_BUILTIN_ATOMICS > +int __sync_add_and_fetch(void *ptr, uint64_t val) > +{ > + igt_assert_f(false, "Don't have builtin atomics\n"); > +} > + > +int __sync_val_compare_and_swap(void *ptr, uint64_t old, uint64_t new) > +{ > + igt_assert_f(false, "Don't have builtin atomics\n"); > +} > +#endif > + > #define CLEAR(s) memset(&s, 0, sizeof(s)) > #define PAGE_SIZE 4096 Thanks, Guillaume _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS 2019-04-03 7:25 ` Guillaume Tucker @ 2019-06-05 20:46 ` Guillaume Tucker 0 siblings, 0 replies; 8+ messages in thread From: Guillaume Tucker @ 2019-06-05 20:46 UTC (permalink / raw) To: Petri Latvala, Simon Ser; +Cc: igt-dev, Kevin Hilman, intel-gfx On 03/04/2019 08:25, Guillaume Tucker wrote: > On 02/04/2019 09:35, Petri Latvala wrote: >> On Mon, Apr 01, 2019 at 04:39:24PM +0200, Guillaume Tucker wrote: >>> The MIPS architecture doesn't provide the hardware atomics that are >>> required for the "create-clear" sub-test such as >>> __sync_add_and_fetch(). As a simple and pragmatic solution, disable >>> this sub-test when building for MIPS. A better approach would be to >>> add a fallback implementation for these operations. >>> >>> Fixes: 6727e17c00b2 ("i915/gem_create: Verify that all new objects are clear") >>> Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com> >>> --- >>> tests/i915/gem_create.c | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c >>> index 2a861ca8a7ec..8a48496e6c19 100644 >>> --- a/tests/i915/gem_create.c >>> +++ b/tests/i915/gem_create.c >>> @@ -142,6 +142,7 @@ static void invalid_nonaligned_size(int fd) >>> gem_close(fd, handle); >>> } >>> >>> +#if !defined(__mips__) /* MIPS doesn't provide the required hardware atomics */ >>> static uint64_t get_npages(uint64_t *global, uint64_t npages) >>> { >>> uint64_t try, old, max; >>> @@ -208,6 +209,7 @@ static void always_clear(int i915, int timeout) >>> for (int i = 0; i < ncpus; i++) >>> pthread_join(thread[i], NULL); >>> } >>> +#endif /* !defined(__mips__) */ >>> >>> igt_main >>> { >>> @@ -231,6 +233,8 @@ igt_main >>> igt_subtest("create-invalid-nonaligned") >>> invalid_nonaligned_size(fd); >>> >>> +#if !defined(__mips__) >>> igt_subtest("create-clear") >>> always_clear(fd, 30); >>> +#endif >>> } >> >> >> It's a bit ugly. I wonder how much work a fallback mechanism would be? > > Sorry I should have sent this as RFC. > >> The test is i915 specific and using those on non-x86 architectures >> sounds silly. We could limit building tests/i915/* only if >> host_machine.cpu_family() is x86 or x86_64. But that requires >> revisiting this issue if ever the day comes when i915 can be used on >> other architectures *cough*. > > Right, I thought it might not be worth implementing fallback > functions if there is no MIPS hardware on which this test can be > run. Still it would be a shame to leave i-g-t failing to build > on MIPS. > >> Apropos, compile-testing on MIPS in gitlab-CI? > > This issue was actually hit while building the KernelCI root file > system with i-g-t tests. We're starting to add some MIPS > platforms, so running the generic DRM/KMS tests on them might > start to make sense at some point (cc khilman). > > And yes I guess it seems worth considering adding MIPS to > Gitlab-CI as it only appears to be covering x86, armhf and > arm64 (although I did fix an armhf build issue a few weeks ago). > >> A compile-tested-only fallback mechanism suggestion, and a bad spot >> for placing the fallback functions: > > Thanks, I agree that does look like a sustainable way forward. > We don't quite have a MIPS platform to test that yet in KernelCI, > so hopefully QEMU can be used to test a fallback implementation. > > I guess adding placeholder functions as in your example with > igt_assert_f() statements would just add some technical debt with > little added benefit, so I'll work on a v2 with something that > works. Meanwhile we'll just skip i-g-t KernelCI builds on MIPS. > >> diff --git a/meson.build b/meson.build >> index 557400a5..0552e858 100644 >> --- a/meson.build >> +++ b/meson.build >> @@ -246,6 +246,9 @@ endif >> have = cc.has_function('memfd_create', prefix : '''#include <sys/mman.h>''', args : '-D_GNU_SOURCE') >> config.set10('HAVE_MEMFD_CREATE', have) >> >> +have_atomics = cc.compiles('void f() { int x, y; __sync_add_and_fetch(&x, y); }') >> +config.set10('HAVE_BUILTIN_ATOMICS', have_atomics) >> + >> add_project_arguments('-D_GNU_SOURCE', language : 'c') >> add_project_arguments('-include', 'config.h', language : 'c') >> >> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c >> index 2a861ca8..615bb475 100644 >> --- a/tests/i915/gem_create.c >> +++ b/tests/i915/gem_create.c >> @@ -62,6 +62,18 @@ IGT_TEST_DESCRIPTION("This is a test for the extended & old gem_create ioctl," >> " that includes allocation of object from stolen memory" >> " and shmem."); >> >> +#if !HAVE_BUILTIN_ATOMICS >> +int __sync_add_and_fetch(void *ptr, uint64_t val) >> +{ >> + igt_assert_f(false, "Don't have builtin atomics\n"); >> +} >> + >> +int __sync_val_compare_and_swap(void *ptr, uint64_t old, uint64_t new) >> +{ >> + igt_assert_f(false, "Don't have builtin atomics\n"); >> +} >> +#endif >> + >> #define CLEAR(s) memset(&s, 0, sizeof(s)) >> #define PAGE_SIZE 4096 Just to close this thread, I sent some patches earlier this week to fix the build on MIPS using the more recent __atomic_* functions from libatomic as they do have the 64-bit implementations for MIPS that were missing for the __sync_* functions (tested with gcc 8.3). I've also just sent a patch to enable Gitlab CI builds for MIPS, it's all passing: https://gitlab.freedesktop.org/gtucker/igt-gpu-tools/pipelines/40827 Guillaume _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_create: Do not build create-clear for MIPS (rev2) 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker ` (2 preceding siblings ...) 2019-04-02 8:35 ` [igt-dev] [PATCH i-g-t] " Petri Latvala @ 2019-04-02 9:12 ` Patchwork 2019-04-02 14:34 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 4 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-04-02 9:12 UTC (permalink / raw) To: Petri Latvala; +Cc: igt-dev == Series Details == Series: i915/gem_create: Do not build create-clear for MIPS (rev2) URL : https://patchwork.freedesktop.org/series/58837/ State : success == Summary == CI Bug Log - changes from CI_DRM_5853 -> IGTPW_2758 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58837/revisions/2/mbox/ Known issues ------------ Here are the changes found in IGTPW_2758 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@amdgpu/amd_basic@cs-compute: - fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094] * igt@amdgpu/amd_cs_nop@fork-gfx0: - fi-icl-u2: NOTRUN -> SKIP [fdo#109315] +17 * igt@amdgpu/amd_cs_nop@sync-fork-compute0: - fi-icl-u3: NOTRUN -> SKIP [fdo#109315] +17 * igt@gem_exec_basic@gtt-bsd1: - fi-icl-u3: NOTRUN -> SKIP [fdo#109276] +7 * igt@gem_exec_basic@readonly-bsd1: - fi-icl-u2: NOTRUN -> SKIP [fdo#109276] +7 * igt@gem_exec_parse@basic-allowed: - fi-icl-u2: NOTRUN -> SKIP [fdo#109289] +1 * igt@gem_exec_parse@basic-rejected: - fi-icl-u3: NOTRUN -> SKIP [fdo#109289] +1 * igt@i915_selftest@live_contexts: - fi-icl-u3: NOTRUN -> DMESG-FAIL [fdo#108569] - fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569] - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_chamelium@dp-edid-read: - fi-icl-u2: NOTRUN -> SKIP [fdo#109316] +2 * igt@kms_chamelium@hdmi-edid-read: - fi-hsw-peppy: NOTRUN -> SKIP [fdo#109271] +46 - fi-icl-u3: NOTRUN -> SKIP [fdo#109284] +8 * igt@kms_chamelium@vga-hpd-fast: - fi-icl-u2: NOTRUN -> SKIP [fdo#109309] +1 * igt@kms_force_connector_basic@prune-stale-modes: - fi-icl-u2: NOTRUN -> SKIP [fdo#109285] +3 - fi-icl-u3: NOTRUN -> SKIP [fdo#109285] +3 * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: NOTRUN -> FAIL [fdo#103167] - fi-hsw-peppy: NOTRUN -> DMESG-FAIL [fdo#102614] / [fdo#107814] - fi-icl-u2: NOTRUN -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: PASS -> FAIL [fdo#104008] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] #### Possible fixes #### * igt@amdgpu/amd_basic@userptr: - fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS * igt@i915_selftest@live_uncore: - fi-ivb-3770: DMESG-FAIL [fdo#110210] -> PASS * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107814]: https://bugs.freedesktop.org/show_bug.cgi?id=107814 [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (48 -> 44) ------------------------------ Additional (3): fi-hsw-peppy fi-icl-u2 fi-icl-u3 Missing (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus Build changes ------------- * IGT: IGT_4918 -> IGTPW_2758 CI_DRM_5853: ec8a565441cb4b3edb41b085a26b892c22128585 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2758: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2758/ IGT_4918: 1695d3fe15855259e6ed43b81a1142e7c572a001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2758/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for i915/gem_create: Do not build create-clear for MIPS (rev2) 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker ` (3 preceding siblings ...) 2019-04-02 9:12 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_create: Do not build create-clear for MIPS (rev2) Patchwork @ 2019-04-02 14:34 ` Patchwork 4 siblings, 0 replies; 8+ messages in thread From: Patchwork @ 2019-04-02 14:34 UTC (permalink / raw) To: Petri Latvala; +Cc: igt-dev == Series Details == Series: i915/gem_create: Do not build create-clear for MIPS (rev2) URL : https://patchwork.freedesktop.org/series/58837/ State : success == Summary == CI Bug Log - changes from CI_DRM_5853_full -> IGTPW_2758_full ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58837/revisions/2/mbox/ Known issues ------------ Here are the changes found in IGTPW_2758_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_tiled_swapping@non-threaded: - shard-hsw: PASS -> INCOMPLETE [fdo#103540] / [fdo#108686] * igt@kms_atomic_transition@3x-modeset-transitions-nonblocking: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 * igt@kms_busy@basic-flip-e: - shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +4 * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-hsw: PASS -> DMESG-WARN [fdo#110222] +1 * igt@kms_busy@extended-modeset-hang-newfb-render-b: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] +2 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a: - shard-snb: PASS -> DMESG-WARN [fdo#110222] +2 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b: - shard-apl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_color@pipe-a-ctm-max: - shard-glk: NOTRUN -> FAIL [fdo#108147] * igt@kms_cursor_crc@cursor-256x256-suspend: - shard-kbl: PASS -> INCOMPLETE [fdo#103665] +1 * igt@kms_cursor_crc@cursor-256x85-onscreen: - shard-glk: PASS -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-256x85-sliding: - shard-glk: NOTRUN -> FAIL [fdo#103232] +1 * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy: - shard-apl: NOTRUN -> SKIP [fdo#109271] +3 * igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions-varying-size: - shard-snb: PASS -> SKIP [fdo#109271] * igt@kms_frontbuffer_tracking@fbcpsr-suspend: - shard-glk: NOTRUN -> SKIP [fdo#109271] +26 * igt@kms_frontbuffer_tracking@psr-farfromfence: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +23 * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm: - shard-apl: PASS -> FAIL [fdo#104894] * igt@perf@oa-exponents: - shard-glk: PASS -> FAIL [fdo#105483] #### Possible fixes #### * igt@kms_atomic_transition@plane-all-modeset-transition-fencing: - shard-kbl: INCOMPLETE [fdo#103665] -> PASS +1 * igt@kms_busy@extended-modeset-hang-newfb-render-c: - shard-hsw: DMESG-WARN [fdo#110222] -> PASS +1 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b: - shard-kbl: DMESG-WARN [fdo#110222] -> PASS - shard-snb: DMESG-WARN [fdo#110222] -> PASS * igt@kms_cursor_crc@cursor-64x64-dpms: - shard-kbl: FAIL [fdo#103232] -> PASS - shard-apl: FAIL [fdo#103232] -> PASS * igt@kms_plane@pixel-format-pipe-a-planes: - shard-glk: SKIP [fdo#109271] -> PASS * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb: - shard-glk: FAIL [fdo#108145] -> PASS - shard-apl: FAIL [fdo#108145] -> PASS - shard-kbl: FAIL [fdo#108145] -> PASS * igt@kms_plane_scaling@pipe-c-scaler-with-rotation: - shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS * igt@kms_vblank@pipe-a-ts-continuation-dpms-rpm: - shard-kbl: FAIL [fdo#104894] -> PASS +1 * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-apl: FAIL [fdo#104894] -> PASS [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540 [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665 [fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894 [fdo#105483]: https://bugs.freedesktop.org/show_bug.cgi?id=105483 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147 [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222 Participating hosts (10 -> 5) ------------------------------ Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u Build changes ------------- * IGT: IGT_4918 -> IGTPW_2758 * Piglit: piglit_4509 -> None CI_DRM_5853: ec8a565441cb4b3edb41b085a26b892c22128585 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2758: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2758/ IGT_4918: 1695d3fe15855259e6ed43b81a1142e7c572a001 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2758/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-06-05 20:46 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-04-01 14:39 [igt-dev] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS Guillaume Tucker 2019-04-02 5:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2019-04-02 6:59 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2019-04-02 8:35 ` [igt-dev] [PATCH i-g-t] " Petri Latvala 2019-04-03 7:25 ` Guillaume Tucker 2019-06-05 20:46 ` Guillaume Tucker 2019-04-02 9:12 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_create: Do not build create-clear for MIPS (rev2) Patchwork 2019-04-02 14:34 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox