pan/decode: Handle cache flush jobs
authorAlyssa Rosenzweig <alyssa@collabora.com>
Wed, 9 Jun 2021 20:43:29 +0000 (16:43 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 18:06:11 +0000 (18:06 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>

src/panfrost/lib/decode.c

index 7182712..e3eae2b 100644 (file)
@@ -1077,6 +1077,16 @@ pandecode_write_value_job(const struct pandecode_mapped_memory *mem,
         pandecode_log("\n");
 }
 
+static void
+pandecode_cache_flush_job(const struct pandecode_mapped_memory *mem,
+                          mali_ptr job, int job_no)
+{
+        struct mali_cache_flush_job_packed *PANDECODE_PTR_VAR(p, mem, job);
+        pan_section_unpack(p, CACHE_FLUSH_JOB, PAYLOAD, u);
+        DUMP_SECTION(CACHE_FLUSH_JOB, PAYLOAD, p, "Cache Flush Payload:\n");
+        pandecode_log("\n");
+}
+
 /* Entrypoint to start tracing. jc_gpu_va is the GPU address for the first job
  * in the chain; later jobs are found by walking the chain. Bifrost is, well,
  * if it's bifrost or not. GPU ID is the more finegrained ID (at some point, we
@@ -1109,6 +1119,10 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost, unsigned gpu_id)
                         pandecode_write_value_job(mem, jc_gpu_va, job_no);
                         break;
 
+                case MALI_JOB_TYPE_CACHE_FLUSH:
+                        pandecode_cache_flush_job(mem, jc_gpu_va, job_no);
+                        break;
+
                 case MALI_JOB_TYPE_TILER:
                         if (bifrost)
                                 pandecode_tiler_job_bfr(&h, mem, jc_gpu_va, job_no, gpu_id);