drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c- Extension
.c- Size
- 41180 bytes
- Lines
- 1562
- 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
dm_services.hlink_encoder.hstream_encoder.hresource.hdce110/dce110_resource.hinclude/irq_service_interface.hdce/dce_audio.hdce110/dce110_timing_generator.hirq/dce110/irq_service_dce110.hdce110/dce110_timing_generator_v.hdce/dce_link_encoder.hdce/dce_stream_encoder.hdce/dce_mem_input.hdce110/dce110_mem_input_v.hdce/dce_ipp.hdce/dce_transform.hdce110/dce110_transform_v.hdce/dce_opp.hdce110/dce110_opp_v.hdce/dce_clock_source.hdce/dce_hwseq.hdce110/dce110_hwseq.hdce/dce_aux.hdce/dce_abm.hdce/dce_dmcu.hdce/dce_i2c.hdce/dce_panel_cntl.hdce110/dce110_compressor.hreg_helper.hdce/dce_11_0_d.hdce/dce_11_0_sh_mask.hgmc/gmc_8_2_d.h
Detected Declarations
function map_transmitter_id_to_phy_instancefunction read_dce_strapsfunction dce110_transform_destroyfunction dce110_clock_source_destroyfunction dce110_resource_destructfunction get_pixel_clock_parametersfunction dce110_resource_build_pipe_hw_paramfunction is_surface_pixel_format_supportedfunction build_mapped_resourcefunction dce110_validate_bandwidthfunction dce110_validate_planefunction dce110_validate_surface_setsfunction dce110_validate_globalfunction dce110_add_stream_to_ctxfunction dce110_destroy_resource_poolfunction underlay_createfunction bw_calcs_data_update_from_pplibfunction dce110_resource_construct
Annotated Snippet
if (pool->base.mis[i] != NULL) {
kfree(TO_DCE_MEM_INPUT(pool->base.mis[i]));
pool->base.mis[i] = NULL;
}
if (pool->base.timing_generators[i] != NULL) {
kfree(DCE110TG_FROM_TG(pool->base.timing_generators[i]));
pool->base.timing_generators[i] = NULL;
}
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_ddc; i++) {
if (pool->base.engines[i] != NULL)
dce110_engine_destroy(&pool->base.engines[i]);
if (pool->base.hw_i2cs[i] != NULL) {
kfree(pool->base.hw_i2cs[i]);
pool->base.hw_i2cs[i] = NULL;
}
if (pool->base.sw_i2cs[i] != NULL) {
kfree(pool->base.sw_i2cs[i]);
pool->base.sw_i2cs[i] = NULL;
}
}
for (i = 0; i < pool->base.stream_enc_count; i++) {
if (pool->base.stream_enc[i] != NULL)
kfree(DCE110STRENC_FROM_STRENC(pool->base.stream_enc[i]));
}
for (i = 0; i < pool->base.clk_src_count; i++) {
if (pool->base.clock_sources[i] != NULL) {
dce110_clock_source_destroy(&pool->base.clock_sources[i]);
}
}
if (pool->base.dp_clock_source != NULL)
dce110_clock_source_destroy(&pool->base.dp_clock_source);
for (i = 0; i < pool->base.audio_count; i++) {
if (pool->base.audios[i] != NULL) {
dce_aud_destroy(&pool->base.audios[i]);
}
}
if (pool->base.abm != NULL)
dce_abm_destroy(&pool->base.abm);
if (pool->base.dmcu != NULL)
dce_dmcu_destroy(&pool->base.dmcu);
if (pool->base.irqs != NULL) {
dal_irq_service_destroy(&pool->base.irqs);
}
}
static void get_pixel_clock_parameters(
const struct pipe_ctx *pipe_ctx,
struct pixel_clk_params *pixel_clk_params)
{
const struct dc_stream_state *stream = pipe_ctx->stream;
/*TODO: is this halved for YCbCr 420? in that case we might want to move
* the pixel clock normalization for hdmi up to here instead of doing it
* in pll_adjust_pix_clk
*/
pixel_clk_params->requested_pix_clk_100hz = stream->timing.pix_clk_100hz;
pixel_clk_params->encoder_object_id = stream->link->link_enc->id;
if (dc_is_rgb_signal(pipe_ctx->stream->signal))
pixel_clk_params->encoder_object_id = stream->link->link_enc->analog_id;
pixel_clk_params->signal_type = pipe_ctx->stream->signal;
pixel_clk_params->controller_id = pipe_ctx->stream_res.tg->inst + 1;
/* TODO: un-hardcode*/
pixel_clk_params->requested_sym_clk = LINK_RATE_LOW *
LINK_RATE_REF_FREQ_IN_KHZ;
pixel_clk_params->flags.ENABLE_SS = 0;
pixel_clk_params->color_depth =
stream->timing.display_color_depth;
pixel_clk_params->flags.DISPLAY_BLANKED = 1;
pixel_clk_params->flags.SUPPORT_YCBCR420 = (stream->timing.pixel_encoding ==
PIXEL_ENCODING_YCBCR420);
pixel_clk_params->pixel_encoding = stream->timing.pixel_encoding;
if (stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR422) {
pixel_clk_params->color_depth = COLOR_DEPTH_888;
}
if (stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR420) {
pixel_clk_params->requested_pix_clk_100hz = pixel_clk_params->requested_pix_clk_100hz / 2;
}
if (stream->timing.timing_3d_format == TIMING_3D_FORMAT_HW_FRAME_PACKING)
pixel_clk_params->requested_pix_clk_100hz *= 2;
Annotation
- Immediate include surface: `dm_services.h`, `link_encoder.h`, `stream_encoder.h`, `resource.h`, `dce110/dce110_resource.h`, `include/irq_service_interface.h`, `dce/dce_audio.h`, `dce110/dce110_timing_generator.h`.
- Detected declarations: `function map_transmitter_id_to_phy_instance`, `function read_dce_straps`, `function dce110_transform_destroy`, `function dce110_clock_source_destroy`, `function dce110_resource_destruct`, `function get_pixel_clock_parameters`, `function dce110_resource_build_pipe_hw_param`, `function is_surface_pixel_format_supported`, `function build_mapped_resource`, `function dce110_validate_bandwidth`.
- 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.