From 98743f648a356f55c1b10a439efea15937d4af41 Mon Sep 17 00:00:00 2001 From: James Zhu Date: Mon, 6 Apr 2020 20:34:01 +0000 Subject: [PATCH] radeonsi: fix Segmentation fault during vaapi enc test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix Segmentation fault during vaapi enc test on Arcturus. Signed-off-by: James Zhu Reviewed-by Leo Liu Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_compute_blit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 6e3b07cb7c8..0a81c6867e6 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -63,7 +63,8 @@ static void si_launch_grid_internal(struct si_context *sctx, struct pipe_grid_in sctx->flags |= SI_CONTEXT_STOP_PIPELINE_STATS; sctx->render_cond_force_off = true; /* Skip decompression to prevent infinite recursion. */ - sctx->blitter->running = true; + if (sctx->blitter) + sctx->blitter->running = true; /* Dispatch compute. */ sctx->b.launch_grid(&sctx->b, info); @@ -72,7 +73,8 @@ static void si_launch_grid_internal(struct si_context *sctx, struct pipe_grid_in sctx->flags &= ~SI_CONTEXT_STOP_PIPELINE_STATS; sctx->flags |= SI_CONTEXT_START_PIPELINE_STATS; sctx->render_cond_force_off = false; - sctx->blitter->running = false; + if (sctx->blitter) + sctx->blitter->running = false; } static void si_compute_clear_12bytes_buffer(struct si_context *sctx, struct pipe_resource *dst, -- 2.30.2