A618 HFI ACTIVE QUEUE AUDIT
========== adreno_a6xx_hfi.c ==========
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:14:#include "kgsl_trace.h"
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:15:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:16:/* Below section is for all structures related to HFI queues */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:17:#define HFI_QUEUE_MAX HFI_QUEUE_DEFAULT_CNT
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:18:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:19:/* Total header sizes + queue sizes + 16 for alignment */
#include "kgsl_trace.h"
/* Below section is for all structures related to HFI queues */
/* Total header sizes + queue sizes + 16 for alignment */
#define HFIMEM_SIZE (sizeof(struct hfi_queue_table) + 16 + \
(HFI_QUEUE_SIZE * HFI_QUEUE_MAX))
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:20:#define HFIMEM_SIZE (sizeof(struct hfi_queue_table) + 16 + \
#define HFI_QUEUE_MAX HFI_QUEUE_DEFAULT_CNT
/* Total header sizes + queue sizes + 16 for alignment */
(HFI_QUEUE_SIZE * HFI_QUEUE_MAX))
struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev)
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:21: (HFI_QUEUE_SIZE * HFI_QUEUE_MAX))
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:22:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:23:struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:24:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:25: struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:26:
/* Total header sizes + queue sizes + 16 for alignment */
#define HFIMEM_SIZE (sizeof(struct hfi_queue_table) + 16 + \
struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev)
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:28:}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:29:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:30:/* Size in below functions are in unit of dwords */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:31:int a6xx_hfi_queue_read(struct a6xx_gmu_device *gmu, uint32_t queue_idx,
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:32: unsigned int *output, unsigned int max_size)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:33:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:34: struct kgsl_device *device = KGSL_DEVICE(a6xx_gmu_to_adreno(gmu));
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:35: struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
}
/* Size in below functions are in unit of dwords */
unsigned int *output, unsigned int max_size)
{
struct kgsl_device *device = KGSL_DEVICE(a6xx_gmu_to_adreno(gmu));
struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
struct hfi_queue_table *tbl = mem_addr->hostptr;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:36: struct hfi_queue_table *tbl = mem_addr->hostptr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:37: struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:38: uint32_t *queue;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:39: uint32_t msg_hdr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:40: uint32_t i, read;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:41: uint32_t size;
{
struct kgsl_device *device = KGSL_DEVICE(a6xx_gmu_to_adreno(gmu));
struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
uint32_t *queue;
uint32_t msg_hdr;
uint32_t i, read;
uint32_t size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:42: int result = 0;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:43:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:44: if (hdr->status == HFI_QUEUE_STATUS_DISABLED)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:45: return -EINVAL;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:46:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:47: if (hdr->read_index == hdr->write_index)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:48: return -ENODATA;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:49:
uint32_t size;
int result = 0;
return -EINVAL;
if (hdr->read_index == hdr->write_index)
return -ENODATA;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:64:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:65: read = hdr->read_index;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:66:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:67: if (read < hdr->queue_size) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:68: for (i = 0; i < size && i < (max_size >> 2); i++) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:69: output[i] = queue[read];
read = hdr->read_index;
for (i = 0; i < size && i < (max_size >> 2); i++) {
output[i] = queue[read];
read = (read + 1)%hdr->queue_size;
}
result = size;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:70: read = (read + 1)%hdr->queue_size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:71: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:72: result = size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:73: } else {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:74: /* In case FW messed up */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:75: dev_err(GMU_PDEV_DEV(device),
if (read < hdr->queue_size) {
for (i = 0; i < size && i < (max_size >> 2); i++) {
output[i] = queue[read];
}
result = size;
} else {
/* In case FW messed up */
dev_err(GMU_PDEV_DEV(device),
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:76: "Read index %d greater than queue size %d\n",
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:77: hdr->read_index, hdr->queue_size);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:78: result = -ENODATA;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:79: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:80:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:81: if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2)
/* In case FW messed up */
dev_err(GMU_PDEV_DEV(device),
"Read index %d greater than queue size %d\n",
result = -ENODATA;
}
if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2)
read = ALIGN(read, SZ_4) % hdr->queue_size;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:82: read = ALIGN(read, SZ_4) % hdr->queue_size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:83:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:84: /* For acks, trace the packet for which this ack was sent */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:85: if (MSG_HDR_GET_TYPE(msg_hdr) == HFI_MSG_ACK)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:86: trace_kgsl_hfi_receive(MSG_HDR_GET_ID(output[1]),
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:87: MSG_HDR_GET_SIZE(output[1]),
}
if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2)
/* For acks, trace the packet for which this ack was sent */
if (MSG_HDR_GET_TYPE(msg_hdr) == HFI_MSG_ACK)
trace_kgsl_hfi_receive(MSG_HDR_GET_ID(output[1]),
MSG_HDR_GET_SIZE(output[1]),
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:97:}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:98:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:99:/* Size in below functions are in unit of dwords */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:100:int a6xx_hfi_queue_write(struct adreno_device *adreno_dev, uint32_t queue_idx,
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:101: uint32_t *msg, u32 size_bytes)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:102:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:103: struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:104: struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
}
/* Size in below functions are in unit of dwords */
uint32_t *msg, u32 size_bytes)
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
struct hfi_queue_table *tbl = gmu->hfi.hfi_mem->hostptr;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:105: struct hfi_queue_table *tbl = gmu->hfi.hfi_mem->hostptr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:106: struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:107: uint32_t *queue;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:108: uint32_t i, write_idx, read_idx, empty_space;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:109: uint32_t size_dwords = size_bytes >> 2;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:110: u32 align_size = ALIGN(size_dwords, SZ_4);
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
struct hfi_queue_header *hdr = &tbl->qhdr[queue_idx];
uint32_t *queue;
uint32_t i, write_idx, read_idx, empty_space;
uint32_t size_dwords = size_bytes >> 2;
u32 align_size = ALIGN(size_dwords, SZ_4);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:111: uint32_t id = MSG_HDR_GET_ID(*msg);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:112:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:113: if (hdr->status == HFI_QUEUE_STATUS_DISABLED || !IS_ALIGNED(size_bytes, sizeof(u32)))
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:114: return -EINVAL;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:115:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:116: queue = HOST_QUEUE_START_ADDR(gmu->hfi.hfi_mem, queue_idx);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:117:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:118: write_idx = hdr->write_index;
u32 align_size = ALIGN(size_dwords, SZ_4);
uint32_t id = MSG_HDR_GET_ID(*msg);
return -EINVAL;
queue = HOST_QUEUE_START_ADDR(gmu->hfi.hfi_mem, queue_idx);
write_idx = hdr->write_index;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:119: read_idx = hdr->read_index;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:120:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:121: empty_space = (write_idx >= read_idx) ?
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:122: (hdr->queue_size - (write_idx - read_idx))
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:123: : (read_idx - write_idx);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:124:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:125: if (empty_space <= align_size)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:126: return -ENOSPC;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:127:
read_idx = hdr->read_index;
empty_space = (write_idx >= read_idx) ?
: (read_idx - write_idx);
if (empty_space <= align_size)
return -ENOSPC;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:128: for (i = 0; i < size_dwords; i++) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:129: queue[write_idx] = msg[i];
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:130: write_idx = (write_idx + 1) % hdr->queue_size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:131: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:132:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:133: /* Cookify any non used data at the end of the write buffer */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:134: if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:135: for (; i < align_size; i++) {
for (i = 0; i < size_dwords; i++) {
queue[write_idx] = msg[i];
}
/* Cookify any non used data at the end of the write buffer */
if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2) {
for (; i < align_size; i++) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:136: queue[write_idx] = 0xFAFAFAFA;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:137: write_idx = (write_idx + 1) % hdr->queue_size;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:138: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:139: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:140:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:141: trace_kgsl_hfi_send(id, size_dwords, MSG_HDR_GET_SEQNUM(*msg));
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:142:
if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) >= 2) {
for (; i < align_size; i++) {
queue[write_idx] = 0xFAFAFAFA;
}
}
trace_kgsl_hfi_send(id, size_dwords, MSG_HDR_GET_SEQNUM(*msg));
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:149:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:150: int ret;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:151:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:152: ret = a6xx_hfi_queue_write(adreno_dev, HFI_CMD_ID, msg, size_bytes);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:153:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:154: /*
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:155: * Memory barrier to make sure packet and write index are written before
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:156: * an interrupt is raised
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:157: */
{
int ret;
/*
* Memory barrier to make sure packet and write index are written before
* an interrupt is raised
*/
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:172: struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:173: struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:174: int i;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:175: struct hfi_queue_table *tbl;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:176: struct hfi_queue_header *hdr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:177: struct {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:178: unsigned int idx;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:179: unsigned int pri;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:180: unsigned int status;
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
int i;
struct hfi_queue_header *hdr;
struct {
unsigned int idx;
unsigned int pri;
unsigned int status;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:181: } queue[HFI_QUEUE_MAX] = {
unsigned int idx;
unsigned int pri;
unsigned int status;
{ HFI_CMD_IDX, HFI_CMD_PRI, HFI_QUEUE_STATUS_ENABLED },
{ HFI_MSG_IDX, HFI_MSG_PRI, HFI_QUEUE_STATUS_ENABLED },
{ HFI_DBG_IDX, HFI_DBG_PRI, HFI_QUEUE_STATUS_ENABLED },
};
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:182: { HFI_CMD_IDX, HFI_CMD_PRI, HFI_QUEUE_STATUS_ENABLED },
unsigned int pri;
unsigned int status;
} queue[HFI_QUEUE_MAX] = {
{ HFI_MSG_IDX, HFI_MSG_PRI, HFI_QUEUE_STATUS_ENABLED },
{ HFI_DBG_IDX, HFI_DBG_PRI, HFI_QUEUE_STATUS_ENABLED },
};
/*
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:183: { HFI_MSG_IDX, HFI_MSG_PRI, HFI_QUEUE_STATUS_ENABLED },
unsigned int status;
} queue[HFI_QUEUE_MAX] = {
{ HFI_CMD_IDX, HFI_CMD_PRI, HFI_QUEUE_STATUS_ENABLED },
{ HFI_DBG_IDX, HFI_DBG_PRI, HFI_QUEUE_STATUS_ENABLED },
};
/*
* Overwrite the queue IDs for A630, A615 and A616 as they use
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:184: { HFI_DBG_IDX, HFI_DBG_PRI, HFI_QUEUE_STATUS_ENABLED },
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:185: };
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:186:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:187: /*
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:188: * Overwrite the queue IDs for A630, A615 and A616 as they use
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:189: * legacy firmware. Legacy firmware has different queue IDs for
} queue[HFI_QUEUE_MAX] = {
{ HFI_CMD_IDX, HFI_CMD_PRI, HFI_QUEUE_STATUS_ENABLED },
{ HFI_MSG_IDX, HFI_MSG_PRI, HFI_QUEUE_STATUS_ENABLED },
};
/*
* Overwrite the queue IDs for A630, A615 and A616 as they use
* legacy firmware. Legacy firmware has different queue IDs for
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:191: * on these targets so the queue idx value update is not needed).
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:192: */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:193: if (adreno_is_a630(adreno_dev) || adreno_is_a615_family(adreno_dev)) {
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:194: queue[HFI_MSG_ID].idx = HFI_MSG_IDX_LEGACY;
* on these targets so the queue idx value update is not needed).
*/
if (adreno_is_a630(adreno_dev) || adreno_is_a615_family(adreno_dev)) {
queue[HFI_DBG_ID].idx = HFI_DBG_IDX_LEGACY;
}
/* Fill Table Header */
tbl = mem_addr->hostptr;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:195: queue[HFI_DBG_ID].idx = HFI_DBG_IDX_LEGACY;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:196: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:197:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:198: /* Fill Table Header */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:199: tbl = mem_addr->hostptr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:200: tbl->qtbl_hdr.version = 0;
*/
if (adreno_is_a630(adreno_dev) || adreno_is_a615_family(adreno_dev)) {
queue[HFI_MSG_ID].idx = HFI_MSG_IDX_LEGACY;
}
/* Fill Table Header */
tbl = mem_addr->hostptr;
tbl->qtbl_hdr.version = 0;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:201: tbl->qtbl_hdr.size = sizeof(struct hfi_queue_table) >> 2;
/* Fill Table Header */
tbl = mem_addr->hostptr;
tbl->qtbl_hdr.version = 0;
tbl->qtbl_hdr.qhdr0_offset = sizeof(struct hfi_queue_table_header) >> 2;
tbl->qtbl_hdr.qhdr_size = sizeof(struct hfi_queue_header) >> 2;
tbl->qtbl_hdr.num_q = HFI_QUEUE_MAX;
tbl->qtbl_hdr.num_active_q = HFI_QUEUE_MAX;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:202: tbl->qtbl_hdr.qhdr0_offset = sizeof(struct hfi_queue_table_header) >> 2;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:203: tbl->qtbl_hdr.qhdr_size = sizeof(struct hfi_queue_header) >> 2;
tbl = mem_addr->hostptr;
tbl->qtbl_hdr.version = 0;
tbl->qtbl_hdr.size = sizeof(struct hfi_queue_table) >> 2;
tbl->qtbl_hdr.qhdr_size = sizeof(struct hfi_queue_header) >> 2;
tbl->qtbl_hdr.num_q = HFI_QUEUE_MAX;
tbl->qtbl_hdr.num_active_q = HFI_QUEUE_MAX;
memset(&tbl->qhdr[0], 0, sizeof(tbl->qhdr));
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:204: tbl->qtbl_hdr.num_q = HFI_QUEUE_MAX;
tbl->qtbl_hdr.size = sizeof(struct hfi_queue_table) >> 2;
tbl->qtbl_hdr.qhdr0_offset = sizeof(struct hfi_queue_table_header) >> 2;
tbl->qtbl_hdr.qhdr_size = sizeof(struct hfi_queue_header) >> 2;
tbl->qtbl_hdr.num_active_q = HFI_QUEUE_MAX;
memset(&tbl->qhdr[0], 0, sizeof(tbl->qhdr));
/* Fill Individual Queue Headers */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:205: tbl->qtbl_hdr.num_active_q = HFI_QUEUE_MAX;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:206:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:207: memset(&tbl->qhdr[0], 0, sizeof(tbl->qhdr));
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:208:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:209: /* Fill Individual Queue Headers */
tbl->qtbl_hdr.qhdr0_offset = sizeof(struct hfi_queue_table_header) >> 2;
tbl->qtbl_hdr.qhdr_size = sizeof(struct hfi_queue_header) >> 2;
tbl->qtbl_hdr.num_q = HFI_QUEUE_MAX;
memset(&tbl->qhdr[0], 0, sizeof(tbl->qhdr));
/* Fill Individual Queue Headers */
for (i = 0; i < HFI_QUEUE_MAX; i++) {
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:210: for (i = 0; i < HFI_QUEUE_MAX; i++) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:211: hdr = &tbl->qhdr[i];
memset(&tbl->qhdr[0], 0, sizeof(tbl->qhdr));
/* Fill Individual Queue Headers */
hdr = &tbl->qhdr[i];
hdr->start_addr = GMU_QUEUE_START_ADDR(mem_addr->gmuaddr, i);
hdr->type = QUEUE_HDR_TYPE(queue[i].idx, queue[i].pri, 0, 0);
hdr->status = queue[i].status;
hdr->queue_size = HFI_QUEUE_SIZE >> 2; /* convert to dwords */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:212: hdr->start_addr = GMU_QUEUE_START_ADDR(mem_addr->gmuaddr, i);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:213: hdr->type = QUEUE_HDR_TYPE(queue[i].idx, queue[i].pri, 0, 0);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:214: hdr->status = queue[i].status;
/* Fill Individual Queue Headers */
for (i = 0; i < HFI_QUEUE_MAX; i++) {
hdr = &tbl->qhdr[i];
hdr->type = QUEUE_HDR_TYPE(queue[i].idx, queue[i].pri, 0, 0);
hdr->status = queue[i].status;
hdr->queue_size = HFI_QUEUE_SIZE >> 2; /* convert to dwords */
}
}
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:215: hdr->queue_size = HFI_QUEUE_SIZE >> 2; /* convert to dwords */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:216: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:217:}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:218:
hdr->start_addr = GMU_QUEUE_START_ADDR(mem_addr->gmuaddr, i);
hdr->type = QUEUE_HDR_TYPE(queue[i].idx, queue[i].pri, 0, 0);
hdr->status = queue[i].status;
}
}
int a6xx_hfi_init(struct adreno_device *adreno_dev)
{
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:219:int a6xx_hfi_init(struct adreno_device *adreno_dev)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:220:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:221: struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:222: struct a6xx_hfi *hfi = &gmu->hfi;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:223:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:224: /* Allocates & maps memory for HFI */
}
}
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
struct a6xx_hfi *hfi = &gmu->hfi;
/* Allocates & maps memory for HFI */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:294: gmu_core_regwrite(device, A6XX_GMU_GMU2HOST_INTR_CLR,
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:295: HFI_IRQ_MSGQ_MASK);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:296:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:297: rc = a6xx_hfi_process_queue(gmu, HFI_MSG_ID, ret_cmd);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:298:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:299: return rc;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:300:}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:301:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:302:int a6xx_hfi_send_generic_req(struct adreno_device *adreno_dev, void *cmd, u32 size_bytes)
gmu_core_regwrite(device, A6XX_GMU_GMU2HOST_INTR_CLR,
HFI_IRQ_MSGQ_MASK);
return rc;
}
int a6xx_hfi_send_generic_req(struct adreno_device *adreno_dev, void *cmd, u32 size_bytes)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:526: struct kgsl_device *device = KGSL_DEVICE(a6xx_gmu_to_adreno(gmu));
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:527: uint32_t rcvd[MAX_RCVD_SIZE];
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:528:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:529: while (a6xx_hfi_queue_read(gmu, queue_idx, rcvd, sizeof(rcvd)) > 0) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:530: /* Special case if we're v1 */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:531: if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) < 2) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:532: a6xx_hfi_v1_receiver(gmu, rcvd, ret_cmd);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:533: continue;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:534: }
struct kgsl_device *device = KGSL_DEVICE(a6xx_gmu_to_adreno(gmu));
uint32_t rcvd[MAX_RCVD_SIZE];
/* Special case if we're v1 */
if (GMU_VER_MAJOR(device->gmu_core.ver.hfi) < 2) {
a6xx_hfi_v1_receiver(gmu, rcvd, ret_cmd);
continue;
}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:664:{
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:665: struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:666: struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:667: struct hfi_queue_table *tbl = mem_addr->hostptr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:668: struct hfi_queue_header *hdr;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:669: unsigned int i;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:670:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:671: /* Flush HFI queues */
{
struct a6xx_gmu_device *gmu = to_a6xx_gmu(adreno_dev);
struct kgsl_memdesc *mem_addr = gmu->hfi.hfi_mem;
struct hfi_queue_header *hdr;
unsigned int i;
/* Flush HFI queues */
for (i = 0; i < HFI_QUEUE_MAX; i++) {
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:672: for (i = 0; i < HFI_QUEUE_MAX; i++) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:673: hdr = &tbl->qhdr[i];
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:674:
unsigned int i;
/* Flush HFI queues */
hdr = &tbl->qhdr[i];
if (hdr->status == HFI_QUEUE_STATUS_DISABLED)
continue;
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:675: if (hdr->status == HFI_QUEUE_STATUS_DISABLED)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:676: continue;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:677:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:678: hdr->read_index = hdr->write_index;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:679: }
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:680:}
for (i = 0; i < HFI_QUEUE_MAX; i++) {
hdr = &tbl->qhdr[i];
continue;
hdr->read_index = hdr->write_index;
}
}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:772: gmu_core_regread(device, A6XX_GMU_GMU2HOST_INTR_INFO, &status);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:773: gmu_core_regwrite(device, A6XX_GMU_GMU2HOST_INTR_CLR, HFI_IRQ_MASK);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:774:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:775: if (status & HFI_IRQ_DBGQ_MASK)
gmu_core_regread(device, A6XX_GMU_GMU2HOST_INTR_INFO, &status);
gmu_core_regwrite(device, A6XX_GMU_GMU2HOST_INTR_CLR, HFI_IRQ_MASK);
a6xx_hfi_process_queue(gmu, HFI_DBG_ID, NULL);
if (status & HFI_IRQ_CM3_FAULT_MASK) {
dev_err_ratelimited(GMU_PDEV_DEV(device),
"GMU CM3 fault interrupt received\n");
atomic_set(&gmu->cm3_fault, 1);
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:776: a6xx_hfi_process_queue(gmu, HFI_DBG_ID, NULL);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:777: if (status & HFI_IRQ_CM3_FAULT_MASK) {
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:778: dev_err_ratelimited(GMU_PDEV_DEV(device),
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:779: "GMU CM3 fault interrupt received\n");
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:780: atomic_set(&gmu->cm3_fault, 1);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.c:781:
gmu_core_regwrite(device, A6XX_GMU_GMU2HOST_INTR_CLR, HFI_IRQ_MASK);
if (status & HFI_IRQ_DBGQ_MASK)
if (status & HFI_IRQ_CM3_FAULT_MASK) {
dev_err_ratelimited(GMU_PDEV_DEV(device),
"GMU CM3 fault interrupt received\n");
atomic_set(&gmu->cm3_fault, 1);
========== adreno_a6xx_hfi.h ==========
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:49:void a6xx_hfi_stop(struct adreno_device *adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:50:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:51:/**
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:52: * a6xx_hfi_init - Initialize hfi resources
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:53: * @adreno_dev: Pointer to the adreno device
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:54: *
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:55: * This function allocates and sets up hfi queues
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:56: * when a process creates the very first kgsl instance
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:57: *
void a6xx_hfi_stop(struct adreno_device *adreno_dev);
/**
* @adreno_dev: Pointer to the adreno device
*
* This function allocates and sets up hfi queues
* when a process creates the very first kgsl instance
*
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:58: * Return: 0 on success or negative error on failure
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:59: */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:60:int a6xx_hfi_init(struct adreno_device *adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:61:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:62:/* Helper function to get to a6xx hfi struct from adreno device */
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:63:struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:64:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:65:/**
*
* Return: 0 on success or negative error on failure
*/
/* Helper function to get to a6xx hfi struct from adreno device */
struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev);
/**
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:66: * a6xx_hfi_queue_write - Write a command to hfi queue
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:67: * @adreno_dev: Pointer to the adreno device
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:68: * @queue_idx: destination queue id
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:69: * @msg: Data to be written to the queue
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:70: * @size_bytes: Size of the command in bytes
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:71: *
struct a6xx_hfi *to_a6xx_hfi(struct adreno_device *adreno_dev);
/**
* @adreno_dev: Pointer to the adreno device
* @queue_idx: destination queue id
* @msg: Data to be written to the queue
* @size_bytes: Size of the command in bytes
*
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:72: * Return: 0 on success or negative error on failure
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:73: */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:74:int a6xx_hfi_queue_write(struct adreno_device *adreno_dev, u32 queue_idx,
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:75: u32 *msg, u32 size_bytes);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:76:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:77:/**
*
* Return: 0 on success or negative error on failure
*/
u32 *msg, u32 size_bytes);
/**
* a6xx_hfi_queue_read - Read data from hfi queue
* @gmu: Pointer to the a6xx gmu device
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:78: * a6xx_hfi_queue_read - Read data from hfi queue
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:79: * @gmu: Pointer to the a6xx gmu device
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:80: * @queue_idx: queue id to read from
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:81: * @output: Pointer to read the data into
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:82: * @max_size: Number of bytes to read from the queue
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:83: *
u32 *msg, u32 size_bytes);
/**
* @gmu: Pointer to the a6xx gmu device
* @queue_idx: queue id to read from
* @output: Pointer to read the data into
* @max_size: Number of bytes to read from the queue
*
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:84: * Return: 0 on success or negative error on failure
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:85: */
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:86:int a6xx_hfi_queue_read(struct a6xx_gmu_device *gmu, u32 queue_idx,
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:87: u32 *output, u32 max_size);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:88:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:89:/**
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:90: * a6xx_receive_ack_cmd - Process ack type packets
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_hfi.h:91: * @gmu: Pointer to the a6xx gmu device
*
* Return: 0 on success or negative error on failure
*/
u32 *output, u32 max_size);
/**
* a6xx_receive_ack_cmd - Process ack type packets
* @gmu: Pointer to the a6xx gmu device
========== adreno_a6xx_gmu.c ==========
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1757: if (ret)
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1758: return ret;
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1759:
> C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1760: return a6xx_hfi_init(adreno_dev);
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1761:}
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1762:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1763:#define A6XX_VBIF_XIN_HALT_CTRL1_ACKS (BIT(0) | BIT(1) | BIT(2) | BIT(3))
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1764:
C:\Users\qwertyhorik\Desktop\Ios\GPU_TRANSFER_2026-11-26\external\qualcomm-kgsl\adreno_a6xx_gmu.c:1765:static void a6xx_gmu_pwrctrl_suspend(struct adreno_device *adreno_dev)
if (ret)
return ret;
}
#define A6XX_VBIF_XIN_HALT_CTRL1_ACKS (BIT(0) | BIT(1) | BIT(2) | BIT(3))
static void a6xx_gmu_pwrctrl_suspend(struct adreno_device *adreno_dev)
========== adreno_a6xx_gmu.h ==========