drivers/gpu/drm/vc4/vc4_qpu_defines.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vc4/vc4_qpu_defines.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/vc4/vc4_qpu_defines.h
Extension
.h
Size
7086 bytes
Lines
280
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef VC4_QPU_DEFINES_H
#define VC4_QPU_DEFINES_H

enum qpu_op_add {
	QPU_A_NOP,
	QPU_A_FADD,
	QPU_A_FSUB,
	QPU_A_FMIN,
	QPU_A_FMAX,
	QPU_A_FMINABS,
	QPU_A_FMAXABS,
	QPU_A_FTOI,
	QPU_A_ITOF,
	QPU_A_ADD = 12,
	QPU_A_SUB,
	QPU_A_SHR,
	QPU_A_ASR,
	QPU_A_ROR,
	QPU_A_SHL,
	QPU_A_MIN,
	QPU_A_MAX,
	QPU_A_AND,
	QPU_A_OR,
	QPU_A_XOR,
	QPU_A_NOT,
	QPU_A_CLZ,
	QPU_A_V8ADDS = 30,
	QPU_A_V8SUBS = 31,
};

enum qpu_op_mul {
	QPU_M_NOP,
	QPU_M_FMUL,
	QPU_M_MUL24,
	QPU_M_V8MULD,
	QPU_M_V8MIN,
	QPU_M_V8MAX,
	QPU_M_V8ADDS,
	QPU_M_V8SUBS,
};

enum qpu_raddr {
	QPU_R_FRAG_PAYLOAD_ZW = 15, /* W for A file, Z for B file */
	/* 0-31 are the plain regfile a or b fields */
	QPU_R_UNIF = 32,
	QPU_R_VARY = 35,
	QPU_R_ELEM_QPU = 38,
	QPU_R_NOP,
	QPU_R_XY_PIXEL_COORD = 41,
	QPU_R_MS_REV_FLAGS = 42,
	QPU_R_VPM = 48,
	QPU_R_VPM_LD_BUSY,
	QPU_R_VPM_LD_WAIT,
	QPU_R_MUTEX_ACQUIRE,
};

enum qpu_waddr {
	/* 0-31 are the plain regfile a or b fields */
	QPU_W_ACC0 = 32, /* aka r0 */
	QPU_W_ACC1,
	QPU_W_ACC2,
	QPU_W_ACC3,
	QPU_W_TMU_NOSWAP,
	QPU_W_ACC5,
	QPU_W_HOST_INT,
	QPU_W_NOP,
	QPU_W_UNIFORMS_ADDRESS,
	QPU_W_QUAD_XY, /* X for regfile a, Y for regfile b */
	QPU_W_MS_FLAGS = 42,
	QPU_W_REV_FLAG = 42,
	QPU_W_TLB_STENCIL_SETUP = 43,
	QPU_W_TLB_Z,
	QPU_W_TLB_COLOR_MS,
	QPU_W_TLB_COLOR_ALL,
	QPU_W_TLB_ALPHA_MASK,
	QPU_W_VPM,
	QPU_W_VPMVCD_SETUP, /* LD for regfile a, ST for regfile b */
	QPU_W_VPM_ADDR, /* LD for regfile a, ST for regfile b */
	QPU_W_MUTEX_RELEASE,
	QPU_W_SFU_RECIP,
	QPU_W_SFU_RECIPSQRT,
	QPU_W_SFU_EXP,
	QPU_W_SFU_LOG,
	QPU_W_TMU0_S,
	QPU_W_TMU0_T,
	QPU_W_TMU0_R,
	QPU_W_TMU0_B,
	QPU_W_TMU1_S,
	QPU_W_TMU1_T,
	QPU_W_TMU1_R,

Annotation

Implementation Notes