drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c- Extension
.c- Size
- 24806 bytes
- Lines
- 849
- 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.hdce/dce_11_2_d.hdce/dce_11_2_sh_mask.hgmc/gmc_8_1_sh_mask.hgmc/gmc_8_1_d.hinclude/logger_interface.hdce112_compressor.h
Detected Declarations
enum fbc_idle_forcefunction lpt_size_alignmentfunction lpt_memory_control_configfunction MC_ARB_RAMCFGfunction is_source_bigger_than_epanel_sizefunction align_to_chunks_number_per_linefunction wait_for_fbc_state_changedfunction dce112_compressor_power_up_fbcfunction dce112_compressor_enable_fbcfunction changedfunction dce112_compressor_disable_fbcfunction dce112_compressor_is_fbc_enabled_in_hwfunction dce112_compressor_is_lpt_enabled_in_hwfunction dce112_compressor_program_compressed_surface_address_and_pitchfunction dce112_compressor_disable_lptfunction dce112_compressor_enable_lptfunction dce112_compressor_program_lpt_controlfunction dce112_compressor_set_fbc_invalidation_triggersfunction dce112_compressor_constructfunction dce112_compressor_destroy
Annotated Snippet
switch (cp110->base.dram_channels_num) {
case 2:
set_reg_field_value(
lpt_control,
1,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_PIPES);
break;
case 1:
set_reg_field_value(
lpt_control,
0,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_PIPES);
break;
default:
DC_LOG_WARNING(
"%s: Invalid LPT NUM_PIPES!!!",
__func__);
break;
}
/* The mapping for LPT NUM_BANKS is in
* GRPH_CONTROL.GRPH_NUM_BANKS register field
* Specifies the number of memory banks for tiling
* purposes. Only applies to 2D and 3D tiling modes.
* POSSIBLE VALUES:
* 00 - DCP_GRPH_NUM_BANKS_2BANK: ADDR_SURF_2_BANK
* 01 - DCP_GRPH_NUM_BANKS_4BANK: ADDR_SURF_4_BANK
* 02 - DCP_GRPH_NUM_BANKS_8BANK: ADDR_SURF_8_BANK
* 03 - DCP_GRPH_NUM_BANKS_16BANK: ADDR_SURF_16_BANK */
switch (cp110->base.banks_num) {
case 16:
set_reg_field_value(
lpt_control,
3,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_BANKS);
break;
case 8:
set_reg_field_value(
lpt_control,
2,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_BANKS);
break;
case 4:
set_reg_field_value(
lpt_control,
1,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_BANKS);
break;
case 2:
set_reg_field_value(
lpt_control,
0,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_NUM_BANKS);
break;
default:
DC_LOG_WARNING(
"%s: Invalid LPT NUM_BANKS!!!",
__func__);
break;
}
/* The mapping is in DMIF_ADDR_CALC.
* ADDR_CONFIG_PIPE_INTERLEAVE_SIZE register field for
* Carrizo specifies the memory interleave per pipe.
* It effectively specifies the location of pipe bits in
* the memory address.
* POSSIBLE VALUES:
* 00 - ADDR_CONFIG_PIPE_INTERLEAVE_256B: 256 byte
* interleave
* 01 - ADDR_CONFIG_PIPE_INTERLEAVE_512B: 512 byte
* interleave
*/
switch (cp110->base.channel_interleave_size) {
case 256: /*256B */
set_reg_field_value(
lpt_control,
0,
LOW_POWER_TILING_CONTROL,
LOW_POWER_TILING_PIPE_INTERLEAVE_SIZE);
break;
case 512: /*512B */
set_reg_field_value(
lpt_control,
1,
Annotation
- Immediate include surface: `dm_services.h`, `dce/dce_11_2_d.h`, `dce/dce_11_2_sh_mask.h`, `gmc/gmc_8_1_sh_mask.h`, `gmc/gmc_8_1_d.h`, `include/logger_interface.h`, `dce112_compressor.h`.
- Detected declarations: `enum fbc_idle_force`, `function lpt_size_alignment`, `function lpt_memory_control_config`, `function MC_ARB_RAMCFG`, `function is_source_bigger_than_epanel_size`, `function align_to_chunks_number_per_line`, `function wait_for_fbc_state_changed`, `function dce112_compressor_power_up_fbc`, `function dce112_compressor_enable_fbc`, `function changed`.
- 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.