drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
Extension
.h
Size
33290 bytes
Lines
1049
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

struct amdgpu_ras_err_status_reg_entry {
	uint32_t hwip;
	uint32_t ip_inst;
	uint32_t seg_lo;
	uint32_t reg_lo;
	uint32_t seg_hi;
	uint32_t reg_hi;
	uint32_t reg_inst;
	uint32_t flags;
	const char *block_name;
};

struct amdgpu_ras_memory_id_entry {
	uint32_t memory_id;
	const char *name;
};

struct ras_common_if {
	enum amdgpu_ras_block block;
	enum amdgpu_ras_error_type type;
	uint32_t sub_block_index;
	char name[32];
};

#define MAX_UMC_CHANNEL_NUM 32

struct ecc_info_per_ch {
	uint16_t ce_count_lo_chip;
	uint16_t ce_count_hi_chip;
	uint64_t mca_umc_status;
	uint64_t mca_umc_addr;
	uint64_t mca_ceumc_addr;
};

struct umc_ecc_info {
	struct ecc_info_per_ch ecc[MAX_UMC_CHANNEL_NUM];

	/* Determine smu ecctable whether support
	 * record correctable error address
	 */
	int record_ce_addr_supported;
};

enum ras_event_type {
	RAS_EVENT_TYPE_INVALID = 0,
	RAS_EVENT_TYPE_FATAL,
	RAS_EVENT_TYPE_POISON_CREATION,
	RAS_EVENT_TYPE_POISON_CONSUMPTION,
	RAS_EVENT_TYPE_COUNT,
};

struct ras_event_state {
	u64 last_seqno;
	atomic64_t count;
};

struct ras_event_manager {
	atomic64_t seqno;
	struct ras_event_state event_state[RAS_EVENT_TYPE_COUNT];
};

struct ras_event_id {
	enum ras_event_type type;
	u64 event_id;
};

struct ras_query_context {
	struct ras_event_id evid;
};

typedef int (*pasid_notify)(struct amdgpu_device *adev,
		uint16_t pasid, void *data);

struct ras_poison_msg {
	enum amdgpu_ras_block block;
	uint16_t pasid;
	uint32_t reset;
	pasid_notify pasid_fn;
	void *data;
};

struct ras_err_pages {
	uint32_t count;
	uint64_t *pfn;
};

struct ras_ecc_err {
	uint64_t status;
	uint64_t ipid;
	uint64_t addr;

Annotation

Implementation Notes