struct msm_gpu_state_bo *gmu_hfi;
struct msm_gpu_state_bo *gmu_debug;
- s32 hfi_queue_history[2][HFI_HISTORY_SZ];
+ s32 hfi_queue_history[HFI_MAX_QUEUES][HFI_HISTORY_SZ];
struct list_head objs;
struct a6xx_gmu_bo *hfi = &gmu->hfi;
struct a6xx_hfi_queue_table_header *table = hfi->virt;
struct a6xx_hfi_queue_header *headers = hfi->virt + sizeof(*table);
+ int table_size, idx;
u64 offset;
- int table_size;
/*
* The table size is the size of the table header plus all of the queue
table->active_queues = ARRAY_SIZE(gmu->queues);
/* Command queue */
+ idx = 0;
offset = SZ_4K;
- a6xx_hfi_queue_init(&gmu->queues[0], &headers[0], hfi->virt + offset,
+ a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset,
hfi->iova + offset, 0);
/* GMU response queue */
+ idx++;
offset += SZ_4K;
- a6xx_hfi_queue_init(&gmu->queues[1], &headers[1], hfi->virt + offset,
+ a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset,
hfi->iova + offset, gmu->legacy ? 4 : 1);
+
+ /* GMU Debug queue */
+ idx++;
+ offset += SZ_4K;
+ a6xx_hfi_queue_init(&gmu->queues[idx], &headers[idx], hfi->virt + offset,
+ hfi->iova + offset, gmu->legacy ? 5 : 2);
+
+ WARN_ON(idx >= HFI_MAX_QUEUES);
}