drivers/gpu/drm/amd/amdgpu/atom.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/atom.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/atom.h- Extension
.h- Size
- 5129 bytes
- Lines
- 176
- 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/types.hatom-types.hatombios.hObjectID.h
Detected Declarations
struct drm_devicestruct card_infostruct atom_context
Annotated Snippet
struct card_info {
struct drm_device *dev;
void (*reg_write)(struct card_info *info,
u32 reg, uint32_t val); /* filled by driver */
uint32_t (*reg_read)(struct card_info *info, uint32_t reg); /* filled by driver */
void (*mc_write)(struct card_info *info,
u32 reg, uint32_t val); /* filled by driver */
uint32_t (*mc_read)(struct card_info *info, uint32_t reg); /* filled by driver */
void (*pll_write)(struct card_info *info,
u32 reg, uint32_t val); /* filled by driver */
uint32_t (*pll_read)(struct card_info *info, uint32_t reg); /* filled by driver */
};
struct atom_context {
struct card_info *card;
struct mutex mutex;
void *bios;
uint32_t cmd_table, data_table;
uint16_t *iio;
uint16_t data_block;
uint32_t fb_base;
uint32_t divmul[2];
uint16_t io_attr;
uint16_t reg_block;
uint8_t shift;
int cs_equal, cs_above;
int io_mode;
uint32_t *scratch;
int scratch_size_bytes;
uint8_t name[STRLEN_LONG];
uint8_t vbios_pn[STRLEN_LONG];
uint32_t version;
uint8_t vbios_ver_str[STRLEN_NORMAL];
uint8_t date[STRLEN_NORMAL];
uint8_t build_num[STRLEN_NORMAL];
/* Nesting depth for ATOM_OP_CALLTABLE */
unsigned int execute_depth;
};
extern int amdgpu_atom_debug;
struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios);
int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size);
int amdgpu_atom_asic_init(struct atom_context *ctx);
void amdgpu_atom_destroy(struct atom_context *ctx);
bool amdgpu_atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
uint8_t *frev, uint8_t *crev, uint16_t *data_start);
bool amdgpu_atom_parse_cmd_header(struct atom_context *ctx, int index,
uint8_t *frev, uint8_t *crev);
#include "atom-types.h"
#include "atombios.h"
#include "ObjectID.h"
#endif
Annotation
- Immediate include surface: `linux/types.h`, `atom-types.h`, `atombios.h`, `ObjectID.h`.
- Detected declarations: `struct drm_device`, `struct card_info`, `struct atom_context`.
- 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.