Mesa (master): radeonsi: fix Segmentation fault during vaapi enc test

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 8 18:21:42 UTC 2020


Module: Mesa
Branch: master
Commit: 98743f648a356f55c1b10a439efea15937d4af41
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=98743f648a356f55c1b10a439efea15937d4af41

Author: James Zhu <jzhums at gmail.com>
Date:   Mon Apr  6 20:34:01 2020 +0000

radeonsi: fix Segmentation fault during vaapi enc test

Fix Segmentation fault during vaapi enc test on Arcturus.

Signed-off-by: James Zhu <James.Zhu at amd.com>
Reviewed-by Leo Liu <leo.liu at amd.com>

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4472>

---

 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,



More information about the mesa-commit mailing list