summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTony Ye <tony.ye@intel.com>2018-11-13 14:36:29 +0000
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-02-05 12:23:09 +0000
commit6975affb85314ebb83b55453d23e0e97285a7b78 (patch)
tree861b685a8206c6c7eedea224ba52afebcfb73ead /lib
parentc4b2b2f07fe8231afb8514fab19218dec95d562d (diff)
tests/gem_media_vme: Shut down half of subslices to avoid gpu hang on ICL
On Icelake we need to turn off subslices not containing the VME block or the VME kernel will hang. v2: (Tvrtko Ursulin) * Remove libdrm usage for setting context param. * Cleanup bitmask operation. * Only apply the workaround for ICL. v3: (Tvrtko Ursulin) * Added hang detector. (Chris Wilson) v4: (Tvrtko Ursulin) * Rebase for hang detector moved to previous patch. * Tidy curly braces. v5: (Tvrtko Ursulin) * Whitespace tidy. (Joonas) Signed-off-by: Tony Ye <tony.ye@intel.com> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tony Ye <tony.ye@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/gpu_cmds.c12
-rw-r--r--lib/gpu_cmds.h3
-rw-r--r--lib/media_fill.c2
3 files changed, 16 insertions, 1 deletions
diff --git a/lib/gpu_cmds.c b/lib/gpu_cmds.c
index b490a63b..8d270ee8 100644
--- a/lib/gpu_cmds.c
+++ b/lib/gpu_cmds.c
@@ -36,6 +36,18 @@ gen7_render_flush(struct intel_batchbuffer *batch, uint32_t batch_end)
igt_assert(ret == 0);
}
+void
+gen7_render_context_flush(struct intel_batchbuffer *batch, uint32_t batch_end)
+{
+ int ret;
+
+ ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer);
+ if (ret == 0)
+ ret = drm_intel_gem_bo_context_exec(batch->bo, batch->ctx,
+ batch_end, 0);
+ igt_assert(ret == 0);
+}
+
uint32_t
gen7_fill_curbe_buffer_data(struct intel_batchbuffer *batch,
uint8_t color)
diff --git a/lib/gpu_cmds.h b/lib/gpu_cmds.h
index ca671fb5..1321af44 100644
--- a/lib/gpu_cmds.h
+++ b/lib/gpu_cmds.h
@@ -40,6 +40,9 @@
void
gen7_render_flush(struct intel_batchbuffer *batch, uint32_t batch_end);
+void
+gen7_render_context_flush(struct intel_batchbuffer *batch, uint32_t batch_end);
+
uint32_t
gen7_fill_curbe_buffer_data(struct intel_batchbuffer *batch,
uint8_t color);
diff --git a/lib/media_fill.c b/lib/media_fill.c
index b1e84727..03b5e71e 100644
--- a/lib/media_fill.c
+++ b/lib/media_fill.c
@@ -338,7 +338,7 @@ __gen11_media_vme_func(struct intel_batchbuffer *batch,
batch_end = intel_batchbuffer_align(batch, 8);
assert(batch_end < BATCH_STATE_SPLIT);
- gen7_render_flush(batch, batch_end);
+ gen7_render_context_flush(batch, batch_end);
intel_batchbuffer_reset(batch);
}