[Mesa-dev] [PATCH v2] radeonsi: fix Segmentation fault during vaapi enc test

James Zhu James.Zhu at amd.com
Mon Apr 6 18:18:56 UTC 2020


Fix Segmentation fault duiring vaapi enc test on Arcturus.
v2: fix typo

Signed-off-by: James Zhu <James.Zhu at amd.com>
---
 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 6e3b07c..0a81c68 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.7.4



More information about the mesa-dev mailing list