drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c- Extension
.c- Size
- 251091 bytes
- Lines
- 6668
- 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_30.h../dml_inline_defs.h../dml1_frl_cap_chk.h
Detected Declarations
function dml30_recalculatefunction dscceComputeDelayfunction dscComputeDelayfunction CalculatePrefetchSchedulefunction RoundToDFSGranularityUpfunction RoundToDFSGranularityDownfunction CalculateDCCConfigurationfunction CalculatePrefetchSourceLinesfunction CalculateVMAndRowBytesfunction DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculationfunction DisplayPipeConfigurationfunction dml30_CalculateBytePerPixelAnd256BBlockSizesfunction CalculateTWaitfunction dml30_CalculateWriteBackDISPCLKfunction CalculateWriteBackDelayfunction CalculateDynamicMetadataParametersfunction CalculateRowBandwidthfunction CalculateFlipSchedulefunction TruncToValidBPPfunction dml30_ModeSupportAndSystemConfigurationFullfunction CalculateWatermarksAndDRAMSpeedChangeSupportfunction CalculateDCFCLKDeepSleepfunction CalculateUrgentBurstFactorfunction CalculatePixelDeliveryTimesfunction CalculateMetaAndPTETimesfunction CalculateVMGroupAndRequestTimesfunction CalculateStutterEfficiencyfunction CalculateSwathAndDETConfigurationfunction CalculateSwathWidthfunction CalculateExtraLatencyfunction CalculateExtraLatencyBytesfunction CalculateUrgentLatencyfunction RequiredDTBCLKfunction UseMinimumDCFCLK
Annotated Snippet
if (VStartup * LineTime < Tsetup + v->Tdmdl[k] + Tdmbf + Tdmec + Tdmsks) {
*NotEnoughTimeForDynamicMetadata = true;
} else {
*NotEnoughTimeForDynamicMetadata = false;
dml_print("DML: Not Enough Time for Dynamic Meta!\n");
dml_print("DML: Tdmbf: %fus - time for dmd transfer from dchub to dio output buffer\n", Tdmbf);
dml_print("DML: Tdmec: %fus - time dio takes to transfer dmd\n", Tdmec);
dml_print("DML: Tdmsks: %fus - time before active dmd must complete transmission at dio\n", Tdmsks);
dml_print("DML: Tdmdl: %fus - time for fabric to become ready and fetch dmd \n", v->Tdmdl[k]);
}
} else {
*NotEnoughTimeForDynamicMetadata = false;
}
v->Tdmdl_vm[k] = (v->DynamicMetadataEnable[k] == true && v->DynamicMetadataVMEnabled == true && v->GPUVMEnable == true ? TWait + Tvm_trips : 0);
if (myPipe->ScalerEnabled)
DPPCycles = (unsigned int)(DPPCLKDelaySubtotalPlusCNVCFormater + v->DPPCLKDelaySCL);
else
DPPCycles = (unsigned int)(DPPCLKDelaySubtotalPlusCNVCFormater + v->DPPCLKDelaySCLLBOnly);
DPPCycles = (unsigned int)(DPPCycles + myPipe->NumberOfCursors * v->DPPCLKDelayCNVCCursor);
DISPCLKCycles = (unsigned int)v->DISPCLKDelaySubtotal;
if (myPipe->DPPCLK == 0.0 || myPipe->DISPCLK == 0.0)
return true;
v->DSTXAfterScaler[k] = DPPCycles * myPipe->PixelClock / myPipe->DPPCLK + DISPCLKCycles * myPipe->PixelClock / myPipe->DISPCLK
+ DSCDelay;
v->DSTXAfterScaler[k] = v->DSTXAfterScaler[k] + ((myPipe->ODMCombineEnabled)?18:0) + (myPipe->DPPPerPlane - 1) * DPP_RECOUT_WIDTH;
if (v->OutputFormat[k] == dm_420 || (myPipe->InterlaceEnable && v->ProgressiveToInterlaceUnitInOPP))
v->DSTYAfterScaler[k] = 1;
else
v->DSTYAfterScaler[k] = 0;
DSTTotalPixelsAfterScaler = v->DSTYAfterScaler[k] * myPipe->HTotal + v->DSTXAfterScaler[k];
v->DSTYAfterScaler[k] = dml_floor(DSTTotalPixelsAfterScaler / myPipe->HTotal, 1);
v->DSTXAfterScaler[k] = DSTTotalPixelsAfterScaler - ((double) (v->DSTYAfterScaler[k] * myPipe->HTotal));
MyError = false;
Tr0_trips = trip_to_mem * (HostVMDynamicLevelsTrips + 1);
Tvm_trips_rounded = dml_ceil(4.0 * Tvm_trips / LineTime, 1) / 4 * LineTime;
Tr0_trips_rounded = dml_ceil(4.0 * Tr0_trips / LineTime, 1) / 4 * LineTime;
if (v->GPUVMEnable) {
if (v->GPUVMMaxPageTableLevels >= 3) {
v->Tno_bw[k] = UrgentExtraLatency + trip_to_mem * ((v->GPUVMMaxPageTableLevels - 2) - 1);
} else
v->Tno_bw[k] = 0;
} else if (!myPipe->DCCEnable)
v->Tno_bw[k] = LineTime;
else
v->Tno_bw[k] = LineTime / 4;
dst_y_prefetch_equ = VStartup - (Tsetup + dml_max(TWait + TCalc, v->Tdmdl[k])) / LineTime
- (v->DSTYAfterScaler[k] + v->DSTXAfterScaler[k] / myPipe->HTotal);
dst_y_prefetch_equ = dml_min(dst_y_prefetch_equ, 63.75); // limit to the reg limit of U6.2 for DST_Y_PREFETCH
Lsw_oto = dml_max(PrefetchSourceLinesY, PrefetchSourceLinesC);
Tsw_oto = Lsw_oto * LineTime;
prefetch_bw_oto = (PrefetchSourceLinesY * swath_width_luma_ub * BytePerPixelY + PrefetchSourceLinesC * swath_width_chroma_ub * v->BytePerPixelC[k]) / Tsw_oto;
if (v->GPUVMEnable == true) {
Tvm_oto = dml_max3(v->Tno_bw[k] + PDEAndMetaPTEBytesFrame * HostVMInefficiencyFactor / prefetch_bw_oto,
Tvm_trips,
LineTime / 4.0);
} else
Tvm_oto = LineTime / 4.0;
if ((v->GPUVMEnable == true || myPipe->DCCEnable == true)) {
Tr0_oto = dml_max3(
(MetaRowByte + PixelPTEBytesPerRow * HostVMInefficiencyFactor) / prefetch_bw_oto,
LineTime - Tvm_oto, LineTime / 4);
} else
Tr0_oto = (LineTime - Tvm_oto) / 2.0;
Tvm_oto_lines = dml_ceil(4.0 * Tvm_oto / LineTime, 1) / 4.0;
Tr0_oto_lines = dml_ceil(4.0 * Tr0_oto / LineTime, 1) / 4.0;
dst_y_prefetch_oto = Tvm_oto_lines + 2 * Tr0_oto_lines + Lsw_oto;
dst_y_prefetch_equ = dml_floor(4.0 * (dst_y_prefetch_equ + 0.125), 1) / 4.0;
Tpre_rounded = dst_y_prefetch_equ * LineTime;
dml_print("DML: dst_y_prefetch_oto: %f\n", dst_y_prefetch_oto);
Annotation
- Immediate include surface: `dc.h`, `../display_mode_lib.h`, `display_mode_vba_30.h`, `../dml_inline_defs.h`, `../dml1_frl_cap_chk.h`.
- Detected declarations: `function dml30_recalculate`, `function dscceComputeDelay`, `function dscComputeDelay`, `function CalculatePrefetchSchedule`, `function RoundToDFSGranularityUp`, `function RoundToDFSGranularityDown`, `function CalculateDCCConfiguration`, `function CalculatePrefetchSourceLines`, `function CalculateVMAndRowBytes`, `function DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation`.
- 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.