drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c- Extension
.c- Size
- 4162 bytes
- Lines
- 148
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
reg_helper.hcore_types.hdcn30_dccg.h
Detected Declarations
function filesfunction dccg3_disable_hdmicharclk
Annotated Snippet
#include "reg_helper.h"
#include "core_types.h"
#include "dcn30_dccg.h"
#define TO_DCN_DCCG(dccg)\
container_of(dccg, struct dcn_dccg, base)
#define REG(reg) \
(dccg_dcn->regs->reg)
#undef FN
#define FN(reg_name, field_name) \
dccg_dcn->dccg_shift->field_name, dccg_dcn->dccg_mask->field_name
#define CTX \
dccg_dcn->base.ctx
#define DC_LOGGER \
dccg->ctx->logger
void dccg3_enable_hdmicharclk(struct dccg *dccg, int hpo_inst, int phypll_inst)
{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
ASSERT(hpo_inst >= 0 && phypll_inst >= 0);
REG_UPDATE_2(HDMICHARCLK_CLOCK_CNTL[hpo_inst],
HDMICHARCLK0_EN, 1,
HDMICHARCLK0_SRC_SEL, phypll_inst);
/* Enable FORCE_EN for SYMCLK */
switch (phypll_inst) {
case 0:
REG_UPDATE_2(PHYASYMCLK_CLOCK_CNTL,
PHYASYMCLK_FORCE_EN, 1,
PHYASYMCLK_FORCE_SRC_SEL, 1);
break;
case 1:
REG_UPDATE_2(PHYBSYMCLK_CLOCK_CNTL,
PHYBSYMCLK_FORCE_EN, 1,
PHYBSYMCLK_FORCE_SRC_SEL, 1);
break;
case 2:
REG_UPDATE_2(PHYCSYMCLK_CLOCK_CNTL,
PHYCSYMCLK_FORCE_EN, 1,
PHYCSYMCLK_FORCE_SRC_SEL, 1);
break;
default:
BREAK_TO_DEBUGGER();
return;
}
}
void dccg3_disable_hdmicharclk(struct dccg *dccg, int hpo_inst)
{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
REG_WRITE(HDMICHARCLK_CLOCK_CNTL[hpo_inst], 0);
}
static const struct dccg_funcs dccg3_funcs = {
.enable_hdmicharclk = dccg3_enable_hdmicharclk,
.disable_hdmicharclk = dccg3_disable_hdmicharclk,
.update_dpp_dto = dccg2_update_dpp_dto,
.get_dccg_ref_freq = dccg2_get_dccg_ref_freq,
.set_fifo_errdet_ovr_en = dccg2_set_fifo_errdet_ovr_en,
.otg_add_pixel = dccg2_otg_add_pixel,
.otg_drop_pixel = dccg2_otg_drop_pixel,
.dccg_init = dccg2_init,
.refclk_setup = dccg2_refclk_setup, /* Deprecated - for backward compatibility only */
.allow_clock_gating = dccg2_allow_clock_gating,
.enable_memory_low_power = dccg2_enable_memory_low_power,
.is_s0i3_golden_init_wa_done = dccg2_is_s0i3_golden_init_wa_done /* Deprecated - for backward compatibility only */
};
struct dccg *dccg3_create(
struct dc_context *ctx,
const struct dccg_registers *regs,
const struct dccg_shift *dccg_shift,
const struct dccg_mask *dccg_mask)
{
struct dcn_dccg *dccg_dcn = kzalloc_obj(*dccg_dcn);
struct dccg *base;
if (dccg_dcn == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
base = &dccg_dcn->base;
base->ctx = ctx;
base->funcs = &dccg3_funcs;
Annotation
- Immediate include surface: `reg_helper.h`, `core_types.h`, `dcn30_dccg.h`.
- Detected declarations: `function files`, `function dccg3_disable_hdmicharclk`.
- 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.