drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c- Extension
.c- Size
- 10173 bytes
- Lines
- 370
- 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.hdcn35/dcn35_dccg.hdcn42_dccg.hdcn20/dcn20_dccg.h
Detected Declarations
function dccg42_otg_add_pixelfunction dccg42_otg_drop_pixelfunction dccg42_enable_global_fgcgfunction dccg42_set_physymclkfunction dccg42_disable_hdmistreamclkfunction dccg42_disable_hdmicharclkfunction dccg42_set_pixel_rate_divfunction dccg42_trigger_dio_fifo_resyncfunction dccg42_init
Annotated Snippet
if (force_enable) {
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYASYMCLK_ROOT_GATE_DISABLE, 1);
REG_UPDATE_2(PHYASYMCLK_CLOCK_CNTL,
PHYASYMCLK_EN, 1,
PHYASYMCLK_SRC_SEL, clk_src);
} else {
REG_UPDATE_2(PHYASYMCLK_CLOCK_CNTL,
PHYASYMCLK_EN, 0,
PHYASYMCLK_SRC_SEL, 0);
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYASYMCLK_ROOT_GATE_DISABLE,
dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk ? 0 : 1);
}
break;
case 1:
if (force_enable) {
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYBSYMCLK_ROOT_GATE_DISABLE, 1);
REG_UPDATE_2(PHYBSYMCLK_CLOCK_CNTL,
PHYBSYMCLK_EN, 1,
PHYBSYMCLK_SRC_SEL, clk_src);
} else {
REG_UPDATE_2(PHYBSYMCLK_CLOCK_CNTL,
PHYBSYMCLK_EN, 0,
PHYBSYMCLK_SRC_SEL, 0);
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYBSYMCLK_ROOT_GATE_DISABLE,
dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk ? 0 : 1);
}
break;
case 2:
if (force_enable) {
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYCSYMCLK_ROOT_GATE_DISABLE, 1);
REG_UPDATE_2(PHYCSYMCLK_CLOCK_CNTL,
PHYCSYMCLK_EN, 1,
PHYCSYMCLK_SRC_SEL, clk_src);
} else {
REG_UPDATE_2(PHYCSYMCLK_CLOCK_CNTL,
PHYCSYMCLK_EN, 0,
PHYCSYMCLK_SRC_SEL, 0);
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYCSYMCLK_ROOT_GATE_DISABLE,
dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk ? 0 : 1);
}
break;
case 3:
if (force_enable) {
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYDSYMCLK_ROOT_GATE_DISABLE, 1);
REG_UPDATE_2(PHYDSYMCLK_CLOCK_CNTL,
PHYDSYMCLK_EN, 1,
PHYDSYMCLK_SRC_SEL, clk_src);
} else {
REG_UPDATE_2(PHYDSYMCLK_CLOCK_CNTL,
PHYDSYMCLK_EN, 0,
PHYDSYMCLK_SRC_SEL, 0);
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYDSYMCLK_ROOT_GATE_DISABLE,
dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk ? 0 : 1);
}
break;
case 4:
if (force_enable) {
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYESYMCLK_ROOT_GATE_DISABLE, 1);
REG_UPDATE_2(PHYESYMCLK_CLOCK_CNTL,
PHYESYMCLK_EN, 1,
PHYESYMCLK_SRC_SEL, clk_src);
} else {
REG_UPDATE_2(PHYESYMCLK_CLOCK_CNTL,
PHYESYMCLK_EN, 0,
PHYESYMCLK_SRC_SEL, 0);
REG_UPDATE(DCCG_GATE_DISABLE_CNTL2,
PHYESYMCLK_ROOT_GATE_DISABLE,
dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk ? 0 : 1);
}
break;
default:
BREAK_TO_DEBUGGER();
return;
}
}
static void dccg42_disable_hdmistreamclk(struct dccg *dccg)
{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
REG_UPDATE_2(HDMISTREAMCLK_CNTL,
Annotation
- Immediate include surface: `reg_helper.h`, `core_types.h`, `dcn35/dcn35_dccg.h`, `dcn42_dccg.h`, `dcn20/dcn20_dccg.h`.
- Detected declarations: `function dccg42_otg_add_pixel`, `function dccg42_otg_drop_pixel`, `function dccg42_enable_global_fgcg`, `function dccg42_set_physymclk`, `function dccg42_disable_hdmistreamclk`, `function dccg42_disable_hdmicharclk`, `function dccg42_set_pixel_rate_div`, `function dccg42_trigger_dio_fifo_resync`, `function dccg42_init`.
- 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.