drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c- Extension
.c- Size
- 147645 bytes
- Lines
- 3601
- 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
dcn32_fpu.hdcn32/dcn32_resource.hdcn20/dcn20_resource.hdisplay_mode_vba_util_32.hdml/dcn32/display_mode_vba_32.hclk_mgr/dcn32/dcn32_smu13_driver_if.hdcn30/dcn30_resource.hlink_service.hdc_state_priv.h
Detected Declarations
struct pipe_slice_tablefunction dcn32_build_wm_range_table_fpufunction dcn32_find_dummy_latency_index_for_fw_based_mclk_switchfunction DMLfunction calculate_net_bw_in_kbytes_secfunction get_optimal_ntuplefunction insert_entry_into_table_sortedfunction DMLfunction dcn32_get_num_free_pipesfunction firstfunction pipesfunction subvp_subvp_schedulablefunction subvp_drr_schedulablefunction subvp_vblank_schedulablefunction subvp_subvp_admissablefunction subvp_validate_static_schedulabilityfunction assign_subvp_indexfunction update_slice_table_for_streamfunction update_slice_table_for_planefunction init_pipe_slice_table_from_contextfunction update_pipe_slice_table_with_split_flagsfunction update_pipes_with_slice_tablefunction update_pipes_with_split_flagsfunction should_apply_odm_power_optimizationfunction try_odm_power_optimization_and_revalidatefunction is_test_pattern_enabledfunction dcn32_full_validate_bw_helperfunction is_dtbclk_requiredfunction dcn32_calculate_dlg_paramsfunction dcn32_split_stream_for_mpc_or_odmfunction dcn32_apply_merge_split_flags_helperfunction dcn32_internal_validate_bwfunction dcn32_calculate_wm_and_dlg_fpufunction dcn32_get_optimal_dcfclk_fclk_for_uclkfunction remove_entry_from_table_at_indexfunction dcn32_patch_dpm_tablefunction swap_table_entriesfunction sort_entries_with_same_bwfunction remove_inconsistent_entriesfunction override_max_clk_valuesfunction build_synthetic_soc_statesfunction clocksfunction dcn32_zero_pipe_dcc_fractionfunction dcn32_allow_subvp_with_active_marginfunction dcn32_allow_subvp_high_refresh_ratefunction dcn32_determine_max_vratio_prefetchfunction dcn32_assign_fpo_vactive_candidatefunction dcn32_find_vactive_pipe
Annotated Snippet
struct pipe_slice_table {
struct {
struct dc_stream_state *stream;
int slice_count;
} odm_combines[MAX_STREAMS];
int odm_combine_count;
struct {
struct pipe_ctx *pri_pipe;
struct dc_plane_state *plane;
int slice_count;
} mpc_combines[MAX_PLANES];
int mpc_combine_count;
};
static void update_slice_table_for_stream(struct pipe_slice_table *table,
struct dc_stream_state *stream, int diff)
{
int i;
for (i = 0; i < table->odm_combine_count; i++) {
if (table->odm_combines[i].stream == stream) {
table->odm_combines[i].slice_count += diff;
break;
}
}
if (i == table->odm_combine_count) {
table->odm_combine_count++;
table->odm_combines[i].stream = stream;
table->odm_combines[i].slice_count = diff;
}
}
static void update_slice_table_for_plane(struct pipe_slice_table *table,
struct pipe_ctx *dpp_pipe, struct dc_plane_state *plane, int diff)
{
int i;
struct pipe_ctx *pri_dpp_pipe = resource_get_primary_dpp_pipe(dpp_pipe);
for (i = 0; i < table->mpc_combine_count; i++) {
if (table->mpc_combines[i].plane == plane &&
table->mpc_combines[i].pri_pipe == pri_dpp_pipe) {
table->mpc_combines[i].slice_count += diff;
break;
}
}
if (i == table->mpc_combine_count) {
table->mpc_combine_count++;
table->mpc_combines[i].plane = plane;
table->mpc_combines[i].pri_pipe = pri_dpp_pipe;
table->mpc_combines[i].slice_count = diff;
}
}
static void init_pipe_slice_table_from_context(
struct pipe_slice_table *table,
struct dc_state *context)
{
int i, j;
struct pipe_ctx *otg_master;
struct pipe_ctx *dpp_pipes[MAX_PIPES];
struct dc_stream_state *stream;
int count;
memset(table, 0, sizeof(*table));
for (i = 0; i < context->stream_count; i++) {
stream = context->streams[i];
otg_master = resource_get_otg_master_for_stream(
&context->res_ctx, stream);
if (!otg_master)
continue;
count = resource_get_odm_slice_count(otg_master);
update_slice_table_for_stream(table, stream, count);
count = resource_get_dpp_pipes_for_opp_head(otg_master,
&context->res_ctx, dpp_pipes);
for (j = 0; j < count; j++)
if (dpp_pipes[j]->plane_state)
update_slice_table_for_plane(table, dpp_pipes[j],
dpp_pipes[j]->plane_state, 1);
}
}
static bool update_pipe_slice_table_with_split_flags(
struct pipe_slice_table *table,
Annotation
- Immediate include surface: `dcn32_fpu.h`, `dcn32/dcn32_resource.h`, `dcn20/dcn20_resource.h`, `display_mode_vba_util_32.h`, `dml/dcn32/display_mode_vba_32.h`, `clk_mgr/dcn32/dcn32_smu13_driver_if.h`, `dcn30/dcn30_resource.h`, `link_service.h`.
- Detected declarations: `struct pipe_slice_table`, `function dcn32_build_wm_range_table_fpu`, `function dcn32_find_dummy_latency_index_for_fw_based_mclk_switch`, `function DML`, `function calculate_net_bw_in_kbytes_sec`, `function get_optimal_ntuple`, `function insert_entry_into_table_sorted`, `function DML`, `function dcn32_get_num_free_pipes`, `function first`.
- 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.