summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-19 14:49:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-06 14:29:35 +0100
commit30201d9fcd2af273733e37ad6514eaf65355b2cc (patch)
tree35b16d6afaa97aeb4cb271eb1aa3a26c863980dd /lib/igt_dummyload.c
parent4b57f85b31f01701584190dd2f0adbc9563562be (diff)
lib: Spin fast, retire early
When using the pollable spinner, we often want to use it as a means of ensuring the task is running on the GPU before switching to something else. In which case we don't want to add extra delay inside the spinner, but the current 1000 NOPs add on order of 5us, which is often larger than the target latency. v2: Don't change perf_pmu as that is sensitive to the extra CPU latency from a tight GPU spinner. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com> #v1 Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> #v1 Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'lib/igt_dummyload.c')
-rw-r--r--lib/igt_dummyload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 94efdf74..7beb6624 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -199,7 +199,8 @@ emit_recursive_batch(igt_spin_t *spin,
* between function calls, that appears enough to keep SNB out of
* trouble. See https://bugs.freedesktop.org/show_bug.cgi?id=102262
*/
- batch += 1000;
+ if (!(opts->flags & IGT_SPIN_FAST))
+ batch += 1000;
/* recurse */
r = &relocs[obj[BATCH].relocation_count++];