Trap failed map
authorCafe <cafe@not.applicable>
Tue, 1 Aug 2017 15:26:02 +0000 (15:26 +0000)
committerCafe <cafe@not.applicable>
Tue, 1 Aug 2017 15:26:02 +0000 (15:26 +0000)
src/trace.c

index a239f7473abfae12c7ab80a9227405bb765e04b2..68c164e3d3d3bfb6fcb01fbd68b26d0ea4607fd1 100644 (file)
@@ -487,6 +487,11 @@ static void chai_trace_hw_chain(uint64_t chain)
        /* Trace descriptor */
        h = fetch_mapped_gpu(chain, sizeof(*h));
 
+       if(!h) {
+               printf("Failed to map the job chain %LX\n", chain);
+               return;
+       }
+
        printf("%s job, %d-bit, status %X, incomplete %X, fault %LX, barrier %d, index %hX, dependencies (%hX, %hX)",
                        chai_job_type_name(h->job_type),
                        h->job_descriptor_size ? 64 : 32,
@@ -680,7 +685,7 @@ static void chai_trace_hw_chain(uint64_t chain)
                chai_trace_hw_chain(next);
 }
 
-static void chai_trace_atom(struct base_jd_atom_v2 *v)
+static void chai_trace_atom(struct mali_jd_atom_v2 *v)
 {
        if (v->core_req & MALI_JD_REQ_SOFT_JOB) {
                if (v->core_req & MALI_JD_REQ_SOFT_REPLAY) {