Skip to contentSkip to conversation

tests/gem_storedw_loop: add new store_dword test to unify per-ring ones

PATCH In review Jesse Barnes 5 participants 61 messages Aug 13, 2015 – Aug 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/18 tests/gem_storedw_loop: add new store_dword test to unify per-ring ones

There was a lot of duplication going on... Mark as basic while we're at it as these should never fail.

---
 tests/Makefile.sources   |   1 +
 tests/gem_storedw_loop.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 tests/gem_storedw_loop.c
tests/Makefile.sources +1 -0
index b9a4cb4..cdcee33 100644
@@ -138,6 +138,7 @@ TESTS_progs = \
 	gem_seqno_wrap \
 	gem_set_tiling_vs_gtt \
 	gem_set_tiling_vs_pwrite \
+	gem_storedw_loop \
 	gem_storedw_loop_blt \
 	gem_storedw_loop_bsd \
 	gem_storedw_loop_render \
tests/gem_storedw_loop.c new file +181 -0

181 lines not on this page · raw message

Signature · 6 lines
1.9.1

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

PATCH 2/18 tests/drv_module_reload: rename drv_module_reload to include in BATs

---
 tests/Makefile.sources        |  2 +-
 tests/drv_module_reload       | 60 -------------------------------------------
 tests/drv_module_reload_basic | 60 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 61 deletions(-)
 delete mode 100755 tests/drv_module_reload
 create mode 100755 tests/drv_module_reload_basic
tests/Makefile.sources +1 -1
index cdcee33..4fe7d4c 100644
@@ -178,7 +178,7 @@ TESTS_scripts = \
 	debugfs_emon_crash \
 	drv_debugfs_reader \
 	drv_missed_irq_hang \
-	drv_module_reload \
+	drv_module_reload_basic \
 	kms_sysfs_edid_timing \
 	sysfs_l3_parity \
 	test_rte_check \
tests/drv_module_reload deleted +0 -60

60 lines not on this page · raw message

tests/drv_module_reload_basic new file +60 -0

60 lines not on this page · raw message

Signature · 6 lines
1.9.1

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

Re: [PATCH 02/18] tests/drv_module_reload: rename drv_module_reload to include in BATs

Quoted 1 line · Jesse Barnes

btw this will cause lots of hilarity because of lockdep and vt and shit like that. We probably need to grill gregkh a bit more with patches he's not merging ...
-Daniel

Quoted 160 lines
---
 tests/Makefile.sources        |  2 +-
 tests/drv_module_reload       | 60 -------------------------------------------
 tests/drv_module_reload_basic | 60 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 61 deletions(-)
 delete mode 100755 tests/drv_module_reload
 create mode 100755 tests/drv_module_reload_basic
tests/Makefile.sources +1 -1
index cdcee33..4fe7d4c 100644
@@ -178,7 +178,7 @@ TESTS_scripts = \
 	debugfs_emon_crash \
 	drv_debugfs_reader \
 	drv_missed_irq_hang \
-	drv_module_reload \
+	drv_module_reload_basic \
 	kms_sysfs_edid_timing \
 	sysfs_l3_parity \
 	test_rte_check \
tests/drv_module_reload deleted +0 -60
deleted file mode 100755
index bb29a64..0000000
@@ -1,60 +0,0 @@
-#!/bin/bash
-#
-# Testcase: Reload the drm module
-#
-# ... we've broken this way too often :(
-#
-
-SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
-. $SOURCE_DIR/drm_lib.sh
-
-# no other drm service should be running, so we can just unbind
-
-# we must kick away fbcon (but only fbcon)
-for vtcon in /sys/class/vtconsole/vtcon*/ ; do
-	if grep "frame buffer device" $vtcon/name > /dev/null ; then
-		echo unbinding $vtcon: `cat $vtcon/name`
-		echo 0 > $vtcon/bind
-	fi
-done
-
-# The sound driver uses our power well
-pkill alsactl
-rmmod snd_hda_intel &> /dev/null
-
-#ignore errors in ips - gen5 only
-rmmod intel_ips &> /dev/null
-rmmod i915
-#ignore errors in intel-gtt, often built-in
-rmmod intel-gtt &> /dev/null
-# drm may be used by other devices (nouveau, radeon, udl, etc)
-rmmod drm_kms_helper &> /dev/null
-rmmod drm &> /dev/null
-
-if lsmod | grep i915 &> /dev/null ; then
-	echo WARNING: i915.ko still loaded!
-	exit 1
-else
-	echo module successfully unloaded
-fi
-
-modprobe i915
-echo 1 > /sys/class/vtconsole/vtcon1/bind
-
-modprobe snd_hda_intel
-
-# does the device exist?
-if $SOURCE_DIR/gem_alive > /dev/null ; then
-	echo "module successfully loaded again"
-else
-	echo "failed to reload module successfully"
-	exit 2
-fi
-
-# then try to run something
-if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
-	echo "failed to execute a simple batch after reload"
-	exit 3
-fi
-
-exit 0
tests/drv_module_reload_basic new file +60 -0
new file mode 100755
index 0000000..bb29a64
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Testcase: Reload the drm module
+#
+# ... we've broken this way too often :(
+#
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+# no other drm service should be running, so we can just unbind
+
+# we must kick away fbcon (but only fbcon)
+for vtcon in /sys/class/vtconsole/vtcon*/ ; do
+	if grep "frame buffer device" $vtcon/name > /dev/null ; then
+		echo unbinding $vtcon: `cat $vtcon/name`
+		echo 0 > $vtcon/bind
+	fi
+done
+
+# The sound driver uses our power well
+pkill alsactl
+rmmod snd_hda_intel &> /dev/null
+
+#ignore errors in ips - gen5 only
+rmmod intel_ips &> /dev/null
+rmmod i915
+#ignore errors in intel-gtt, often built-in
+rmmod intel-gtt &> /dev/null
+# drm may be used by other devices (nouveau, radeon, udl, etc)
+rmmod drm_kms_helper &> /dev/null
+rmmod drm &> /dev/null
+
+if lsmod | grep i915 &> /dev/null ; then
+	echo WARNING: i915.ko still loaded!
+	exit 1
+else
+	echo module successfully unloaded
+fi
+
+modprobe i915
+echo 1 > /sys/class/vtconsole/vtcon1/bind
+
+modprobe snd_hda_intel
+
+# does the device exist?
+if $SOURCE_DIR/gem_alive > /dev/null ; then
+	echo "module successfully loaded again"
+else
+	echo "failed to reload module successfully"
+	exit 2
+fi
+
+# then try to run something
+if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
+	echo "failed to execute a simple batch after reload"
+	exit 3
+fi
+
+exit 0
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH 3/18 tests/drv_module_reload_basic: use linear_blits after module_reload for sanity check

In reply to Jesse Barnes

Reduces runtime a lot...

---
 tests/drv_module_reload_basic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/drv_module_reload_basic +1 -1
index bb29a64..cf7f2b8 100755
@@ -52,7 +52,7 @@ else
 fi
 
 # then try to run something
-if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
+if ! $SOURCE_DIR/gem_linear_blits --r basic > /dev/null ; then
 	echo "failed to execute a simple batch after reload"
 	exit 3
 fi
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 3/18
#4 lore raw

Re: [PATCH 03/18] tests/drv_module_reload_basic: use linear_blits after module_reload for sanity check

Quoted 12 lines · Jesse Barnes

Reduces runtime a lot...

---
 tests/drv_module_reload_basic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/drv_module_reload_basic +0 -0
index bb29a64..cf7f2b8 100755

tests/drv_module_reload_basic else · line 55

Quoted 5 lines
tests/drv_module_reload_basic +1 -1
@@ -52,7 +52,7 @@ else
 fi
 
 # then try to run something
-if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
+if ! $SOURCE_DIR/gem_linear_blits --r basic > /dev/null ; then

Please use the full-lenght run-subtest to avoid lots of wtf when we add another option starting with r eventually. With that fixed:

Quoted 10 lines
tests/drv_module_reload_basic +0 -0
 	echo "failed to execute a simple batch after reload"
 	exit 3
 fi
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH 03/18] tests/drv_module_reload_basic: use linear_blits after module_reload for sanity check

Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jesse Barnes

Reduces runtime a lot...

---
 tests/drv_module_reload_basic | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/drv_module_reload_basic +0 -0
index bb29a64..cf7f2b8 100755
@@ -52,7 +52,7 @@ else
 fi
 
Quoted 8 lines

tests/drv_module_reload_basic else · line 55

Quoted 3 lines
tests/drv_module_reload_basic +1 -1
 # then try to run something
-if ! $SOURCE_DIR/gem_exec_nop > /dev/null ; then
+if ! $SOURCE_DIR/gem_linear_blits --r basic > /dev/null ; then

Please use the full-lenght run-subtest to avoid lots of wtf when we add another option starting with r eventually. With that fixed:

Done, thanks.

Jesse

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

#6 lore raw

PATCH 4/18 tests/drm_import_export: mark flink and prime tests as basic

In reply to Jesse Barnes

They're testing basic functionality and don't involve stress or race induction.

---
 tests/drm_import_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drm_import_export.c +2 -2
index e24e0df..6a63ef9 100644
@@ -265,7 +265,7 @@ igt_main {
 		test_import_close_race();
 	}
 
-	igt_subtest("flink") {
+	igt_subtest("basic-flink") {
 		use_flink = true;
 
 		pthread_create(&test_thread_id1, NULL, test_thread, NULL);
@@ -279,7 +279,7 @@ igt_main {
 		pthread_join(test_thread_id4, NULL);
 	}
 
-	igt_subtest("prime") {
+	igt_subtest("basic-prime") {
 		use_flink = false;
 
 		pthread_create(&test_thread_id1, NULL, test_thread, NULL);
Signature · 6 lines
1.9.1

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

Re: [PATCH 04/18] tests/drm_import_export: mark flink and prime tests as basic

Quoted 4 lines · Jesse Barnes

They're testing basic functionality and don't involve stress or race induction.

These are more stress-tests in nature I think. For basic testscases of prime I'd recommend instead

prime_self_import: Everything not marked with *-race

gem_flink: all of them.

instead of this patch here.
-Daniel

Quoted 33 lines
---
 tests/drm_import_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drm_import_export.c +2 -2
index e24e0df..6a63ef9 100644
@@ -265,7 +265,7 @@ igt_main {
 		test_import_close_race();
 	}
 
-	igt_subtest("flink") {
+	igt_subtest("basic-flink") {
 		use_flink = true;
 
 		pthread_create(&test_thread_id1, NULL, test_thread, NULL);
@@ -279,7 +279,7 @@ igt_main {
 		pthread_join(test_thread_id4, NULL);
 	}
 
-	igt_subtest("prime") {
+	igt_subtest("basic-prime") {
 		use_flink = false;
 
 		pthread_create(&test_thread_id1, NULL, test_thread, NULL);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

Re: [PATCH 04/18] tests/drm_import_export: mark flink and prime tests as basic

Quoted 6 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

They're testing basic functionality and don't involve stress or race induction.

Quoted 8 lines

These are more stress-tests in nature I think. For basic testscases of prime I'd recommend instead

prime_self_import: Everything not marked with *-race

gem_flink: all of them.

instead of this patch here.

Sounds good, done.

Jesse

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

#9 lore raw

PATCH 5/18 tests/drv_getparams: mark EU and subslice fetch as basic

In reply to Jesse Barnes

Fundamental and simple functionality.

---
 tests/drv_getparams.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drv_getparams.c +2 -2
index 31382e9..5a5c8bb 100644
@@ -157,9 +157,9 @@ igt_main
 		init();
 	}
 
-	igt_subtest("subslice-total")
+	igt_subtest("basic-subslice-total")
 		subslice_total();
 
-	igt_subtest("eu-total")
+	igt_subtest("basic-eu-total")
 		eu_total();
 }
Signature · 6 lines
1.9.1

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

Re: [PATCH 05/18] tests/drv_getparams: mark EU and subslice fetch as basic

Quoted 3 lines · Jesse Barnes

Fundamental and simple functionality.

Mark entire testcase as basic instead to catch future extensions? getparams should always complete super-fast I think. -Daniel

Quoted 27 lines
---
 tests/drv_getparams.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drv_getparams.c +2 -2
index 31382e9..5a5c8bb 100644
@@ -157,9 +157,9 @@ igt_main
 		init();
 	}
 
-	igt_subtest("subslice-total")
+	igt_subtest("basic-subslice-total")
 		subslice_total();
 
-	igt_subtest("eu-total")
+	igt_subtest("basic-eu-total")
 		eu_total();
 }
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

Re: [PATCH 05/18] tests/drv_getparams: mark EU and subslice fetch as basic

Quoted 7 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

Fundamental and simple functionality.

Mark entire testcase as basic instead to catch future extensions? getparams should always complete super-fast I think.

Sure, that works too.

Jesse

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

#12 lore raw

PATCH 6/18 tests/drv_suspend: mark sysfs tests as basic

In reply to Jesse Barnes

debugfs may not be mounted, but sysfs should always be restored after suspend or hibernate.

---
 tests/drv_suspend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drv_suspend.c +2 -2
index d67a794..60ca8e3 100644
@@ -193,7 +193,7 @@ igt_main
 	igt_subtest("debugfs-reader")
 		test_debugfs_reader(false);
 
-	igt_subtest("sysfs-reader")
+	igt_subtest("basic-sysfs-reader")
 		test_sysfs_reader(false);
 
 	igt_subtest("forcewake")
@@ -208,7 +208,7 @@ igt_main
 	igt_subtest("debugfs-reader-hibernate")
 		test_debugfs_reader(true);
 
-	igt_subtest("sysfs-reader-hibernate")
+	igt_subtest("basic-sysfs-reader-hibernate")
 		test_sysfs_reader(true);
 
 	igt_subtest("forcewake-hibernate")
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Acked-by on v1 6/18
#13 lore raw

Re: [PATCH 06/18] tests/drv_suspend: mark sysfs tests as basic

Quoted 4 lines · Jesse Barnes

debugfs may not be mounted, but sysfs should always be restored after suspend or hibernate.

We already have a suspend/resume testcase in kms_pipc_crc_basic. Do we have enough budget for this one?

Quoted 18 lines
---
 tests/drv_suspend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/drv_suspend.c +1 -1
index d67a794..60ca8e3 100644
@@ -193,7 +193,7 @@ igt_main
 	igt_subtest("debugfs-reader")
 		test_debugfs_reader(false);
 
-	igt_subtest("sysfs-reader")
+	igt_subtest("basic-sysfs-reader")
 		test_sysfs_reader(false);
 
 	igt_subtest("forcewake")

tests/drv_suspend.c igt_main · line 212

Quoted 6 lines
tests/drv_suspend.c +1 -1
@@ -208,7 +208,7 @@ igt_main
 	igt_subtest("debugfs-reader-hibernate")
 		test_debugfs_reader(true);
 
-	igt_subtest("sysfs-reader-hibernate")
+	igt_subtest("basic-sysfs-reader-hibernate")
 		test_sysfs_reader(true);

Hibernate is a giantic can of worms. We have a big pile of issues here that we never fixed. Otoh not testing hibernate is definitely an oversight. Assuming we have the testing budget:

Quoted 9 lines
tests/drv_suspend.c +0 -0
 	igt_subtest("forcewake-hibernate")
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#14 lore raw

Re: [PATCH 06/18] tests/drv_suspend: mark sysfs tests as basic

Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

debugfs may not be mounted, but sysfs should always be restored after suspend or hibernate.

We already have a suspend/resume testcase in kms_pipc_crc_basic. Do we have enough budget for this one?

Yeah I thought about getting rid of the suspend/resume ones in pipe_crc (marking them as non-basic), since I really just want the one set of tests. Any preference?

Jesse

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

#15 lore raw

Re: [PATCH 06/18] tests/drv_suspend: mark sysfs tests as basic

Quoted 5 lines · Jesse Barnes
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

debugfs may not be mounted, but sysfs should always be restored after suspend or hibernate.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

We already have a suspend/resume testcase in kms_pipc_crc_basic. Do we have enough budget for this one?

Yeah I thought about getting rid of the suspend/resume ones in pipe_crc (marking them as non-basic), since I really just want the one set of tests. Any preference?

Imo crc is such a basic (hah!) validation tool that we really should try to run all the corner cases. Otherwise we have ugly situations where some tests randomyl fail, depending upon when they've been run after system suspend/resume or not. And with all our troubles we need to reboot a few times for a full run, so this is likely.

This actually happened (that's why we have these tests) and resulted in lots and lots of wtf until resolved. So yeah I think for crc we really want them all, even if it's a bit expensive, since if we don't there's a good chance for lots of flaky test results. And that's the prime problem we have with igt.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw

Re: [PATCH 06/18] tests/drv_suspend: mark sysfs tests as basic

Quoted 21 lines · Daniel Vetter
Quoted 5 lines · Jesse Barnes
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

debugfs may not be mounted, but sysfs should always be restored after suspend or hibernate.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

We already have a suspend/resume testcase in kms_pipc_crc_basic. Do we have enough budget for this one?

Yeah I thought about getting rid of the suspend/resume ones in pipe_crc (marking them as non-basic), since I really just want the one set of tests. Any preference?

Imo crc is such a basic (hah!) validation tool that we really should try to run all the corner cases. Otherwise we have ugly situations where some tests randomyl fail, depending upon when they've been run after system suspend/resume or not. And with all our troubles we need to reboot a few times for a full run, so this is likely.

Quoted 5 lines

This actually happened (that's why we have these tests) and resulted in lots and lots of wtf until resolved. So yeah I think for crc we really want them all, even if it's a bit expensive, since if we don't there's a good chance for lots of flaky test results. And that's the prime problem we have with igt.

Ok sounds good, I'll drop the drv_suspend test then.

Jesse

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

#17 lore raw

PATCH 7/18 tests/gem_ctx_exec: mark lrc lite restore as basic

In reply to Jesse Barnes

Need some LRC tests in the 'basic' subset, and this is a good simple one.

---
 tests/gem_ctx_exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/gem_ctx_exec.c +1 -1
index 3df939c..ea0fb7f 100644
@@ -216,7 +216,7 @@ igt_main
 		gem_context_destroy(fd, ctx_id);
 	}
 
-	igt_subtest("lrc-lite-restore") {
+	igt_subtest("basic-lrc-lite-restore") {
 		int i, j;
 
 		/*
Signature · 6 lines
1.9.1

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

Re: [PATCH 07/18] tests/gem_ctx_exec: mark lrc lite restore as basic

Quoted 4 lines · Jesse Barnes

Need some LRC tests in the 'basic' subset, and this is a good simple one.

This is just a testcase for a very specific lrc corner case. We do already exercise lrc with all the other execbuf testcases. Imo we're covered enough already with what we have in the basic testset - testing for all 3 billion cornercases will make it grow out of scope I fear. I'd just drop this one here as not needed for BAT.

If you want to extend execbuffer scope a bit then we should add a concurrency test, i.e. one of the gem_concurrent_blt testcases as basic ones. Unfortunately to be able to reliable trigger race conditions those all take a few seconds. But inter-batch sync is a _big_ gap across all archs, and something which is even more tricky with lrc (and scheduler). Imo that would be a lot more useful than this test here. -Daniel

Quoted 24 lines
---
 tests/gem_ctx_exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/gem_ctx_exec.c +1 -1
index 3df939c..ea0fb7f 100644
@@ -216,7 +216,7 @@ igt_main
 		gem_context_destroy(fd, ctx_id);
 	}
 
-	igt_subtest("lrc-lite-restore") {
+	igt_subtest("basic-lrc-lite-restore") {
 		int i, j;
 
 		/*
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#19 lore raw

Re: [PATCH 07/18] tests/gem_ctx_exec: mark lrc lite restore as basic

Quoted 12 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

Need some LRC tests in the 'basic' subset, and this is a good simple one.

This is just a testcase for a very specific lrc corner case. We do already exercise lrc with all the other execbuf testcases. Imo we're covered enough already with what we have in the basic testset - testing for all 3 billion cornercases will make it grow out of scope I fear. I'd just drop this one here as not needed for BAT.

Quoted 6 lines

If you want to extend execbuffer scope a bit then we should add a concurrency test, i.e. one of the gem_concurrent_blt testcases as basic ones. Unfortunately to be able to reliable trigger race conditions those all take a few seconds. But inter-batch sync is a _big_ gap across all archs, and something which is even more tricky with lrc (and scheduler). Imo that would be a lot more useful than this test here.

Yeah that's a good point; I just saw 'lrc' and though "I want that", but you're right we should already be covered. Definitely open to adding some concurrency stuff (maybe just a few seconds worth) as we get things in place.

I'll drop this one.

Jesse

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

#20 lore raw

Re: [PATCH 07/18] tests/gem_ctx_exec: mark lrc lite restore as basic

Quoted 20 lines · Jesse Barnes
Quoted 12 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

Need some LRC tests in the 'basic' subset, and this is a good simple one.

This is just a testcase for a very specific lrc corner case. We do already exercise lrc with all the other execbuf testcases. Imo we're covered enough already with what we have in the basic testset - testing for all 3 billion cornercases will make it grow out of scope I fear. I'd just drop this one here as not needed for BAT.

Quoted 6 lines

If you want to extend execbuffer scope a bit then we should add a concurrency test, i.e. one of the gem_concurrent_blt testcases as basic ones. Unfortunately to be able to reliable trigger race conditions those all take a few seconds. But inter-batch sync is a _big_ gap across all archs, and something which is even more tricky with lrc (and scheduler). Imo that would be a lot more useful than this test here.

Quoted 4 lines

Yeah that's a good point; I just saw 'lrc' and though "I want that", but you're right we should already be covered. Definitely open to adding some concurrency stuff (maybe just a few seconds worth) as we get things in place.

For concurrency mabye we can do that in a 2nd round - we need to go over gem_concurrent_* anyway and reshuffle that one into basic, full and subtests that we're only going to expose through cmdline options for manual testing. Atm there's way too many of those tests. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#21 lore raw

PATCH 8/18 tests/gem_mmap: mark basic object creation tests as basic

In reply to Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

---
 tests/gem_mmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/gem_mmap.c +2 -2
index 095f5b9..dd66ad6 100644
@@ -118,7 +118,7 @@ igt_main
 		igt_assert(ret == -1 && errno == ENOENT);
 	}
 
-	igt_subtest("new-object") {
+	igt_subtest("basic") {
 		arg.handle = gem_create(fd, OBJECT_SIZE);
 		arg.offset = 0;
 		arg.size = OBJECT_SIZE;
@@ -154,7 +154,7 @@ igt_main
 		gem_close(fd, arg.handle);
 	}
 
-	igt_subtest("small-bo")
+	igt_subtest("basic-small-bo")
 		test_huge_bo(fd, -1);
 	igt_subtest("big-bo")
 		test_huge_bo(fd, 0);
Signature · 6 lines
1.9.1

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

Re: [PATCH 08/18] tests/gem_mmap: mark basic object creation tests as basic

Quoted 4 lines · Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

They're all super-fast basic testcases for api cornercases. I'd vote to rename the entire testcase to gem_mmap_basic.
-Daniel

Quoted 33 lines
---
 tests/gem_mmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/gem_mmap.c +2 -2
index 095f5b9..dd66ad6 100644
@@ -118,7 +118,7 @@ igt_main
 		igt_assert(ret == -1 && errno == ENOENT);
 	}
 
-	igt_subtest("new-object") {
+	igt_subtest("basic") {
 		arg.handle = gem_create(fd, OBJECT_SIZE);
 		arg.offset = 0;
 		arg.size = OBJECT_SIZE;
@@ -154,7 +154,7 @@ igt_main
 		gem_close(fd, arg.handle);
 	}
 
-	igt_subtest("small-bo")
+	igt_subtest("basic-small-bo")
 		test_huge_bo(fd, -1);
 	igt_subtest("big-bo")
 		test_huge_bo(fd, 0);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#23 lore raw

Re: [PATCH 08/18] tests/gem_mmap: mark basic object creation tests as basic

Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

They're all super-fast basic testcases for api cornercases. I'd vote to rename the entire testcase to gem_mmap_basic.

Hmm. Time to add another test, huger-bo.
-Chris

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

Re: [PATCH 08/18] tests/gem_mmap: mark basic object creation tests as basic

Quoted 11 lines · Chris Wilson
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

They're all super-fast basic testcases for api cornercases. I'd vote to rename the entire testcase to gem_mmap_basic.

Hmm. Time to add another test, huger-bo.

Actually, the problem is that I broke the test...
-Chris

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

Re: [PATCH 08/18] tests/gem_mmap: mark basic object creation tests as basic

In reply to Daniel Vetter
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

They're all super-fast basic testcases for api cornercases. I'd vote to rename the entire testcase to gem_mmap_basic.

Not quite, the huge ones were pretty slow in my measurements... Not as bad as suspend/resume, but not super fast either.

Jesse

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

#26 lore raw

Re: [PATCH 08/18] tests/gem_mmap: mark basic object creation tests as basic

Quoted 5 lines · Jesse Barnes
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

We should be able to create small and moderate sized objects quickly and without errors.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

They're all super-fast basic testcases for api cornercases. I'd vote to rename the entire testcase to gem_mmap_basic.

Not quite, the huge ones were pretty slow in my measurements... Not as bad as suspend/resume, but not super fast either.

Right I missed those two at the bottom. But everything above small-bo looks very basic, so perhaps just include them all with a basic-* prefix? And keep the first one as basic-new-object?
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#27 lore raw

PATCH 9/18 tests/gem_mmap_gtt: mark basic access and copy tests as basic

In reply to Jesse Barnes

These ones should always pass and are fairly quick.

---
 tests/gem_mmap_gtt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/gem_mmap_gtt.c +4 -4
index a95b98a..f964b39 100644
@@ -525,7 +525,7 @@ igt_main
 	igt_fixture
 		fd = drm_open_any();
 
-	igt_subtest("access")
+	igt_subtest("basic")
 		test_access(fd);
 	igt_subtest("short")
 		test_short(fd);
@@ -556,11 +556,11 @@ igt_main
 	igt_subtest("write-cpu-read-gtt")
 		test_write_cpu_read_gtt(fd);
 
-	igt_subtest("small-bo")
+	igt_subtest("basic-small-bo")
 		test_huge_bo(fd, -1, I915_TILING_NONE);
-	igt_subtest("small-bo-tiledX")
+	igt_subtest("basic-small-bo-tiledX")
 		test_huge_bo(fd, -1, I915_TILING_X);
-	igt_subtest("small-bo-tiledY")
+	igt_subtest("basic-small-bo-tiledY")
 		test_huge_bo(fd, -1, I915_TILING_Y);
 
 	igt_subtest("big-bo")
Signature · 6 lines
1.9.1

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

Re: [PATCH 09/18] tests/gem_mmap_gtt: mark basic access and copy tests as basic

Quoted 23 lines · Jesse Barnes

These ones should always pass and are fairly quick.

---
 tests/gem_mmap_gtt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/gem_mmap_gtt.c +1 -1
index a95b98a..f964b39 100644
@@ -525,7 +525,7 @@ igt_main
 	igt_fixture
 		fd = drm_open_any();
 
-	igt_subtest("access")
+	igt_subtest("basic")
 		test_access(fd);
 	igt_subtest("short")
 		test_short(fd);
@@ -556,11 +556,11 @@ igt_main
 	igt_subtest("write-cpu-read-gtt")
 		test_write_cpu_read_gtt(fd);

tests/gem_mmap_gtt.c igt_main · line 564

Quoted 10 lines
tests/gem_mmap_gtt.c +3 -3
 
-	igt_subtest("small-bo")
+	igt_subtest("basic-small-bo")
 		test_huge_bo(fd, -1, I915_TILING_NONE);
-	igt_subtest("small-bo-tiledX")
+	igt_subtest("basic-small-bo-tiledX")
 		test_huge_bo(fd, -1, I915_TILING_X);
-	igt_subtest("small-bo-tiledY")
+	igt_subtest("basic-small-bo-tiledY")
 		test_huge_bo(fd, -1, I915_TILING_Y);

All the testcases up to this one are super-basic sanity checks and coherency checks. They should also run really fast with the exception of fault-concurrent. I'd mark them all as basic, except fault-concurrent since that's more a stress-test.
-Daniel

Quoted 9 lines
tests/gem_mmap_gtt.c +0 -0
 	igt_subtest("big-bo")
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#29 lore raw

PATCH 10/18 tests/gem_pread/pwrite: mark normal tests as basic

In reply to Jesse Barnes

These should always pass.

---
 tests/gem_pread.c  | 2 +-
 tests/gem_pwrite.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/gem_pread.c +1 -1
index cc83948..3ec5fb1 100644
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 		src = malloc(object_size);
 	}
 
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		for (count = 1; count <= 1<<17; count <<= 1) {
 			struct timeval start, end;
 
tests/gem_pwrite.c +1 -1
index 5b6a77f..1d867e7 100644
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
 		src = malloc(object_size);
 	}
 
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		for (count = 1; count <= 1<<17; count <<= 1) {
 			struct timeval start, end;
 
Signature · 6 lines
1.9.1

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

Re: [PATCH 10/18] tests/gem_pread/pwrite: mark normal tests as basic

Quoted 3 lines · Jesse Barnes

These should always pass.

If they're fast enough ... Acked-by: Daniel Vetter <[email protected]>

Quoted 38 lines
---
 tests/gem_pread.c  | 2 +-
 tests/gem_pwrite.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/gem_pread.c +1 -1
index cc83948..3ec5fb1 100644
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 		src = malloc(object_size);
 	}
 
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		for (count = 1; count <= 1<<17; count <<= 1) {
 			struct timeval start, end;
 
tests/gem_pwrite.c +1 -1
index 5b6a77f..1d867e7 100644
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
 		src = malloc(object_size);
 	}
 
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		for (count = 1; count <= 1<<17; count <<= 1) {
 			struct timeval start, end;
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#31 lore raw

PATCH 11/18 tests/gem_tiled_pread/pwrite: mark normal tests as basic

In reply to Jesse Barnes

These simple tests should always pass.

---
 tests/gem_tiled_pread.c        | 167 +++++++++++++++++++++--------------------
 tests/gem_tiled_pread_pwrite.c |  48 ++++++------
 2 files changed, 112 insertions(+), 103 deletions(-)
tests/gem_tiled_pread.c +86 -81
index fdc5173..92bb649 100644
@@ -112,7 +112,7 @@ calculate_expected(int offset)
 	return (base_y + tile_y) * WIDTH + base_x + tile_x;
 }
 
-igt_simple_main
+igt_main
 {
 	int fd;
 	int i, iter = 100;
@@ -120,96 +120,101 @@ igt_simple_main
 	uint32_t handle;
 	uint32_t devid;
 
-	fd = drm_open_any();
+	igt_fixture {
+		fd = drm_open_any();
 
-	handle = create_bo(fd);
-	gem_get_tiling(fd, handle, &tiling, &swizzle);
+		handle = create_bo(fd);
+		gem_get_tiling(fd, handle, &tiling, &swizzle);
 
-	devid = intel_get_drm_devid(fd);
-
-	if (IS_GEN2(devid)) {
-		tile_height = 16;
-		tile_width = 128;
-		tile_size = 2048;
-	} else {
-		tile_height = 8;
-		tile_width = 512;
-		tile_size = PAGE_SIZE;
+		devid = intel_get_drm_devid(fd);
 	}
 
-	/* Read a bunch of random subsets of the data and check that they come
-	 * out right.
-	 */
-	for (i = 0; i < iter; i++) {
-		int size = WIDTH * HEIGHT * 4;
-		int offset = (random() % size) & ~3;
-		int len = (random() % size) & ~3;
-		int j;
+	igt_subtest("basic") {
 
-		if (len == 0)
-			len = 4;
+		if (IS_GEN2(devid)) {
+			tile_height = 16;
+			tile_width = 128;
+			tile_size = 2048;
+		} else {
+			tile_height = 8;
+			tile_width = 512;
+			tile_size = PAGE_SIZE;
+		}
 
-		if (offset + len > size)
-			len = size - offset;
+		/* Read a bunch of random subsets of the data and check that they come
+		 * out right.
+		 */
+		for (i = 0; i < iter; i++) {
+			int size = WIDTH * HEIGHT * 4;
+			int offset = (random() % size) & ~3;
+			int len = (random() % size) & ~3;
+			int j;
 
-		if (i == 0) {
-			offset = 0;
-			len = size;
-		}
+			if (len == 0)
+				len = 4;
 
-		gem_read(fd, handle, offset, linear, len);
+			if (offset + len > size)
+				len = size - offset;
 
-		/* Translate from offsets in the read buffer to the swizzled
-		 * address that it corresponds to.  This is the opposite of
-		 * what Mesa does (calculate offset to be read given the linear
-		 * offset it's looking for).
-		 */
-		for (j = offset; j < offset + len; j += 4) {
-			uint32_t expected_val, found_val;
-			int swizzled_offset;
-			const char *swizzle_str;
-
-			switch (swizzle) {
-			case I915_BIT_6_SWIZZLE_NONE:
-				swizzled_offset = j;
-				swizzle_str = "none";
-				break;
-			case I915_BIT_6_SWIZZLE_9:
-				swizzled_offset = j ^
-					swizzle_bit(9, j);
-				swizzle_str = "bit9";
-				break;
-			case I915_BIT_6_SWIZZLE_9_10:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(10, j);
-				swizzle_str = "bit9^10";
-				break;
-			case I915_BIT_6_SWIZZLE_9_11:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(11, j);
-				swizzle_str = "bit9^11";
-				break;
-			case I915_BIT_6_SWIZZLE_9_10_11:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(10, j) ^
-					swizzle_bit(11, j);
-				swizzle_str = "bit9^10^11";
-				break;
-			default:
-				igt_assert_f(0, "Bad swizzle bits; %d\n",
-					     swizzle);
+			if (i == 0) {
+				offset = 0;
+				len = size;
+			}
+
+			gem_read(fd, handle, offset, linear, len);
+
+			/* Translate from offsets in the read buffer to the swizzled
+			 * address that it corresponds to.  This is the opposite of
+			 * what Mesa does (calculate offset to be read given the linear
+			 * offset it's looking for).
+			 */
+			for (j = offset; j < offset + len; j += 4) {
+				uint32_t expected_val, found_val;
+				int swizzled_offset;
+				const char *swizzle_str;
+
+				switch (swizzle) {
+				case I915_BIT_6_SWIZZLE_NONE:
+					swizzled_offset = j;
+					swizzle_str = "none";
+					break;
+				case I915_BIT_6_SWIZZLE_9:
+					swizzled_offset = j ^
+						swizzle_bit(9, j);
+					swizzle_str = "bit9";
+					break;
+				case I915_BIT_6_SWIZZLE_9_10:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(10, j);
+					swizzle_str = "bit9^10";
+					break;
+				case I915_BIT_6_SWIZZLE_9_11:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(11, j);
+					swizzle_str = "bit9^11";
+					break;
+				case I915_BIT_6_SWIZZLE_9_10_11:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(10, j) ^
+						swizzle_bit(11, j);
+					swizzle_str = "bit9^10^11";
+					break;
+				default:
+					igt_assert_f(0, "Bad swizzle bits; %d\n",
+						     swizzle);
+				}
+				expected_val = calculate_expected(swizzled_offset);
+				found_val = linear[(j - offset) / 4];
+				igt_assert_f(expected_val == found_val,
+					     "Bad read [%d]: %d instead of %d at 0x%08x "
+					     "for read from 0x%08x to 0x%08x, swizzle=%s\n",
+					     i, found_val, expected_val, j,
+					     offset, offset + len,
+					     swizzle_str);
 			}
-			expected_val = calculate_expected(swizzled_offset);
-			found_val = linear[(j - offset) / 4];
-			igt_assert_f(expected_val == found_val,
-				     "Bad read [%d]: %d instead of %d at 0x%08x "
-				     "for read from 0x%08x to 0x%08x, swizzle=%s\n",
-				     i, found_val, expected_val, j,
-				     offset, offset + len,
-				     swizzle_str);
 		}
 	}
 
tests/gem_tiled_pread_pwrite.c +26 -22

67 lines not on this page · raw message

Signature · 6 lines
1.9.1

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

Re: [PATCH 11/18] tests/gem_tiled_pread/pwrite: mark normal tests as basic

Quoted 3 lines · Jesse Barnes

These simple tests should always pass.

Imo shouldn't be part of the basic set, they thrash the machine quite badly. Especially gem_tiled_pread_pwrite thrashes all of memory, so nack on that one from me. At least until we've implemented the speedup with memlock that's been in JIRA since years ...

For gem_tiled_pread, why not just rename to gem_tiled_pread_basic? -Daniel

Quoted 280 lines
---
 tests/gem_tiled_pread.c        | 167 +++++++++++++++++++++--------------------
 tests/gem_tiled_pread_pwrite.c |  48 ++++++------
 2 files changed, 112 insertions(+), 103 deletions(-)
tests/gem_tiled_pread.c +86 -81
index fdc5173..92bb649 100644
@@ -112,7 +112,7 @@ calculate_expected(int offset)
 	return (base_y + tile_y) * WIDTH + base_x + tile_x;
 }
 
-igt_simple_main
+igt_main
 {
 	int fd;
 	int i, iter = 100;
@@ -120,96 +120,101 @@ igt_simple_main
 	uint32_t handle;
 	uint32_t devid;
 
-	fd = drm_open_any();
+	igt_fixture {
+		fd = drm_open_any();
 
-	handle = create_bo(fd);
-	gem_get_tiling(fd, handle, &tiling, &swizzle);
+		handle = create_bo(fd);
+		gem_get_tiling(fd, handle, &tiling, &swizzle);
 
-	devid = intel_get_drm_devid(fd);
-
-	if (IS_GEN2(devid)) {
-		tile_height = 16;
-		tile_width = 128;
-		tile_size = 2048;
-	} else {
-		tile_height = 8;
-		tile_width = 512;
-		tile_size = PAGE_SIZE;
+		devid = intel_get_drm_devid(fd);
 	}
 
-	/* Read a bunch of random subsets of the data and check that they come
-	 * out right.
-	 */
-	for (i = 0; i < iter; i++) {
-		int size = WIDTH * HEIGHT * 4;
-		int offset = (random() % size) & ~3;
-		int len = (random() % size) & ~3;
-		int j;
+	igt_subtest("basic") {
 
-		if (len == 0)
-			len = 4;
+		if (IS_GEN2(devid)) {
+			tile_height = 16;
+			tile_width = 128;
+			tile_size = 2048;
+		} else {
+			tile_height = 8;
+			tile_width = 512;
+			tile_size = PAGE_SIZE;
+		}
 
-		if (offset + len > size)
-			len = size - offset;
+		/* Read a bunch of random subsets of the data and check that they come
+		 * out right.
+		 */
+		for (i = 0; i < iter; i++) {
+			int size = WIDTH * HEIGHT * 4;
+			int offset = (random() % size) & ~3;
+			int len = (random() % size) & ~3;
+			int j;
 
-		if (i == 0) {
-			offset = 0;
-			len = size;
-		}
+			if (len == 0)
+				len = 4;
 
-		gem_read(fd, handle, offset, linear, len);
+			if (offset + len > size)
+				len = size - offset;
 
-		/* Translate from offsets in the read buffer to the swizzled
-		 * address that it corresponds to.  This is the opposite of
-		 * what Mesa does (calculate offset to be read given the linear
-		 * offset it's looking for).
-		 */
-		for (j = offset; j < offset + len; j += 4) {
-			uint32_t expected_val, found_val;
-			int swizzled_offset;
-			const char *swizzle_str;
-
-			switch (swizzle) {
-			case I915_BIT_6_SWIZZLE_NONE:
-				swizzled_offset = j;
-				swizzle_str = "none";
-				break;
-			case I915_BIT_6_SWIZZLE_9:
-				swizzled_offset = j ^
-					swizzle_bit(9, j);
-				swizzle_str = "bit9";
-				break;
-			case I915_BIT_6_SWIZZLE_9_10:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(10, j);
-				swizzle_str = "bit9^10";
-				break;
-			case I915_BIT_6_SWIZZLE_9_11:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(11, j);
-				swizzle_str = "bit9^11";
-				break;
-			case I915_BIT_6_SWIZZLE_9_10_11:
-				swizzled_offset = j ^
-					swizzle_bit(9, j) ^
-					swizzle_bit(10, j) ^
-					swizzle_bit(11, j);
-				swizzle_str = "bit9^10^11";
-				break;
-			default:
-				igt_assert_f(0, "Bad swizzle bits; %d\n",
-					     swizzle);
+			if (i == 0) {
+				offset = 0;
+				len = size;
+			}
+
+			gem_read(fd, handle, offset, linear, len);
+
+			/* Translate from offsets in the read buffer to the swizzled
+			 * address that it corresponds to.  This is the opposite of
+			 * what Mesa does (calculate offset to be read given the linear
+			 * offset it's looking for).
+			 */
+			for (j = offset; j < offset + len; j += 4) {
+				uint32_t expected_val, found_val;
+				int swizzled_offset;
+				const char *swizzle_str;
+
+				switch (swizzle) {
+				case I915_BIT_6_SWIZZLE_NONE:
+					swizzled_offset = j;
+					swizzle_str = "none";
+					break;
+				case I915_BIT_6_SWIZZLE_9:
+					swizzled_offset = j ^
+						swizzle_bit(9, j);
+					swizzle_str = "bit9";
+					break;
+				case I915_BIT_6_SWIZZLE_9_10:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(10, j);
+					swizzle_str = "bit9^10";
+					break;
+				case I915_BIT_6_SWIZZLE_9_11:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(11, j);
+					swizzle_str = "bit9^11";
+					break;
+				case I915_BIT_6_SWIZZLE_9_10_11:
+					swizzled_offset = j ^
+						swizzle_bit(9, j) ^
+						swizzle_bit(10, j) ^
+						swizzle_bit(11, j);
+					swizzle_str = "bit9^10^11";
+					break;
+				default:
+					igt_assert_f(0, "Bad swizzle bits; %d\n",
+						     swizzle);
+				}
+				expected_val = calculate_expected(swizzled_offset);
+				found_val = linear[(j - offset) / 4];
+				igt_assert_f(expected_val == found_val,
+					     "Bad read [%d]: %d instead of %d at 0x%08x "
+					     "for read from 0x%08x to 0x%08x, swizzle=%s\n",
+					     i, found_val, expected_val, j,
+					     offset, offset + len,
+					     swizzle_str);
 			}
-			expected_val = calculate_expected(swizzled_offset);
-			found_val = linear[(j - offset) / 4];
-			igt_assert_f(expected_val == found_val,
-				     "Bad read [%d]: %d instead of %d at 0x%08x "
-				     "for read from 0x%08x to 0x%08x, swizzle=%s\n",
-				     i, found_val, expected_val, j,
-				     offset, offset + len,
-				     swizzle_str);
 		}
 	}
 
tests/gem_tiled_pread_pwrite.c +26 -22
index 3d8fdc9..efb56d5 100644
@@ -101,7 +101,7 @@ create_bo(int fd)
 	return handle;
 }
 
-igt_simple_main
+igt_main
 {
 	int fd;
 	uint32_t *data;
@@ -109,34 +109,38 @@ igt_simple_main
 	uint32_t tiling, swizzle;
 	uint32_t handle, handle_target;
 	int count;
-	
-	fd = drm_open_any();
-	count = SLOW_QUICK(intel_get_total_ram_mb() * 9 / 10, 8) ;
 
-	for (i = 0; i < count/2; i++) {
-		current_tiling_mode = I915_TILING_X;
+	igt_fixture {
+		fd = drm_open_any();
+		count = SLOW_QUICK(intel_get_total_ram_mb() * 9 / 10, 8);
+	}
+
+	igt_subtest("basic") {
+		for (i = 0; i < count/2; i++) {
+			current_tiling_mode = I915_TILING_X;
 
-		handle = create_bo_and_fill(fd);
-		gem_get_tiling(fd, handle, &tiling, &swizzle);
+			handle = create_bo_and_fill(fd);
+			gem_get_tiling(fd, handle, &tiling, &swizzle);
 
-		gem_read(fd, handle, 0, linear, sizeof(linear));
+			gem_read(fd, handle, 0, linear, sizeof(linear));
 
-		handle_target = create_bo(fd);
-		gem_write(fd, handle_target, 0, linear, sizeof(linear));
+			handle_target = create_bo(fd);
+			gem_write(fd, handle_target, 0, linear, sizeof(linear));
 
-		/* Check the target bo's contents. */
-		data = gem_mmap(fd, handle_target, sizeof(linear), PROT_READ | PROT_WRITE);
-		for (j = 0; j < WIDTH*HEIGHT; j++)
-			igt_assert_f(data[j] == j,
-				     "mismatch at %i: %i\n",
-				     j, data[j]);
-		munmap(data, sizeof(linear));
+			/* Check the target bo's contents. */
+			data = gem_mmap(fd, handle_target, sizeof(linear), PROT_READ | PROT_WRITE);
+			for (j = 0; j < WIDTH*HEIGHT; j++)
+				igt_assert_f(data[j] == j,
+					     "mismatch at %i: %i\n",
+					     j, data[j]);
+			munmap(data, sizeof(linear));
 
-		/* Leak both bos so that we use all of system mem! */
-		gem_madvise(fd, handle_target, I915_MADV_DONTNEED);
-		gem_madvise(fd, handle, I915_MADV_DONTNEED);
+			/* Leak both bos so that we use all of system mem! */
+			gem_madvise(fd, handle_target, I915_MADV_DONTNEED);
+			gem_madvise(fd, handle, I915_MADV_DONTNEED);
 
-		igt_progress("gem_tiled_pread_pwrite: ", i, count/2);
+			igt_progress("gem_tiled_pread_pwrite: ", i, count/2);
+		}
 	}
 
 	close(fd);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#33 lore raw

Re: [PATCH 11/18] tests/gem_tiled_pread/pwrite: mark normal tests as basic

Quoted 11 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

These simple tests should always pass.

Imo shouldn't be part of the basic set, they thrash the machine quite badly. Especially gem_tiled_pread_pwrite thrashes all of memory, so nack on that one from me. At least until we've implemented the speedup with memlock that's been in JIRA since years ...

For gem_tiled_pread, why not just rename to gem_tiled_pread_basic?

Yeah sounds good. Fixed.

Jesse

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

#34 lore raw

PATCH 12/18 tests/kms_addfb: mark simple fb creation tests as basic

In reply to Jesse Barnes

We should always be able to create simple and tiled objects.

---
 tests/kms_addfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/kms_addfb.c +3 -3
index 42ee632..f10e12b 100644
@@ -121,7 +121,7 @@ static void pitch_tests(int fd)
 	}
 
 	f.handles[0] = gem_bo;
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
@@ -139,7 +139,7 @@ static void pitch_tests(int fd)
 		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 	f.pitches[0] = 1024*4;
 
-	igt_subtest("X-tiled") {
+	igt_subtest("basic-X-tiled") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
@@ -162,7 +162,7 @@ static void pitch_tests(int fd)
 	igt_fixture
 		gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
 	f.pitches[0] = 1024*4;
-	igt_subtest("Y-tiled") {
+	igt_subtest("basic-Y-tiled") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 			   errno == EINVAL);
 	}
Signature · 6 lines
1.9.1

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

Re: [PATCH 12/18] tests/kms_addfb: mark simple fb creation tests as basic

Quoted 3 lines · Jesse Barnes

We should always be able to create simple and tiled objects.

There's are all super-fast abi tests which don't even do a modeset. Imo add them all by renaming the testcase to kms_addfb_basic. The real functional testcases are somewhere else (x/y-tiled flipping, rotation, stuff like that).
-Daniel

Quoted 42 lines
---
 tests/kms_addfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/kms_addfb.c +3 -3
index 42ee632..f10e12b 100644
@@ -121,7 +121,7 @@ static void pitch_tests(int fd)
 	}
 
 	f.handles[0] = gem_bo;
-	igt_subtest("normal") {
+	igt_subtest("basic") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
@@ -139,7 +139,7 @@ static void pitch_tests(int fd)
 		gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
 	f.pitches[0] = 1024*4;
 
-	igt_subtest("X-tiled") {
+	igt_subtest("basic-X-tiled") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
@@ -162,7 +162,7 @@ static void pitch_tests(int fd)
 	igt_fixture
 		gem_set_tiling(fd, gem_bo, I915_TILING_Y, 1024*4);
 	f.pitches[0] = 1024*4;
-	igt_subtest("Y-tiled") {
+	igt_subtest("basic-Y-tiled") {
 		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
 			   errno == EINVAL);
 	}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#36 lore raw

PATCH 13/18 tests/kms_vblank: mark accuracy test as basic

In reply to Jesse Barnes

Need some simple vblank coverage in the BAT list.

---
 tests/kms_vblank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_vblank.c +1 -1
index 6946177..ef2f7ca 100644
@@ -188,7 +188,7 @@ igt_main
 		igt_require(crtc0_active(fd));
 	}
 
-	igt_subtest("accuracy")
+	igt_subtest("basic-accuracy")
 		accuracy(fd);
 
 	igt_subtest("query-idle")
Signature · 6 lines
1.9.1

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

Re: [PATCH 13/18] tests/kms_vblank: mark accuracy test as basic

Quoted 3 lines · Jesse Barnes

Need some simple vblank coverage in the BAT list.

This testcase relies upon fbcon to have enabled pipe 0, which means it spuriously skips (when fbcon is disabled or when it's blanked the screen) until that's fixed. Same problem happens with drm_read.

Until that's addressed imo Nack for basic igt testcase list. I'll do a jira about this issue.
-Daniel

Quoted 24 lines
---
 tests/kms_vblank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_vblank.c +1 -1
index 6946177..ef2f7ca 100644
@@ -188,7 +188,7 @@ igt_main
 		igt_require(crtc0_active(fd));
 	}
 
-	igt_subtest("accuracy")
+	igt_subtest("basic-accuracy")
 		accuracy(fd);
 
 	igt_subtest("query-idle")
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#38 lore raw

Re: [PATCH 13/18] tests/kms_vblank: mark accuracy test as basic

Quoted 11 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

Need some simple vblank coverage in the BAT list.

This testcase relies upon fbcon to have enabled pipe 0, which means it spuriously skips (when fbcon is disabled or when it's blanked the screen) until that's fixed. Same problem happens with drm_read.

Until that's addressed imo Nack for basic igt testcase list. I'll do a jira about this issue.

Meanwhile for a basic vblank testcase I think we should pick one of the kms_flip ones.
-Daniel

Quoted 30 lines

-Daniel

Quoted 24 lines
---
 tests/kms_vblank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_vblank.c +1 -1
index 6946177..ef2f7ca 100644
@@ -188,7 +188,7 @@ igt_main
 		igt_require(crtc0_active(fd));
 	}
 
-	igt_subtest("accuracy")
+	igt_subtest("basic-accuracy")
 		accuracy(fd);
 
 	igt_subtest("query-idle")
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#39 lore raw

Re: [PATCH 13/18] tests/kms_vblank: mark accuracy test as basic

In reply to Daniel Vetter
Quoted 11 lines · Daniel Vetter
Quoted 3 lines · Jesse Barnes

Need some simple vblank coverage in the BAT list.

This testcase relies upon fbcon to have enabled pipe 0, which means it spuriously skips (when fbcon is disabled or when it's blanked the screen) until that's fixed. Same problem happens with drm_read.

Until that's addressed imo Nack for basic igt testcase list. I'll do a jira about this issue.

Ok dropped.

Jesse

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

#40 lore raw

PATCH 14/18 tests/pm_backlight: mark simple test as basic

In reply to Jesse Barnes

We should be able to adjust the backlight and observe changes in sysfs.

---
 tests/pm_backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/pm_backlight.c +1 -1
index d02336d..cff2694 100644
@@ -157,7 +157,7 @@ igt_main
 		igt_assert(backlight_read(&max, "max_brightness") > -1);
 	}
 
-	igt_subtest("brightness")
+	igt_subtest("basic-brightness")
 		test_brightness(max);
 	igt_subtest("bad-brightness")
 		test_bad_brightness(max);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 14/18
#41 lore raw

Re: [PATCH 14/18] tests/pm_backlight: mark simple test as basic

Quoted 3 lines · Jesse Barnes

We should be able to adjust the backlight and observe changes in sysfs.

Quoted 24 lines
---
 tests/pm_backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/pm_backlight.c +1 -1
index d02336d..cff2694 100644
@@ -157,7 +157,7 @@ igt_main
 		igt_assert(backlight_read(&max, "max_brightness") > -1);
 	}
 
-	igt_subtest("brightness")
+	igt_subtest("basic-brightness")
 		test_brightness(max);
 	igt_subtest("bad-brightness")
 		test_bad_brightness(max);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#42 lore raw

PATCH 15/18 tests/pm_rpm: mark RTE and D3 tests as basic

In reply to Jesse Barnes

These always need to pass for basic PM functionality.

---
 tests/pm_rpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/pm_rpm.c +2 -2
index d509fa8..7ae5806 100644
@@ -1832,11 +1832,11 @@ int main(int argc, char *argv[])
 			stay_subtest();
 
 	/* Essential things */
-	igt_subtest("rte")
+	igt_subtest("basic-rte")
 		basic_subtest();
 	igt_subtest("drm-resources-equal")
 		drm_resources_equal_subtest();
-	igt_subtest("pci-d3-state")
+	igt_subtest("basic-pci-d3-state")
 		pci_d3_state_subtest();
 
 	/* Basic modeset */
Signature · 6 lines
1.9.1

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

Re: [PATCH 15/18] tests/pm_rpm: mark RTE and D3 tests as basic

Quoted 12 lines · Jesse Barnes

These always need to pass for basic PM functionality.

---
 tests/pm_rpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/pm_rpm.c +0 -0
index d509fa8..7ae5806 100644

tests/pm_rpm.c int main(int argc, char *argv[]) · line 1835

Quoted 5 lines
tests/pm_rpm.c +1 -1
@@ -1832,11 +1832,11 @@ int main(int argc, char *argv[])
 			stay_subtest();
 
 	/* Essential things */
-	igt_subtest("rte")
+	igt_subtest("basic-rte")

I thought our BAT criteria would be basic|rte?

rte is runtime environment check and more along the lines of "did QA set up their machine correctly", so imo good to keep separate. -Daniel

Quoted 15 lines
tests/pm_rpm.c +1 -1
 		basic_subtest();
 	igt_subtest("drm-resources-equal")
 		drm_resources_equal_subtest();
-	igt_subtest("pci-d3-state")
+	igt_subtest("basic-pci-d3-state")
 		pci_d3_state_subtest();
 
 	/* Basic modeset */
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#44 lore raw

Re: [PATCH 15/18] tests/pm_rpm: mark RTE and D3 tests as basic

2015-08-14 9:50 GMT-03:00 Daniel Vetter <[email protected]>:

Quoted 15 lines · Jesse Barnes
Quoted 14 lines

These always need to pass for basic PM functionality.

---
 tests/pm_rpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/pm_rpm.c +0 -0
index d509fa8..7ae5806 100644
@@ -1832,11 +1832,11 @@ int main(int argc, char *argv[])
                      stay_subtest();
 
Quoted 8 lines

tests/pm_rpm.c int main(int argc, char *argv[]) · line 1835

Quoted 3 lines
tests/pm_rpm.c +1 -1
      /* Essential things */
-     igt_subtest("rte")
+     igt_subtest("basic-rte")

I thought our BAT criteria would be basic|rte?

rte is runtime environment check and more along the lines of "did QA set up their machine correctly", so imo good to keep separate.

When I originally named the test, I thought the test would catch bad machine setups more often than the other case. But after QA managed to properly setup their machines, we got tons and tons of Kernel regressions that broke pm_rpm/rte. So "basic-rte" wouldn't be a bad name, since we can actually catch both bad setups and fundamental regressions here.

Quoted 26 lines

-Daniel

Quoted 11 lines
tests/pm_rpm.c +1 -2
              basic_subtest();
      igt_subtest("drm-resources-equal")
              drm_resources_equal_subtest();
-     igt_subtest("pci-d3-state")
+     igt_subtest("basic-pci-d3-state")
              pci_d3_state_subtest();
 
      /* Basic modeset */
--

1.9.1

Quoted 4 lines

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

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Paulo Zanoni
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#45 lore raw

Re: [PATCH 15/18] tests/pm_rpm: mark RTE and D3 tests as basic

In reply to Daniel Vetter
Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jesse Barnes

These always need to pass for basic PM functionality.

---
 tests/pm_rpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/pm_rpm.c +0 -0
index d509fa8..7ae5806 100644
@@ -1832,11 +1832,11 @@ int main(int argc, char *argv[])
 			stay_subtest();
 
Quoted 8 lines

tests/pm_rpm.c int main(int argc, char *argv[]) · line 1835

Quoted 3 lines
tests/pm_rpm.c +1 -1
 	/* Essential things */
-	igt_subtest("rte")
+	igt_subtest("basic-rte")

I thought our BAT criteria would be basic|rte?

rte is runtime environment check and more along the lines of "did QA set up their machine correctly", so imo good to keep separate.

I was hoping to keep the BAT in the 'basic' namespace only, so rte tests would be included as well, but we'd need to prefix them with basic- too. Sounds like Paulo is ok with that, so I'll keep it here. Makes test running that much simpler. :)

Jesse

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

#46 lore raw

Re: [PATCH 15/18] tests/pm_rpm: mark RTE and D3 tests as basic

Quoted 22 lines · Jesse Barnes
Quoted 21 lines · Daniel Vetter
Quoted 12 lines · Jesse Barnes

These always need to pass for basic PM functionality.

---
 tests/pm_rpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/pm_rpm.c +0 -0
index d509fa8..7ae5806 100644

tests/pm_rpm.c int main(int argc, char *argv[]) · line 1835

Quoted 5 lines
tests/pm_rpm.c +1 -1
@@ -1832,11 +1832,11 @@ int main(int argc, char *argv[])
 			stay_subtest();
 
 	/* Essential things */
-	igt_subtest("rte")
+	igt_subtest("basic-rte")

I thought our BAT criteria would be basic|rte?

Quoted 7 lines
Quoted 2 lines

rte is runtime environment check and more along the lines of "did QA set up their machine correctly", so imo good to keep separate.

I was hoping to keep the BAT in the 'basic' namespace only, so rte tests would be included as well, but we'd need to prefix them with basic- too. Sounds like Paulo is ok with that, so I'll keep it here. Makes test running that much simpler. :)

Yeah makes sense, ok with me if we go with just "basic". -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#47 lore raw

PATCH 16/18 tests/kms_flip: add basic tests for flip, flip vs dpms, and flip modeset

In reply to Jesse Barnes

Simple variants that don't do multiple output or interruptible testing.

---
 tests/kms_flip.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/kms_flip.c +10 -1
index a595d9f..a0e4112 100644
@@ -80,6 +80,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 #define TEST_HANG_ONCE		(1 << 29)
+#define TEST_BASIC		(1 << 30)
 
 #define EVENT_FLIP		(1 << 0)
 #define EVENT_VBLANK		(1 << 1)
@@ -1649,7 +1650,7 @@ int main(int argc, char **argv)
 					"blt-wf_vblank-vs-modeset" },
 		{ 60,  TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
 					"rcs-wf_vblank-vs-modeset" },
-
+		{ 30, TEST_FLIP | TEST_BASIC, "basic-plain-flip" },
 		{ 30, TEST_FLIP , "plain-flip" },
 		{ 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
 		{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
@@ -1657,12 +1658,14 @@ int main(int argc, char **argv)
 		{ 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
+		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "blt-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "render-flip-vs-dpms" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_BCS, "blt-flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_RCS, "render-flip-vs-panning" },
+		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_BCS, "blt-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_RCS, "render-flip-vs-modeset" },
@@ -1721,6 +1724,9 @@ int main(int argc, char **argv)
 		igt_subtest(tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
+		if (tests[i].flags & TEST_BASIC)
+			continue;
+
 		if (tests[i].flags & TEST_NO_2X_OUTPUT)
 			continue;
 
@@ -1740,6 +1746,9 @@ int main(int argc, char **argv)
 		    !(tests[i].flags & TEST_VBLANK_ABSOLUTE))
 			continue;
 
+		if (tests[i].flags & TEST_BASIC)
+			continue;
+
 		igt_subtest_f( "%s-interruptible", tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
Signature · 6 lines
1.9.1

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

Re: [PATCH 16/18] tests/kms_flip: add basic tests for flip, flip vs dpms, and flip modeset

Quoted 20 lines · Jesse Barnes

Simple variants that don't do multiple output or interruptible testing.

---
 tests/kms_flip.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/kms_flip.c +1 -0
index a595d9f..a0e4112 100644
@@ -80,6 +80,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 #define TEST_HANG_ONCE		(1 << 29)
+#define TEST_BASIC		(1 << 30)
 
 #define EVENT_FLIP		(1 << 0)
 #define EVENT_VBLANK		(1 << 1)

tests/kms_flip.c int main(int argc, char **argv) · line 1653

Quoted 5 lines
tests/kms_flip.c +1 -1
@@ -1649,7 +1650,7 @@ int main(int argc, char **argv)
 					"blt-wf_vblank-vs-modeset" },
 		{ 60,  TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
 					"rcs-wf_vblank-vs-modeset" },
-
+		{ 30, TEST_FLIP | TEST_BASIC, "basic-plain-flip" },

I think for better coverage we should pick the timestamp checking ones here. Also we need one to cover vblank since kms_vblank can't be used. And we can do that all in one testcases to save testing time!

Quoted 19 lines
tests/kms_flip.c +2 -0
 		{ 30, TEST_FLIP , "plain-flip" },
 		{ 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
 		{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
@@ -1657,12 +1658,14 @@ int main(int argc, char **argv)
 		{ 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
+		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "blt-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "render-flip-vs-dpms" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_BCS, "blt-flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_RCS, "render-flip-vs-panning" },
+		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_BCS, "blt-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_RCS, "render-flip-vs-modeset" },

tests/kms_flip.c int main(int argc, char **argv) · line 1728

Quoted 5 lines
tests/kms_flip.c +2 -0
@@ -1721,6 +1724,9 @@ int main(int argc, char **argv)
 		igt_subtest(tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
+		if (tests[i].flags & TEST_BASIC)
+			continue;

This means you remove the tests you marked as BASIC from the 2x and interruptible sets. What about instead adding the basic prefix at runtime, i.e. for all my requests:

tests/kms_flip.c +8 -5
index a595d9f1d69f..aaf03b07df87 100644
@@ -80,6 +80,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 #define TEST_HANG_ONCE		(1 << 29)
+#define TEST_BASIC		(1 << 31)
 
 #define EVENT_FLIP		(1 << 0)
 #define EVENT_VBLANK		(1 << 1)
@@ -1650,20 +1651,20 @@ int main(int argc, char **argv)
 		{ 60,  TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
 					"rcs-wf_vblank-vs-modeset" },
 
-		{ 30, TEST_FLIP , "plain-flip" },
+		{ 30, TEST_FLIP, "plain-flip" },
 		{ 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
 		{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
 		{ 30, TEST_FLIP | TEST_CHECK_TS, "plain-flip-ts-check" },
 		{ 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
-		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
+		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "blt-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "render-flip-vs-dpms" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_BCS, "blt-flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_RCS, "render-flip-vs-panning" },
-		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
+		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_BCS, "blt-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_RCS, "render-flip-vs-modeset" },
 		{ 30,  TEST_FLIP | TEST_VBLANK_EXPIRED_SEQ,
@@ -1671,7 +1672,7 @@ int main(int argc, char **argv)
 
 		{ 30, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_ABSOLUTE |
 		      TEST_CHECK_TS, "flip-vs-absolute-wf_vblank" },
-		{ 30, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS,
+		{ 30, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS | TEST_BASIC,
 					"flip-vs-wf_vblank" },
 		{ 30, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_BLOCK |
 			TEST_CHECK_TS, "flip-vs-blocking-wf-vblank" },
@@ -1718,7 +1719,9 @@ int main(int argc, char **argv)
 		test_nonblocking_read(drm_fd);
 
 	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
-		igt_subtest(tests[i].name)
+		igt_subtest_f("%s%s",
+			      tests[i].flags & TEST_BASIC ? "basic-" : "",
+			      tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
 		if (tests[i].flags & TEST_NO_2X_OUTPUT)

Totally untested ;-)

Cheers, Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#49 lore raw

Re: [PATCH 16/18] tests/kms_flip: add basic tests for flip, flip vs dpms, and flip modeset

Quoted 117 lines · Daniel Vetter
Quoted 20 lines · Jesse Barnes

Simple variants that don't do multiple output or interruptible testing.

---
 tests/kms_flip.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/kms_flip.c +1 -0
index a595d9f..a0e4112 100644
@@ -80,6 +80,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 #define TEST_HANG_ONCE		(1 << 29)
+#define TEST_BASIC		(1 << 30)
 
 #define EVENT_FLIP		(1 << 0)
 #define EVENT_VBLANK		(1 << 1)

tests/kms_flip.c int main(int argc, char **argv) · line 1653

Quoted 5 lines
tests/kms_flip.c +1 -1
@@ -1649,7 +1650,7 @@ int main(int argc, char **argv)
 					"blt-wf_vblank-vs-modeset" },
 		{ 60,  TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
 					"rcs-wf_vblank-vs-modeset" },
-
+		{ 30, TEST_FLIP | TEST_BASIC, "basic-plain-flip" },

I think for better coverage we should pick the timestamp checking ones here. Also we need one to cover vblank since kms_vblank can't be used. And we can do that all in one testcases to save testing time!

Quoted 19 lines
tests/kms_flip.c +2 -0
 		{ 30, TEST_FLIP , "plain-flip" },
 		{ 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
 		{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
@@ -1657,12 +1658,14 @@ int main(int argc, char **argv)
 		{ 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
+		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "blt-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "render-flip-vs-dpms" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_BCS, "blt-flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_RCS, "render-flip-vs-panning" },
+		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "basic-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_BCS, "blt-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_RCS, "render-flip-vs-modeset" },

tests/kms_flip.c int main(int argc, char **argv) · line 1728

Quoted 5 lines
tests/kms_flip.c +2 -0
@@ -1721,6 +1724,9 @@ int main(int argc, char **argv)
 		igt_subtest(tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
+		if (tests[i].flags & TEST_BASIC)
+			continue;

This means you remove the tests you marked as BASIC from the 2x and interruptible sets. What about instead adding the basic prefix at runtime, i.e. for all my requests:

tests/kms_flip.c +8 -5
index a595d9f1d69f..aaf03b07df87 100644
@@ -80,6 +80,7 @@
 #define TEST_TS_CONT		(1 << 27)
 #define TEST_BO_TOOBIG		(1 << 28)
 #define TEST_HANG_ONCE		(1 << 29)
+#define TEST_BASIC		(1 << 31)
 
 #define EVENT_FLIP		(1 << 0)
 #define EVENT_VBLANK		(1 << 1)
@@ -1650,20 +1651,20 @@ int main(int argc, char **argv)
 		{ 60,  TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
 					"rcs-wf_vblank-vs-modeset" },
 
-		{ 30, TEST_FLIP , "plain-flip" },
+		{ 30, TEST_FLIP, "plain-flip" },
 		{ 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
 		{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
 		{ 30, TEST_FLIP | TEST_CHECK_TS, "plain-flip-ts-check" },
 		{ 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
-		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
+		{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "blt-flip-vs-dpms" },
 		{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "render-flip-vs-dpms" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_BCS, "blt-flip-vs-panning" },
 		{ 60, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_RCS, "render-flip-vs-panning" },
-		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
+		{ 60, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_BCS, "blt-flip-vs-modeset" },
 		{ 60, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_RCS, "render-flip-vs-modeset" },
 		{ 30,  TEST_FLIP | TEST_VBLANK_EXPIRED_SEQ,
@@ -1671,7 +1672,7 @@ int main(int argc, char **argv)
 
 		{ 30, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_ABSOLUTE |
 		      TEST_CHECK_TS, "flip-vs-absolute-wf_vblank" },
-		{ 30, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS,
+		{ 30, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS | TEST_BASIC,
 					"flip-vs-wf_vblank" },
 		{ 30, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_BLOCK |
 			TEST_CHECK_TS, "flip-vs-blocking-wf-vblank" },
@@ -1718,7 +1719,9 @@ int main(int argc, char **argv)
 		test_nonblocking_read(drm_fd);
 
 	for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
-		igt_subtest(tests[i].name)
+		igt_subtest_f("%s%s",
+			      tests[i].flags & TEST_BASIC ? "basic-" : "",
+			      tests[i].name)
 			run_test(tests[i].duration, tests[i].flags);
 
 		if (tests[i].flags & TEST_NO_2X_OUTPUT)
Quoted 1 line

Totally untested ;-)

Yeah looks almost right. Fixed.

Jesse

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

#50 lore raw

PATCH 17/18 tests/kms_setmode: mark simple clone test as basic

In reply to Jesse Barnes

Should cover simple, single CRTC mode sets.

---
 tests/kms_setmode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_setmode.c +1 -1
index 82769ab..2c0fe45 100644
@@ -685,7 +685,7 @@ int main(int argc, char **argv)
 		const char *name;
 	} tests[] = {
 		{ TEST_CLONE | TEST_SINGLE_CRTC_CLONE,
-					"clone-single-crtc" },
+					"basic-clone-single-crtc" },
 		{ TEST_INVALID | TEST_CLONE | TEST_SINGLE_CRTC_CLONE,
 					"invalid-clone-single-crtc" },
 		{ TEST_INVALID | TEST_CLONE | TEST_EXCLUSIVE_CRTC_CLONE,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Acked-by on v1 17/18
#51 lore raw

Re: [PATCH 17/18] tests/kms_setmode: mark simple clone test as basic

Quoted 12 lines · Jesse Barnes

Should cover simple, single CRTC mode sets.

---
 tests/kms_setmode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_setmode.c +0 -0
index 82769ab..2c0fe45 100644

tests/kms_setmode.c int main(int argc, char **argv) · line 688

Quoted 5 lines
tests/kms_setmode.c +1 -1
@@ -685,7 +685,7 @@ int main(int argc, char **argv)
 		const char *name;
 	} tests[] = {
 		{ TEST_CLONE | TEST_SINGLE_CRTC_CLONE,
-					"clone-single-crtc" },
+					"basic-clone-single-crtc" },

This isn't all that simple, it covers cloning. But since kms_flip doesn't do that yet definitely makes sense to include (assuming we still have budget for kms tests).

Quoted 10 lines
tests/kms_setmode.c +0 -0
 		{ TEST_INVALID | TEST_CLONE | TEST_SINGLE_CRTC_CLONE,
 					"invalid-clone-single-crtc" },
 		{ TEST_INVALID | TEST_CLONE | TEST_EXCLUSIVE_CRTC_CLONE,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#52 lore raw

PATCH 18/18 gitignore: ignore more files

In reply to Jesse Barnes
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +13 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation
+pm_pc8
+pm_psr
+
tools/.gitignore +8 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
+forcewaked
+intel_dpio_read
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write
Signature · 6 lines
1.9.1

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

Re: [PATCH 18/18] gitignore: ignore more files

On Thu, Aug 13, 2015 at 01:31:41PM -0700, Jesse Barnes wrote:

git clean fixes this all, at least over here git status is clean. -Daniel

Quoted 68 lines
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +13 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation
+pm_pc8
+pm_psr
+
tools/.gitignore +8 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
+forcewaked
+intel_dpio_read
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#54 lore raw

Re: [PATCH 18/18] gitignore: ignore more files

git clean updates the .gitignore file? Not having to run git clean is the whole point of this patch...

Quoted 69 lines · Daniel Vetter

On Thu, Aug 13, 2015 at 01:31:41PM -0700, Jesse Barnes wrote:

git clean fixes this all, at least over here git status is clean. -Daniel

Quoted 64 lines
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +13 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation
+pm_pc8
+pm_psr
+
tools/.gitignore +8 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
+forcewaked
+intel_dpio_read
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write
Signature · 1 line
1.9.1
Quoted 5 lines
Quoted 4 lines

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

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

#55 lore raw

Re: [PATCH 18/18] gitignore: ignore more files

Quoted 1 line · Jesse Barnes

git clean updates the .gitignore file? Not having to run git clean is the whole point of this patch...

I looked at this patch first, but later noticed that you have a few renames where you don't update the .gitignore.

Quoted 41 lines · Daniel Vetter
Quoted 39 lines · Jesse Barnes

git clean fixes this all, at least over here git status is clean. -Daniel

Quoted 34 lines
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +2 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
Quoted 8 lines
Quoted 8 lines

tests/.gitignore prime_udl · line 181

Quoted 8 lines
tests/.gitignore +8 -0
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation

But all the igt_* have moved to lib/tests/ so you definitely have a pile of old build system gunk that needs to be cleaned out first with git clean.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
tests/.gitignore +3 -0
+pm_pc8
+pm_psr
+
tools/.gitignore +0 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
Quoted 8 lines
Quoted 8 lines

tools/.gitignore intel_vga_write · line 47

Quoted 8 lines
tools/.gitignore +8 -0
+forcewaked
+intel_dpio_read
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write

Same with those, Jani killed them all iirc.
-Daniel

Quoted 9 lines
Quoted 8 lines
Quoted 7 lines
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#56 lore raw

Re: [PATCH 18/18] gitignore: ignore more files

Quoted 72 lines · Daniel Vetter
Quoted 1 line · Jesse Barnes

git clean updates the .gitignore file? Not having to run git clean is the whole point of this patch...

I looked at this patch first, but later noticed that you have a few renames where you don't update the .gitignore.

Quoted 41 lines · Daniel Vetter
Quoted 39 lines · Jesse Barnes

git clean fixes this all, at least over here git status is clean. -Daniel

Quoted 34 lines
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +2 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
Quoted 8 lines
Quoted 8 lines

tests/.gitignore prime_udl · line 181

Quoted 8 lines
tests/.gitignore +8 -0
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation

But all the igt_* have moved to lib/tests/ so you definitely have a pile of old build system gunk that needs to be cleaned out first with git clean.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
tests/.gitignore +3 -0
+pm_pc8
+pm_psr
+
tools/.gitignore +2 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
+forcewaked
+intel_dpio_read
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

tools/.gitignore intel_vga_write · line 47

Quoted 6 lines
tools/.gitignore +6 -0
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write

Same with those, Jani killed them all iirc.

ah ok, I can drop those. I'll clean and such and just add the minimal set here.

Jesse

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

#57 lore raw

Re: [PATCH 18/18] gitignore: ignore more files

Quoted 82 lines · Jesse Barnes
Quoted 72 lines · Daniel Vetter
Quoted 1 line · Jesse Barnes

git clean updates the .gitignore file? Not having to run git clean is the whole point of this patch...

I looked at this patch first, but later noticed that you have a few renames where you don't update the .gitignore.

Quoted 41 lines · Daniel Vetter
Quoted 39 lines · Jesse Barnes

git clean fixes this all, at least over here git status is clean. -Daniel

Quoted 34 lines
---
 .gitignore       |  3 +++
 tests/.gitignore | 13 +++++++++++++
 tools/.gitignore |  8 ++++++++
 3 files changed, 24 insertions(+)
.gitignore +3 -0
index a438c1c..533f6f1 100644
@@ -90,3 +90,6 @@ gtk-doc.m4
 
 piglit
 results
+
+*.orig
+version.h
tests/.gitignore +2 -0
index 31d35a5..e45cbb7 100644
@@ -99,6 +99,7 @@ gem_set_tiling_vs_blt
 gem_set_tiling_vs_gtt
 gem_set_tiling_vs_pwrite
 gem_storedw_batches_loop
+gem_storedw_loop
 gem_storedw_loop_blt
 gem_storedw_loop_bsd
 gem_storedw_loop_render
@@ -169,3 +170,15 @@ prime_udl
 template
 test-list.txt
 testdisplay
+ddi_compute_wrpll
Quoted 8 lines
Quoted 8 lines

tests/.gitignore prime_udl · line 181

Quoted 8 lines
tests/.gitignore +8 -0
+gem_vmap_blits
+gem_wait_render_timeout
+igt_fork_helper
+igt_list_only
+igt_no_exit
+igt_no_exit_list_only
+igt_no_subtest
+igt_simulation

But all the igt_* have moved to lib/tests/ so you definitely have a pile of old build system gunk that needs to be cleaned out first with git clean.

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
tests/.gitignore +3 -0
+pm_pc8
+pm_psr
+
tools/.gitignore +2 -0
index 49bd24f..7bf91e3 100644
@@ -37,3 +37,11 @@ intel_vga_write
 intel_watermark
 skl_compute_wrpll
 skl_ddb_allocation
+forcewaked
+intel_dpio_read
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

tools/.gitignore intel_vga_write · line 47

Quoted 6 lines
tools/.gitignore +6 -0
+intel_dpio_write
+intel_gpu_dump
+intel_nc_read
+intel_nc_write
+intel_punit_read
+intel_punit_write

Same with those, Jani killed them all iirc.

Quoted 2 lines

ah ok, I can drop those. I'll clean and such and just add the minimal set here.

Ooops, I had sent the patch to the list, but never pushed. Done now.

BR,
Jani.

Quoted 7 lines

Jesse

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

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#58 lore raw
In reply to Jesse Barnes
Quoted 15 lines · Jesse Barnes

There was a lot of duplication going on... Mark as basic while we're at it as these should never fail.

---
 tests/Makefile.sources   |   1 +
 tests/gem_storedw_loop.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 tests/gem_storedw_loop.c
tests/Makefile.sources +0 -0
index b9a4cb4..cdcee33 100644

tests/Makefile.sources TESTS_progs = \ · line 144

Quoted 7 lines
tests/Makefile.sources +1 -0
@@ -138,6 +138,7 @@ TESTS_progs = \
 	gem_seqno_wrap \
 	gem_set_tiling_vs_gtt \
 	gem_set_tiling_vs_pwrite \
+	gem_storedw_loop \
 	gem_storedw_loop_blt \
 	gem_storedw_loop_bsd \
 	gem_storedw_loop_render \

Why not remove the old ones while at it? This just means more gunk in the overall igt set. Also please update .gitignore here for these ...

Quoted 194 lines
tests/gem_storedw_loop.c new file +181 -0
new file mode 100644
index 0000000..e4ed35d
@@ -0,0 +1,181 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * Authors:
+ *    Eric Anholt <[email protected]>
+ *    Jesse Barnes <[email protected]> (based on gem_bad_blit.c)
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include "drm.h"
+#include "ioctl_wrappers.h"
+#include "drmtest.h"
+#include "intel_bufmgr.h"
+#include "intel_batchbuffer.h"
+#include "intel_io.h"
+#include "intel_chipset.h"
+
+IGT_TEST_DESCRIPTION("Basic CS check using MI_STORE_DATA_IMM.");
+
+#define LOCAL_I915_EXEC_VEBOX (4<<0)
+
+static drm_intel_bufmgr *bufmgr;
+struct intel_batchbuffer *batch;
+static drm_intel_bo *target_buffer;
+static int has_ppgtt = 0;
+static int devid;
+
+/*
+ * Testcase: Basic bsd MI check using MI_STORE_DATA_IMM
+ */
+
+static void
+emit_store_dword_imm(drm_intel_bo *dest, uint32_t val)
+{
+	int cmd;
+	cmd = MI_STORE_DWORD_IMM;
+	if (!has_ppgtt)
+		cmd |= MI_MEM_VIRTUAL;
+
+	BEGIN_BATCH(4, 0);
+	OUT_BATCH(cmd);
+	if (batch->gen >= 8) {
+		OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION,
+			  I915_GEM_DOMAIN_INSTRUCTION, 0);
+		OUT_BATCH(val);
+	} else {
+		OUT_BATCH(0); /* reserved */
+		OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION,
+			  I915_GEM_DOMAIN_INSTRUCTION, 0);
+		OUT_BATCH(val);
+	}
+	ADVANCE_BATCH();
+}
+
+static void
+store_dword_loop(int ring, int count, int divider)
+{
+	int i, val = 0;
+	uint32_t *buf;
+
+	igt_info("running storedw loop on render with stall every %i batch\n", divider);
+
+	for (i = 0; i < SLOW_QUICK(0x2000, 0x10); i++) {
+		emit_store_dword_imm(target_buffer, val);
+		intel_batchbuffer_flush_on_ring(batch, ring);
+
+		if (i % divider != 0)
+			goto cont;
+
+		drm_intel_bo_map(target_buffer, 0);
+
+		buf = target_buffer->virtual;
+		igt_assert_f(buf[0] == val,
+			     "value mismatch: cur 0x%08x, stored 0x%08x\n",
+			     buf[0], val);
+
+		drm_intel_bo_unmap(target_buffer);
+
+cont:
+		val++;
+	}
+
+	drm_intel_bo_map(target_buffer, 0);
+	buf = target_buffer->virtual;
+
+	igt_info("completed %d writes successfully, current value: 0x%08x\n", i,
+			buf[0]);
+	drm_intel_bo_unmap(target_buffer);
+}
+
+static void
+store_test(int ring, int count)
+{
+	drm_intel_bufmgr_gem_enable_reuse(bufmgr);
+
+	batch = intel_batchbuffer_alloc(bufmgr, devid);
+	igt_assert(batch);
+
+	target_buffer = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096);
+	igt_assert(target_buffer);
+
+	store_dword_loop(ring, count, 1);
+	store_dword_loop(ring, count, 2);
+	if (!igt_run_in_simulation()) {
+		store_dword_loop(ring, count, 3);
+		store_dword_loop(ring, count, 5);
+	}
+
+	drm_intel_bo_unreference(target_buffer);
+	intel_batchbuffer_free(batch);
+	drm_intel_bufmgr_destroy(bufmgr);
+}
+
+struct ring {
+	const char *name;
+	int id;
+} rings[] = {
+	{ "bsd", I915_EXEC_BSD },
+	{ "render", I915_EXEC_RENDER },
+	{ "blt", I915_EXEC_BLT },
+	{ "vebox", I915_EXEC_VEBOX },
+};
+
+igt_main
+{
+	int fd, i;
+
+	igt_fixture {
+		fd = drm_open_any();
+		devid = intel_get_drm_devid(fd);
+
+		bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
+		igt_assert(bufmgr);
+
+		has_ppgtt = gem_uses_aliasing_ppgtt(fd);
+
+		igt_skip_on_f(intel_gen(devid) < 6,
+			      "MI_STORE_DATA can only use GTT address on gen4+/g33 and "
+			      "needs snoopable mem on pre-gen6\n");
+
+		/* This only works with ppgtt */
+		igt_require(has_ppgtt);
+	}
+
+	for (i = 0; i < ARRAY_SIZE(rings); i++) {
+		igt_subtest_f("basic-%s", rings[i].name)
+			store_test(rings[i].id, 16*1024);
+
+		igt_subtest_f("long-%s", rings[i].name)
+			store_test(rings[i].id, 1024*1024);
+	}
+
+	close(fd);
+}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#59 lore raw
Quoted 11 lines · Daniel Vetter
Quoted 10 lines · Jesse Barnes

There was a lot of duplication going on... Mark as basic while we're at it as these should never fail.

---
 tests/Makefile.sources   |   1 +
 tests/gem_storedw_loop.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 tests/gem_storedw_loop.c
Quoted 15 lines

tests/Makefile.sources TESTS_progs = \ · line 144

Quoted 12 lines
tests/Makefile.sources +1 -0
index b9a4cb4..cdcee33 100644
@@ -138,6 +138,7 @@ TESTS_progs = \
 	gem_seqno_wrap \
 	gem_set_tiling_vs_gtt \
 	gem_set_tiling_vs_pwrite \
+	gem_storedw_loop \
 	gem_storedw_loop_blt \
 	gem_storedw_loop_bsd \
 	gem_storedw_loop_render \

Why not remove the old ones while at it? This just means more gunk in the overall igt set. Also please update .gitignore here for these ...

Yeah figured that would be a separate patch assuming this one looked ok. I added it to the .gitignore in a later patch to update it all at once.

Jesse

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

#60 lore raw
Quoted 28 lines · Jesse Barnes
Quoted 11 lines · Daniel Vetter
Quoted 10 lines · Jesse Barnes

There was a lot of duplication going on... Mark as basic while we're at it as these should never fail.

---
 tests/Makefile.sources   |   1 +
 tests/gem_storedw_loop.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 182 insertions(+)
 create mode 100644 tests/gem_storedw_loop.c
Quoted 15 lines

tests/Makefile.sources TESTS_progs = \ · line 144

Quoted 12 lines
tests/Makefile.sources +1 -0
index b9a4cb4..cdcee33 100644
@@ -138,6 +138,7 @@ TESTS_progs = \
 	gem_seqno_wrap \
 	gem_set_tiling_vs_gtt \
 	gem_set_tiling_vs_pwrite \
+	gem_storedw_loop \
 	gem_storedw_loop_blt \
 	gem_storedw_loop_bsd \
 	gem_storedw_loop_render \

Why not remove the old ones while at it? This just means more gunk in the overall igt set. Also please update .gitignore here for these ...

Quoted 2 lines

Yeah figured that would be a separate patch assuming this one looked ok. I added it to the .gitignore in a later patch to update it all at once.

At least in the past when we renamed tests we've done it in one go. That way QA has an easier time finding the rename in git logs, otherwise they're just "oh it's gone" and don't carry over existing bug reports. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx