drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c- Extension
.c- Size
- 79627 bytes
- Lines
- 2809
- 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.hresource.hdcn35_dccg.hdcn20/dcn20_dccg.hlogger_types.h
Detected Declarations
enum symclk_fe_sourceenum symclk_be_sourceenum physymclk_sourceenum dtbclk_sourceenum dppclk_clock_sourceenum dp_stream_clk_sourceenum hdmi_char_clkenum hdmi_stream_clk_sourceenum symclk32_se_clk_sourceenum symclk32_le_clk_sourceenum dsc_clk_sourcefunction dccg35_set_dsc_clk_rcgfunction dccg35_set_symclk32_se_rcgfunction dccg35_set_symclk32_le_rcgfunction dccg35_set_physymclk_rcgfunction dccg35_set_symclk_fe_rcgfunction dccg35_set_symclk_be_rcgfunction dccg35_set_dtbclk_p_rcgfunction dccg35_set_dppclk_rcgfunction dccg35_set_dpstreamclk_rcgfunction dccg35_set_smclk32_se_rcgfunction dccg35_set_hdmistreamclk_rcgfunction dccg35_set_hdmi_char_clk_rcgfunction dccg35_set_hdmi_char_clk_src_newfunction dccg35_set_hdmistreamclk_src_newfunction dccg35_set_dsc_clk_src_newfunction dccg35_set_symclk32_se_src_newfunction dccg35_is_symclk32_se_src_functional_le_newfunction dccg35_set_symclk32_le_src_newfunction dcn35_set_dppclk_src_newfunction dccg35_set_dtbclk_p_src_newfunction dccg35_set_dpstreamclk_src_newfunction dccg35_set_physymclk_src_newfunction dccg35_set_symclk_be_src_newfunction dccg35_is_symclk_fe_src_functional_befunction dccg35_set_symclk_fe_src_newfunction dccg35_is_fe_rcgfunction dccg35_is_symclk32_se_rcgfunction dccg35_enable_symclk_fe_newfunction dccg35_disable_symclk_fe_newfunction dccg35_enable_symclk_be_newfunction dccg35_disable_symclk_be_newfunction dccg35_enable_symclk32_se_newfunction dccg35_disable_symclk32_se_newfunction dccg35_enable_symclk32_le_newfunction dccg35_disable_symclk32_le_newfunction dccg35_enable_physymclk_newfunction dccg35_disable_physymclk_new
Annotated Snippet
if (dccg35_is_fe_rcg(dccg, i) == 0) {
if (dccg35_is_symclk_fe_src_functional_be(dccg, i, inst))
dccg35_disable_symclk_fe_new(dccg, i);
}
}
/* Safe to RCG SYMCLK*/
dccg35_set_symclk_be_rcg(dccg, inst, true);
}
static void dccg35_enable_symclk32_se_new(
struct dccg *dccg,
int inst,
enum symclk32_se_clk_source src)
{
dccg35_set_symclk32_se_rcg(dccg, inst, false);
dccg35_set_symclk32_se_src_new(dccg, inst, src);
}
static void dccg35_disable_symclk32_se_new(
struct dccg *dccg,
int inst)
{
dccg35_set_symclk32_se_src_new(dccg, SYMCLK32_SE_REFCLK, inst);
dccg35_set_symclk32_se_rcg(dccg, inst, true);
}
static void dccg35_enable_symclk32_le_new(
struct dccg *dccg,
int inst,
enum symclk32_le_clk_source src)
{
dccg35_set_symclk32_le_rcg(dccg, inst, false);
dccg35_set_symclk32_le_src_new(dccg, inst, src);
}
static void dccg35_disable_symclk32_le_new(
struct dccg *dccg,
int inst)
{
int i;
/* Switch from functional clock to refclock */
dccg35_set_symclk32_le_src_new(dccg, inst, SYMCLK32_LE_REFCLK);
/* Check if any SE are connected and disable SE as well */
for (i = 0; i < 4; i++) {
/* Make sure FE is not already in RCG */
if (dccg35_is_symclk32_se_rcg(dccg, i) == 0) {
/* Disable and SE connected to this LE before RCG */
if (dccg35_is_symclk32_se_src_functional_le_new(dccg, i, inst))
dccg35_disable_symclk32_se_new(dccg, i);
}
}
/* Safe to RCG SYM32_LE*/
dccg35_set_symclk32_le_rcg(dccg, inst, true);
}
static void dccg35_enable_physymclk_new(struct dccg *dccg,
int inst,
enum physymclk_source src)
{
dccg35_set_physymclk_rcg(dccg, inst, false);
dccg35_set_physymclk_src_new(dccg, src, inst);
}
static void dccg35_disable_physymclk_new(struct dccg *dccg,
int inst)
{
dccg35_set_physymclk_src_new(dccg, PHYSYMCLK_REFCLK, inst);
dccg35_set_physymclk_rcg(dccg, inst, true);
}
static void dccg35_enable_dpp_clk_new(
struct dccg *dccg,
int inst,
enum dppclk_clock_source src)
{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
/* Sanitize inst before use in array de-ref */
if (inst < 0) {
BREAK_TO_DEBUGGER();
return;
}
dccg35_set_dppclk_rcg(dccg, inst, false);
dcn35_set_dppclk_src_new(dccg, inst, src);
/* Switch DPP clock to DTO */
REG_SET_2(DPPCLK_DTO_PARAM[inst], 0,
DPPCLK0_DTO_PHASE, 0xFF,
DPPCLK0_DTO_MODULO, 0xFF);
}
Annotation
- Immediate include surface: `reg_helper.h`, `core_types.h`, `resource.h`, `dcn35_dccg.h`, `dcn20/dcn20_dccg.h`, `logger_types.h`.
- Detected declarations: `enum symclk_fe_source`, `enum symclk_be_source`, `enum physymclk_source`, `enum dtbclk_source`, `enum dppclk_clock_source`, `enum dp_stream_clk_source`, `enum hdmi_char_clk`, `enum hdmi_stream_clk_source`, `enum symclk32_se_clk_source`, `enum symclk32_le_clk_source`.
- 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.