drivers/gpu/drm/amd/acp/acp_hw.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/acp/acp_hw.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/acp/acp_hw.c
Extension
.c
Size
1724 bytes
Lines
51
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 <linux/mm.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/errno.h>

#include "acp_gfx_if.h"

#define ACP_MODE_I2S	0
#define ACP_MODE_AZ	1

#define mmACP_AZALIA_I2S_SELECT 0x51d4

int amd_acp_hw_init(struct cgs_device *cgs_device,
		    unsigned acp_version_major, unsigned acp_version_minor)
{
	unsigned int acp_mode = ACP_MODE_I2S;

	if ((acp_version_major == 2) && (acp_version_minor == 2))
		acp_mode = cgs_read_register(cgs_device,
					mmACP_AZALIA_I2S_SELECT);

	if (acp_mode != ACP_MODE_I2S)
		return -ENODEV;

	return 0;
}

Annotation

Implementation Notes