From 6975affb85314ebb83b55453d23e0e97285a7b78 Mon Sep 17 00:00:00 2001 From: Tony Ye Date: Tue, 13 Nov 2018 14:36:29 +0000 Subject: 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 Signed-off-by: Tvrtko Ursulin Cc: Tony Ye Reviewed-by: Joonas Lahtinen --- lib/gpu_cmds.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/gpu_cmds.c') 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) -- cgit v1.2.3