From fa86e33ccc56ee84f2f9ac924943eef0f1469a32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Mon, 28 Apr 2014 17:58:45 +0300 Subject: [PATCH] tests/gem_stress: Fix rendercopy vs. keep_gpu_busy on gen6+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If the hardware has a blt ring blits aren't allowed on the render ring. Trying to execute blits on the render ring results in a GPU hang. Flush outstanding blits from keep_gpu_busy() before calling rendercopy() so that they don't end up on the render ring. Signed-off-by: Ville Syrjälä --- tests/gem_stress.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/gem_stress.c b/tests/gem_stress.c index 4cbe8f4..e6a6ce6 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -346,11 +346,16 @@ static void render_copyfunc(struct igt_buf *src, unsigned src_x, unsigned src_y, if (keep_gpu_busy_counter & 1) keep_gpu_busy(); - if (rendercopy) + if (rendercopy) { + /* + * Flush outstanding blts so that they don't end up on + * the render ring when that's not allowed (gen6+). + */ + intel_batchbuffer_flush(batch); rendercopy(batch, NULL, src, src_x, src_y, options.tile_size, options.tile_size, dst, dst_x, dst_y); - else + } else blitter_copyfunc(src, src_x, src_y, dst, dst_x, dst_y, logical_tile_no); -- 2.7.4