drivers/gpu/drm/msm/adreno/adreno_gpu.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/adreno/adreno_gpu.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/adreno/adreno_gpu.h- Extension
.h- Size
- 19977 bytes
- Lines
- 765
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/firmware.hlinux/iopoll.hlinux/soc/qcom/ubwc.hmsm_gpu.hadreno_common.xml.hadreno_pm4.xml.h
Detected Declarations
struct adreno_gpustruct adreno_gpu_funcsstruct adreno_regliststruct adreno_reglist_pipestruct adreno_speedbinstruct a6xx_infostruct adreno_infostruct adreno_gpuliststruct adreno_protectstruct adreno_reglist_liststruct adreno_reglist_pipe_liststruct adreno_gpustruct adreno_ocmemstruct adreno_platform_configenum adreno_familyfunction adreno_patchidfunction adreno_is_revnfunction adreno_has_gmu_wrapperfunction adreno_is_a2xxfunction adreno_is_a20xfunction adreno_is_a225function adreno_is_a305function adreno_is_a305bfunction adreno_is_a306function adreno_is_a306afunction adreno_is_a320function adreno_is_a330function adreno_is_a330v2function adreno_is_a405function adreno_is_a420function adreno_is_a430function adreno_is_a505function adreno_is_a506function adreno_is_a508function adreno_is_a509function adreno_is_a510function adreno_is_a512function adreno_is_a530function adreno_is_a540function adreno_is_a610function adreno_is_a612function adreno_has_rgmufunction adreno_is_a618function adreno_is_a619function adreno_is_a619_holifunction adreno_is_a621function adreno_is_a623function adreno_is_a630
Annotated Snippet
struct adreno_gpu_funcs {
struct msm_gpu_funcs base;
struct msm_gpu *(*init)(struct drm_device *dev);
u64 (*get_timestamp)(struct msm_gpu *gpu);
void (*bus_halt)(struct adreno_gpu *adreno_gpu, bool gx_off);
int (*mmu_fault_handler)(void *arg, unsigned long iova, int flags, void *data);
bool (*gx_is_on)(struct adreno_gpu *adreno_gpu);
bool (*aqe_is_enabled)(struct adreno_gpu *adreno_gpu);
};
struct adreno_reglist {
u32 offset;
u32 value;
};
/* Reglist with pipe information */
struct adreno_reglist_pipe {
u32 offset;
u32 value;
u32 pipe;
};
struct adreno_speedbin {
uint16_t fuse;
uint16_t speedbin;
};
struct a6xx_info;
struct adreno_info {
const char *machine;
/**
* @chipids: Table of matching chip-ids
*
* Terminated with 0 sentinal
*/
uint32_t *chip_ids;
enum adreno_family family;
uint32_t revn;
const char *fw[ADRENO_FW_MAX];
uint32_t gmem;
u64 quirks;
const struct adreno_gpu_funcs *funcs;
const char *zapfw;
u32 inactive_period;
union {
const struct a6xx_info *a6xx;
};
/**
* @speedbins: Optional table of fuse to speedbin mappings
*
* Consists of pairs of fuse, index mappings, terminated with
* {SHRT_MAX, 0} sentinal.
*/
struct adreno_speedbin *speedbins;
u64 preempt_record_size;
};
#define ADRENO_CHIP_IDS(tbl...) (uint32_t[]) { tbl, 0 }
struct adreno_gpulist {
const struct adreno_info *gpus;
unsigned gpus_count;
};
#define DECLARE_ADRENO_GPULIST(name) \
const struct adreno_gpulist name ## _gpulist = { \
name ## _gpus, ARRAY_SIZE(name ## _gpus) \
}
/*
* Helper to build a speedbin table, ie. the table:
* fuse | speedbin
* -----+---------
* 0 | 0
* 169 | 1
* 174 | 2
*
* would be declared as:
*
* .speedbins = ADRENO_SPEEDBINS(
* { 0, 0 },
* { 169, 1 },
* { 174, 2 },
* ),
*/
#define ADRENO_SPEEDBINS(tbl...) (struct adreno_speedbin[]) { tbl {SHRT_MAX, 0} }
struct adreno_protect {
const uint32_t *regs;
Annotation
- Immediate include surface: `linux/firmware.h`, `linux/iopoll.h`, `linux/soc/qcom/ubwc.h`, `msm_gpu.h`, `adreno_common.xml.h`, `adreno_pm4.xml.h`.
- Detected declarations: `struct adreno_gpu`, `struct adreno_gpu_funcs`, `struct adreno_reglist`, `struct adreno_reglist_pipe`, `struct adreno_speedbin`, `struct a6xx_info`, `struct adreno_info`, `struct adreno_gpulist`, `struct adreno_protect`, `struct adreno_reglist_list`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.