drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_mmhub.c
Extension
.c
Size
1796 bytes
Lines
47
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

#include "amdgpu.h"
#include "amdgpu_ras.h"

int amdgpu_mmhub_ras_sw_init(struct amdgpu_device *adev)
{
	int err;
	struct amdgpu_mmhub_ras *ras;

	if (!adev->mmhub.ras)
		return 0;

	ras = adev->mmhub.ras;
	err = amdgpu_ras_register_ras_block(adev, &ras->ras_block);
	if (err) {
		dev_err(adev->dev, "Failed to register mmhub ras block!\n");
		return err;
	}

	strcpy(ras->ras_block.ras_comm.name, "mmhub");
	ras->ras_block.ras_comm.block = AMDGPU_RAS_BLOCK__MMHUB;
	ras->ras_block.ras_comm.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
	adev->mmhub.ras_if = &ras->ras_block.ras_comm;

	/* mmhub ras follows amdgpu_ras_block_late_init_default for late init */
	return 0;
}

Annotation

Implementation Notes