panvk: Take lock when tracing
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 7 Feb 2023 17:18:35 +0000 (12:18 -0500)
committerMarge Bot <emma+marge@anholt.net>
Mon, 13 Feb 2023 14:04:52 +0000 (14:04 +0000)
We're not supposed to call the GENX(pandecode_jc) routines (e.g.
pandecode_jc_v7), since it's an internal interface that expects the caller to
take a lock first. Instead we're supposed to call the non-GenXML pandecode_jc
entrypoint which does the locking properly. Fixes assertion failures when
tracing with recent pandecode:

deqp-vk: ../src/util/simple_mtx.h:142: simple_mtx_assert_locked: Assertion `mtx->val' failed.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21257>

src/panfrost/vulkan/panvk_vX_device.c

index 0edf1cb..d9cd931 100644 (file)
@@ -78,8 +78,8 @@ panvk_queue_submit_batch(struct panvk_queue *queue,
       }
 
       if (debug & PANVK_DEBUG_TRACE)
-         GENX(pandecode_jc)(batch->scoreboard.first_job, pdev->gpu_id);
-      
+         pandecode_jc(batch->scoreboard.first_job, pdev->gpu_id);
+
       if (debug & PANVK_DEBUG_DUMP)
          pandecode_dump_mappings();
    }
@@ -109,7 +109,7 @@ panvk_queue_submit_batch(struct panvk_queue *queue,
       }
 
       if (debug & PANVK_DEBUG_TRACE)
-         GENX(pandecode_jc)(batch->fragment_job, pdev->gpu_id);
+         pandecode_jc(batch->fragment_job, pdev->gpu_id);
 
       if (debug & PANVK_DEBUG_DUMP)
          pandecode_dump_mappings();