Skip to contentSkip to conversation

Add a testsuite to validate VC4 MADV ioctl

PATCH New Boris Brezillon 2 participants 6 messages Feb 7, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add a testsuite to validate VC4 MADV ioctl

Hello,

This patchset adds VC4 specific tests to validate the DRM_IOCTL_VC4_GEM_MADVISE ioctl. I re-submit it now that all other pieces (kernel+mesa) have been merged.

Thanks,

Boris

Boris Brezillon (3):
igt/vc4: Add a helper function to mark BOs purgeable
igt: Add igt_vc4_get_param() helper
igt: Add VC4 purgeable BO tests

 lib/igt_vc4.c            |  27 +++++
 lib/igt_vc4.h            |   2 +
 tests/Makefile.sources   |   1 +
 tests/meson.build        |   1 +
 tests/vc4_purgeable_bo.c | 264 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 295 insertions(+)
 create mode 100644 tests/vc4_purgeable_bo.c
Signature · 6 lines
2.14.1

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

PATCH v3 1/3 igt/vc4: Add a helper function to mark BOs purgeable

From: Boris Brezillon <[email protected]>

v2: Rebase on get/set_tiling helpers (by anholt).

---
 lib/igt_vc4.c | 12 ++++++++++++
 lib/igt_vc4.h |  1 +
 2 files changed, 13 insertions(+)
lib/igt_vc4.c +12 -0
index 5347af8df400..238bf26bd6bb 100644
@@ -149,3 +149,15 @@ uint64_t igt_vc4_get_tiling(int fd, uint32_t handle)
 
 	return get.modifier;
 }
+
+bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable)
+{
+	struct drm_vc4_gem_madvise arg = {
+		.handle = handle,
+		.madv = purgeable ? VC4_MADV_DONTNEED : VC4_MADV_WILLNEED,
+	};
+
+	do_ioctl(fd, DRM_IOCTL_VC4_GEM_MADVISE, &arg);
+
+	return arg.retained;
+}
lib/igt_vc4.h +1 -0
index d1740b93f1fc..2c016b16debd 100644
@@ -27,6 +27,7 @@
 uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval);
 int igt_vc4_create_bo(int fd, size_t size);
 void *igt_vc4_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot);
+bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable);
 
 void igt_vc4_set_tiling(int fd, uint32_t handle, uint64_t modifier);
 uint64_t igt_vc4_get_tiling(int fd, uint32_t handle);
Signature · 6 lines
2.14.1

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

PATCH v3 2/3 igt: Add igt_vc4_get_param() helper

In reply to Boris Brezillon

From: Boris Brezillon <[email protected]>

v2: Rebase on get/set_tiling helpers (by anholt).

---
 lib/igt_vc4.c | 15 +++++++++++++++
 lib/igt_vc4.h |  1 +
 2 files changed, 16 insertions(+)
lib/igt_vc4.c +15 -0
index 238bf26bd6bb..16dfe67a44b1 100644
@@ -150,6 +150,21 @@ uint64_t igt_vc4_get_tiling(int fd, uint32_t handle)
 	return get.modifier;
 }
 
+int igt_vc4_get_param(int fd, uint32_t param, uint64_t *val)
+{
+	struct drm_vc4_get_param arg = {
+		.param = param,
+	};
+	int ret;
+
+	ret = igt_ioctl(fd, DRM_IOCTL_VC4_GET_PARAM, &arg);
+	if (ret)
+		return ret;
+
+	*val = arg.value;
+	return 0;
+}
+
 bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable)
 {
 	struct drm_vc4_gem_madvise arg = {
lib/igt_vc4.h +1 -0
index 2c016b16debd..ebc8a3881b5e 100644
@@ -27,6 +27,7 @@
 uint32_t igt_vc4_get_cleared_bo(int fd, size_t size, uint32_t clearval);
 int igt_vc4_create_bo(int fd, size_t size);
 void *igt_vc4_mmap_bo(int fd, uint32_t handle, uint32_t size, unsigned prot);
+int igt_vc4_get_param(int fd, uint32_t param, uint64_t *val);
 bool igt_vc4_purgeable_bo(int fd, int handle, bool purgeable);
 
 void igt_vc4_set_tiling(int fd, uint32_t handle, uint64_t modifier);
Signature · 6 lines
2.14.1

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

PATCH v3 3/3 igt: Add VC4 purgeable BO tests

In reply to Boris Brezillon

From: Boris Brezillon <[email protected]>

v3: Make sure we receive a SIGBUS signal when accessing memory of a
purged BO
Add <signal.h> include after rebase (by anholt)

---
 tests/Makefile.sources   |   1 +
 tests/meson.build        |   1 +
 tests/vc4_purgeable_bo.c | 264 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 266 insertions(+)
 create mode 100644 tests/vc4_purgeable_bo.c
tests/Makefile.sources +1 -0
index 870c9093550b..2bee944ac47d 100644
@@ -9,6 +9,7 @@ VC4_TESTS = \
 	vc4_dmabuf_poll \
 	vc4_lookup_fail \
 	vc4_label_bo \
+	vc4_purgeable_bo \
 	vc4_tiling \
 	vc4_wait_bo \
 	vc4_wait_seqno \
tests/meson.build +1 -0
index 521a4c425a68..2a1e6f19e374 100644
@@ -212,6 +212,7 @@ test_progs = [
 	'vc4_dmabuf_poll',
 	'vc4_label_bo',
 	'vc4_lookup_fail',
+	'vc4_purgeable_bo',
 	'vc4_tiling',
 	'vc4_wait_bo',
 	'vc4_wait_seqno',
tests/vc4_purgeable_bo.c new file +264 -0

264 lines not on this page · raw message

Signature · 6 lines
2.14.1

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

[igt-dev] ✓ Fi.CI.BAT: success for Add a testsuite to validate VC4 MADV ioctl

In reply to Boris Brezillon
== Series Details ==

== Series Details ==

Series: Add a testsuite to validate VC4 MADV ioctl
URL : https://patchwork.freedesktop.org/series/37797/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 2baf7ece5b6d2faccedc56527ec91623f41a85e4 lib: Move __gem_context_create to common ioctl wrapper library.

with latest DRM-Tip kernel build CI_DRM_3731
e5f22cbeec1d drm-tip: 2018y-02m-07d-08h-09m-07s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test gem_sync:
        Subgroup basic-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-each:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-many-each:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-store-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-store-each:
                skip       -> PASS       (fi-pnv-d510)
Test gem_tiled_blits:
        Subgroup basic:
                skip       -> PASS       (fi-pnv-d510)
Test gem_tiled_fence_blits:
        Subgroup basic:
                skip       -> PASS       (fi-pnv-d510)
Test gem_wait:
        Subgroup basic-busy-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-wait-all:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-await-all:
                skip       -> PASS       (fi-pnv-d510)
Test kms_busy:
        Subgroup basic-flip-a:
                skip       -> PASS       (fi-pnv-d510)
        Subgroup basic-flip-b:
                skip       -> PASS       (fi-pnv-d510)
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                skip       -> PASS       (fi-pnv-d510)

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:419s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:431s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:501s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:288s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:485s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:488s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:471s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:462s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:565s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:580s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:418s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:289s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:513s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:394s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:412s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:462s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:419s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:464s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:504s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:500s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:603s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:442s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:509s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:527s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:486s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:493s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:416s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:429s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:406s

Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:474s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_877/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for Add a testsuite to validate VC4 MADV ioctl

In reply to Boris Brezillon
== Series Details ==

== Series Details ==

Series: Add a testsuite to validate VC4 MADV ioctl
URL : https://patchwork.freedesktop.org/series/37797/
State : failure

== Summary ==

Test kms_flip:

        Subgroup 2x-dpms-vs-vblank-race:
                pass       -> FAIL       (shard-hsw)
        Subgroup flip-vs-modeset-vs-hang-interruptible:
                pass       -> DMESG-WARN (shard-snb) fdo#104311
        Subgroup plain-flip-fb-recreate-interruptible:
                pass       -> FAIL       (shard-snb) fdo#100368
Test gem_eio:
        Subgroup in-flight:
                fail       -> PASS       (shard-hsw) fdo#104676
Test kms_atomic_transition:
        Subgroup 2x-modeset-transitions:
                skip       -> PASS       (shard-hsw)
Test kms_plane_multiple:
        Subgroup atomic-pipe-b-tiling-y:
                fail       -> PASS       (shard-apl) fdo#103166
Test pm_rc6_residency:
        Subgroup rc6-accuracy:
                pass       -> SKIP       (shard-snb)
Test perf:
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254

fdo#104311 https://bugs.freedesktop.org/show_bug.cgi?id=104311
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254

shard-apl        total:3384 pass:1746 dwarn:1   dfail:0   fail:20  skip:1616 time:12248s
shard-hsw        total:3442 pass:1758 dwarn:1   dfail:0   fail:11  skip:1671 time:11589s
shard-snb        total:3442 pass:1349 dwarn:2   dfail:0   fail:11  skip:2080 time:6688s

Blacklisted hosts:
shard-kbl total:3442 pass:1914 dwarn:1 dfail:0 fail:21 skip:1506 time:9756s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_877/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev