drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c- Extension
.c- Size
- 184325 bytes
- Lines
- 3778
- 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
dc.h../display_mode_lib.hdisplay_mode_vba_32.h../dml_inline_defs.hdisplay_mode_vba_util_32.h../dml1_frl_cap_chk.h
Detected Declarations
function dml32_recalculatefunction DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculationfunction mode_support_configurationfunction dml32_ModeSupportAndSystemConfigurationFull
Annotated Snippet
if (mode_lib->vba.WritebackEnable[k]) {
v->WritebackDISPCLK = dml_max(v->WritebackDISPCLK,
dml32_CalculateWriteBackDISPCLK(
mode_lib->vba.WritebackPixelFormat[k],
mode_lib->vba.PixelClock[k], mode_lib->vba.WritebackHRatio[k],
mode_lib->vba.WritebackVRatio[k],
mode_lib->vba.WritebackHTaps[k],
mode_lib->vba.WritebackVTaps[k],
mode_lib->vba.WritebackSourceWidth[k],
(long)mode_lib->vba.WritebackDestinationWidth[k],
mode_lib->vba.HTotal[k], (unsigned int)mode_lib->vba.WritebackLineBufferSize,
mode_lib->vba.DISPCLKDPPCLKVCOSpeed));
}
}
v->DISPCLK_calculated = v->WritebackDISPCLK;
for (k = 0; k < mode_lib->vba.NumberOfActiveSurfaces; ++k) {
if (mode_lib->vba.BlendingAndTiming[k] == k) {
v->DISPCLK_calculated = dml_max(v->DISPCLK_calculated,
dml32_CalculateRequiredDispclk(
mode_lib->vba.ODMCombineEnabled[k],
mode_lib->vba.PixelClock[k],
mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading,
mode_lib->vba.DISPCLKRampingMargin,
mode_lib->vba.DISPCLKDPPCLKVCOSpeed,
mode_lib->vba.MaxDppclk[v->soc.num_states - 1]));
}
}
for (k = 0; k < mode_lib->vba.NumberOfActiveSurfaces; ++k) {
dml32_CalculateSinglePipeDPPCLKAndSCLThroughput(mode_lib->vba.HRatio[k],
mode_lib->vba.HRatioChroma[k],
mode_lib->vba.VRatio[k],
mode_lib->vba.VRatioChroma[k],
mode_lib->vba.MaxDCHUBToPSCLThroughput,
mode_lib->vba.MaxPSCLToLBThroughput,
mode_lib->vba.PixelClock[k],
mode_lib->vba.SourcePixelFormat[k],
mode_lib->vba.htaps[k],
mode_lib->vba.HTAPsChroma[k],
mode_lib->vba.vtaps[k],
mode_lib->vba.VTAPsChroma[k],
/* Output */
&v->PSCL_THROUGHPUT_LUMA[k], &v->PSCL_THROUGHPUT_CHROMA[k],
&v->DPPCLKUsingSingleDPP[k]);
}
dml32_CalculateDPPCLK(mode_lib->vba.NumberOfActiveSurfaces, mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading,
mode_lib->vba.DISPCLKDPPCLKVCOSpeed, v->DPPCLKUsingSingleDPP, mode_lib->vba.DPPPerPlane,
/* Output */
&v->GlobalDPPCLK, v->DPPCLK);
for (k = 0; k < v->NumberOfActiveSurfaces; ++k) {
v->DPPCLK_calculated[k] = v->DPPCLK[k];
}
for (k = 0; k < mode_lib->vba.NumberOfActiveSurfaces; ++k) {
dml32_CalculateBytePerPixelAndBlockSizes(
mode_lib->vba.SourcePixelFormat[k],
mode_lib->vba.SurfaceTiling[k],
/* Output */
&v->BytePerPixelY[k],
&v->BytePerPixelC[k],
&v->BytePerPixelDETY[k],
&v->BytePerPixelDETC[k],
&v->BlockHeight256BytesY[k],
&v->BlockHeight256BytesC[k],
&v->BlockWidth256BytesY[k],
&v->BlockWidth256BytesC[k],
&v->BlockHeightY[k],
&v->BlockHeightC[k],
&v->BlockWidthY[k],
&v->BlockWidthC[k]);
}
#ifdef __DML_VBA_DEBUG__
dml_print("DML::%s: %d\n", __func__, __LINE__);
#endif
dml32_CalculateSwathWidth(
false, // ForceSingleDPP
mode_lib->vba.NumberOfActiveSurfaces,
mode_lib->vba.SourcePixelFormat,
mode_lib->vba.SourceRotation,
mode_lib->vba.ViewportStationary,
mode_lib->vba.ViewportWidth,
mode_lib->vba.ViewportHeight,
mode_lib->vba.ViewportXStartY,
Annotation
- Immediate include surface: `dc.h`, `../display_mode_lib.h`, `display_mode_vba_32.h`, `../dml_inline_defs.h`, `display_mode_vba_util_32.h`, `../dml1_frl_cap_chk.h`.
- Detected declarations: `function dml32_recalculate`, `function DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation`, `function mode_support_configuration`, `function dml32_ModeSupportAndSystemConfigurationFull`.
- 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.