drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_dio.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_dio.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_dio.c- Extension
.c- Size
- 1052 bytes
- Lines
- 48
- 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
dc_hw_types.hdm_services.hreg_helper.hdcn10_dio.h
Detected Declarations
function dcn10_dio_mem_pwr_ctrlfunction dcn10_dio_construct
Annotated Snippet
// SPDX-License-Identifier: MIT
//
// Copyright 2025 Advanced Micro Devices, Inc.
#include "dc_hw_types.h"
#include "dm_services.h"
#include "reg_helper.h"
#include "dcn10_dio.h"
#define CTX \
dio10->base.ctx
#define REG(reg)\
dio10->regs->reg
#undef FN
#define FN(reg_name, field_name) \
dio10->shifts->field_name, dio10->masks->field_name
static void dcn10_dio_mem_pwr_ctrl(struct dio *dio, bool enable_i2c_light_sleep)
{
struct dcn10_dio *dio10 = TO_DCN10_DIO(dio);
/* power AFMT HDMI memory */
REG_WRITE(DIO_MEM_PWR_CTRL, 0);
if (enable_i2c_light_sleep)
REG_UPDATE(DIO_MEM_PWR_CTRL, I2C_LIGHT_SLEEP_FORCE, 1);
}
static const struct dio_funcs dcn10_dio_funcs = {
.mem_pwr_ctrl = dcn10_dio_mem_pwr_ctrl,
};
void dcn10_dio_construct(
struct dcn10_dio *dio10,
struct dc_context *ctx,
const struct dcn_dio_registers *regs,
const struct dcn_dio_shift *shifts,
const struct dcn_dio_mask *masks)
{
dio10->base.ctx = ctx;
dio10->base.funcs = &dcn10_dio_funcs;
dio10->regs = regs;
dio10->shifts = shifts;
dio10->masks = masks;
}
Annotation
- Immediate include surface: `dc_hw_types.h`, `dm_services.h`, `reg_helper.h`, `dcn10_dio.h`.
- Detected declarations: `function dcn10_dio_mem_pwr_ctrl`, `function dcn10_dio_construct`.
- 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.