~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/freedreno/decode/cffdec.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
2382
2382
}
2383
2383
 
2384
2384
static void
 
2385
cp_fixed_stride_draw_table(uint32_t *dwords, uint32_t sizedwords, int level)
 
2386
{
 
2387
   uint64_t ibaddr;
 
2388
   uint32_t ibsize;
 
2389
   uint32_t loopcount;
 
2390
   uint32_t *ptr = NULL;
 
2391
 
 
2392
   loopcount = dwords[3];
 
2393
   ibaddr = dwords[0];
 
2394
   ibaddr |= ((uint64_t)dwords[1]) << 32;
 
2395
   ibsize = dwords[2] >> 20;
 
2396
 
 
2397
   /* map gpuaddr back to hostptr: */
 
2398
   ptr = hostptr(ibaddr);
 
2399
 
 
2400
   if (ptr) {
 
2401
      /* If the GPU hung within the target IB, the trigger point will be
 
2402
       * just after the current CP_START_BIN.  Because the IB is
 
2403
       * executed but never returns.  Account for this by checking if
 
2404
       * the IB returned:
 
2405
       */
 
2406
      highlight_gpuaddr(gpuaddr(&dwords[5]));
 
2407
 
 
2408
      ib++;
 
2409
      for (uint32_t i = 0; i < loopcount; i++) {
 
2410
         ibs[ib].base = ibaddr;
 
2411
         ibs[ib].size = ibsize;
 
2412
         printl(3, "%sdraw %u\n", levels[level], i);
 
2413
         dump_commands(ptr, ibsize, level);
 
2414
         ibaddr += ibsize;
 
2415
         ptr += ibsize;
 
2416
      }
 
2417
      ib--;
 
2418
   } else {
 
2419
      fprintf(stderr, "could not find: %016" PRIx64 " (%d)\n", ibaddr, ibsize);
 
2420
   }
 
2421
}
 
2422
 
 
2423
static void
2385
2424
cp_wfi(uint32_t *dwords, uint32_t sizedwords, int level)
2386
2425
{
2387
2426
   needs_wfi = false;
2894
2933
 
2895
2934
   CP(START_BIN, cp_start_bin),
2896
2935
 
 
2936
   CP(FIXED_STRIDE_DRAW_TABLE, cp_fixed_stride_draw_table),
 
2937
 
2897
2938
   /* for a7xx */
2898
2939
   CP(THREAD_CONTROL, cp_set_thread_control),
2899
2940
   CP(CONTEXT_REG_BUNCH2, cp_context_reg_bunch2),