#include "display_mode_core.h"
#include "display_mode_util.h"
#include "display_mode_lib_defines.h"
#include "dml_assert.h"
#define DML2_MAX_FMT_420_BUFFER_WIDTH …
#define TB_BORROWED_MAX …
static void CalculateBytePerPixelAndBlockSizes(
enum dml_source_format_class SourcePixelFormat,
enum dml_swizzle_mode SurfaceTiling,
dml_uint_t *BytePerPixelY,
dml_uint_t *BytePerPixelC,
dml_float_t *BytePerPixelDETY,
dml_float_t *BytePerPixelDETC,
dml_uint_t *BlockHeight256BytesY,
dml_uint_t *BlockHeight256BytesC,
dml_uint_t *BlockWidth256BytesY,
dml_uint_t *BlockWidth256BytesC,
dml_uint_t *MacroTileHeightY,
dml_uint_t *MacroTileHeightC,
dml_uint_t *MacroTileWidthY,
dml_uint_t *MacroTileWidthC);
static dml_float_t CalculateWriteBackDISPCLK(
enum dml_source_format_class WritebackPixelFormat,
dml_float_t PixelClock,
dml_float_t WritebackHRatio,
dml_float_t WritebackVRatio,
dml_uint_t WritebackHTaps,
dml_uint_t WritebackVTaps,
dml_uint_t WritebackSourceWidth,
dml_uint_t WritebackDestinationWidth,
dml_uint_t HTotal,
dml_uint_t WritebackLineBufferSize,
dml_float_t DISPCLKDPPCLKVCOSpeed);
static void CalculateVMRowAndSwath(
struct display_mode_lib_scratch_st *s,
struct CalculateVMRowAndSwath_params_st *p);
static void CalculateOutputLink(
dml_float_t PHYCLKPerState,
dml_float_t PHYCLKD18PerState,
dml_float_t PHYCLKD32PerState,
dml_float_t Downspreading,
dml_bool_t IsMainSurfaceUsingTheIndicatedTiming,
enum dml_output_encoder_class Output,
enum dml_output_format_class OutputFormat,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_float_t PixelClockBackEnd,
dml_float_t ForcedOutputLinkBPP,
dml_uint_t DSCInputBitPerComponent,
dml_uint_t NumberOfDSCSlices,
dml_float_t AudioSampleRate,
dml_uint_t AudioSampleLayout,
enum dml_odm_mode ODMModeNoDSC,
enum dml_odm_mode ODMModeDSC,
enum dml_dsc_enable DSCEnable,
dml_uint_t OutputLinkDPLanes,
enum dml_output_link_dp_rate OutputLinkDPRate,
dml_bool_t *RequiresDSC,
dml_bool_t *RequiresFEC,
dml_float_t *OutBpp,
enum dml_output_type_and_rate__type *OutputType,
enum dml_output_type_and_rate__rate *OutputRate,
dml_uint_t *RequiredSlots);
static void CalculateODMMode(
dml_uint_t MaximumPixelsPerLinePerDSCUnit,
dml_uint_t HActive,
enum dml_output_encoder_class Output,
enum dml_output_format_class OutputFormat,
enum dml_odm_use_policy ODMUse,
dml_float_t StateDispclk,
dml_float_t MaxDispclk,
dml_bool_t DSCEnable,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t MaxNumDPP,
dml_float_t PixelClock,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKRampingMargin,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_uint_t NumberOfDSCSlices,
dml_bool_t *TotalAvailablePipesSupport,
dml_uint_t *NumberOfDPP,
enum dml_odm_mode *ODMMode,
dml_float_t *RequiredDISPCLKPerSurface);
static dml_float_t CalculateRequiredDispclk(
enum dml_odm_mode ODMMode,
dml_float_t PixelClock,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKRampingMargin,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_float_t MaxDispclkSingle);
static void CalculateSinglePipeDPPCLKAndSCLThroughput(
dml_float_t HRatio,
dml_float_t HRatioChroma,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_float_t MaxDCHUBToPSCLThroughput,
dml_float_t MaxPSCLToLBThroughput,
dml_float_t PixelClock,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t HTaps,
dml_uint_t HTapsChroma,
dml_uint_t VTaps,
dml_uint_t VTapsChroma,
dml_float_t *PSCL_THROUGHPUT,
dml_float_t *PSCL_THROUGHPUT_CHROMA,
dml_float_t *DPPCLKUsingSingleDPP);
static void CalculateDPPCLK(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_float_t DPPCLKUsingSingleDPP[],
dml_uint_t DPPPerSurface[],
dml_float_t *GlobalDPPCLK,
dml_float_t Dppclk[]);
static void CalculateMALLUseForStaticScreen(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t MALLAllocatedForDCNFinal,
enum dml_use_mall_for_static_screen_mode *UseMALLForStaticScreen,
dml_uint_t SurfaceSizeInMALL[],
dml_bool_t one_row_per_frame_fits_in_buffer[],
dml_bool_t UsesMALLForStaticScreen[]);
static dml_uint_t dscceComputeDelay(
dml_uint_t bpc,
dml_float_t BPP,
dml_uint_t sliceWidth,
dml_uint_t numSlices,
enum dml_output_format_class pixelFormat,
enum dml_output_encoder_class Output);
static dml_uint_t dscComputeDelay(enum dml_output_format_class pixelFormat,
enum dml_output_encoder_class Output);
static dml_bool_t CalculatePrefetchSchedule(struct display_mode_lib_scratch_st *scratch,
struct CalculatePrefetchSchedule_params_st *p);
static dml_float_t RoundToDFSGranularity(dml_float_t Clock, dml_bool_t round_up, dml_float_t VCOSpeed);
static void CalculateDCCConfiguration(
dml_bool_t DCCEnabled,
dml_bool_t DCCProgrammingAssumesScanDirectionUnknown,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t SurfaceWidthLuma,
dml_uint_t SurfaceWidthChroma,
dml_uint_t SurfaceHeightLuma,
dml_uint_t SurfaceHeightChroma,
dml_uint_t nomDETInKByte,
dml_uint_t RequestHeight256ByteLuma,
dml_uint_t RequestHeight256ByteChroma,
enum dml_swizzle_mode TilingFormat,
dml_uint_t BytePerPixelY,
dml_uint_t BytePerPixelC,
dml_float_t BytePerPixelDETY,
dml_float_t BytePerPixelDETC,
enum dml_rotation_angle SourceScan,
dml_uint_t *MaxUncompressedBlockLuma,
dml_uint_t *MaxUncompressedBlockChroma,
dml_uint_t *MaxCompressedBlockLuma,
dml_uint_t *MaxCompressedBlockChroma,
dml_uint_t *IndependentBlockLuma,
dml_uint_t *IndependentBlockChroma);
static dml_uint_t CalculatePrefetchSourceLines(
dml_float_t VRatio,
dml_uint_t VTaps,
dml_bool_t Interlace,
dml_bool_t ProgressiveToInterlaceUnitInOPP,
dml_uint_t SwathHeight,
enum dml_rotation_angle SourceScan,
dml_bool_t ViewportStationary,
dml_uint_t SwathWidth,
dml_uint_t ViewportHeight,
dml_uint_t ViewportXStart,
dml_uint_t ViewportYStart,
dml_uint_t *VInitPreFill,
dml_uint_t *MaxNumSwath);
static dml_uint_t CalculateVMAndRowBytes(
dml_bool_t ViewportStationary,
dml_bool_t DCCEnable,
dml_uint_t NumberOfDPPs,
dml_uint_t BlockHeight256Bytes,
dml_uint_t BlockWidth256Bytes,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t SurfaceTiling,
dml_uint_t BytePerPixel,
enum dml_rotation_angle SourceScan,
dml_uint_t SwathWidth,
dml_uint_t ViewportHeight,
dml_uint_t ViewportXStart,
dml_uint_t ViewportYStart,
dml_bool_t GPUVMEnable,
dml_uint_t GPUVMMaxPageTableLevels,
dml_uint_t GPUVMMinPageSizeKBytes,
dml_uint_t PTEBufferSizeInRequests,
dml_uint_t Pitch,
dml_uint_t DCCMetaPitch,
dml_uint_t MacroTileWidth,
dml_uint_t MacroTileHeight,
dml_uint_t *MetaRowByte,
dml_uint_t *PixelPTEBytesPerRow,
dml_uint_t *PixelPTEBytesPerRowStorage,
dml_uint_t *dpte_row_width_ub,
dml_uint_t *dpte_row_height,
dml_uint_t *dpte_row_height_linear,
dml_uint_t *PixelPTEBytesPerRow_one_row_per_frame,
dml_uint_t *dpte_row_width_ub_one_row_per_frame,
dml_uint_t *dpte_row_height_one_row_per_frame,
dml_uint_t *MetaRequestWidth,
dml_uint_t *MetaRequestHeight,
dml_uint_t *meta_row_width,
dml_uint_t *meta_row_height,
dml_uint_t *PixelPTEReqWidth,
dml_uint_t *PixelPTEReqHeight,
dml_uint_t *PTERequestSize,
dml_uint_t *DPDE0BytesFrame,
dml_uint_t *MetaPTEBytesFrame);
static dml_float_t CalculateTWait(
dml_uint_t PrefetchMode,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange,
dml_bool_t SynchronizeDRRDisplaysForUCLKPStateChangeFinal,
dml_bool_t DRRDisplay,
dml_float_t DRAMClockChangeLatency,
dml_float_t FCLKChangeLatency,
dml_float_t UrgentLatency,
dml_float_t SREnterPlusExitTime);
static void CalculatePrefetchMode(
enum dml_prefetch_modes AllowForPStateChangeOrStutterInVBlank,
dml_uint_t *MinPrefetchMode,
dml_uint_t *MaxPrefetchMode);
static void CalculateRowBandwidth(
dml_bool_t GPUVMEnable,
enum dml_source_format_class SourcePixelFormat,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_bool_t DCCEnable,
dml_float_t LineTime,
dml_uint_t MetaRowByteLuma,
dml_uint_t MetaRowByteChroma,
dml_uint_t meta_row_height_luma,
dml_uint_t meta_row_height_chroma,
dml_uint_t PixelPTEBytesPerRowLuma,
dml_uint_t PixelPTEBytesPerRowChroma,
dml_uint_t dpte_row_height_luma,
dml_uint_t dpte_row_height_chroma,
dml_float_t *meta_row_bw,
dml_float_t *dpte_row_bw);
static void CalculateFlipSchedule(
dml_float_t HostVMInefficiencyFactor,
dml_float_t UrgentExtraLatency,
dml_float_t UrgentLatency,
dml_uint_t GPUVMMaxPageTableLevels,
dml_bool_t HostVMEnable,
dml_uint_t HostVMMaxNonCachedPageTableLevels,
dml_bool_t GPUVMEnable,
dml_uint_t HostVMMinPageSize,
dml_float_t PDEAndMetaPTEBytesPerFrame,
dml_float_t MetaRowBytes,
dml_float_t DPTEBytesPerRow,
dml_float_t BandwidthAvailableForImmediateFlip,
dml_uint_t TotImmediateFlipBytes,
enum dml_source_format_class SourcePixelFormat,
dml_float_t LineTime,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_float_t Tno_bw,
dml_bool_t DCCEnable,
dml_uint_t dpte_row_height,
dml_uint_t meta_row_height,
dml_uint_t dpte_row_height_chroma,
dml_uint_t meta_row_height_chroma,
dml_bool_t use_one_row_for_frame_flip,
dml_float_t *DestinationLinesToRequestVMInImmediateFlip,
dml_float_t *DestinationLinesToRequestRowInImmediateFlip,
dml_float_t *final_flip_bw,
dml_bool_t *ImmediateFlipSupportedForPipe);
static dml_float_t CalculateWriteBackDelay(
enum dml_source_format_class WritebackPixelFormat,
dml_float_t WritebackHRatio,
dml_float_t WritebackVRatio,
dml_uint_t WritebackVTaps,
dml_uint_t WritebackDestinationWidth,
dml_uint_t WritebackDestinationHeight,
dml_uint_t WritebackSourceHeight,
dml_uint_t HTotal);
static void CalculateVUpdateAndDynamicMetadataParameters(
dml_uint_t MaxInterDCNTileRepeaters,
dml_float_t Dppclk,
dml_float_t DISPCLK,
dml_float_t DCFClkDeepSleep,
dml_float_t PixelClock,
dml_uint_t HTotal,
dml_uint_t VBlank,
dml_uint_t DynamicMetadataTransmittedBytes,
dml_uint_t DynamicMetadataLinesBeforeActiveRequired,
dml_uint_t InterlaceEnable,
dml_bool_t ProgressiveToInterlaceUnitInOPP,
dml_float_t *TSetup,
dml_float_t *Tdmbf,
dml_float_t *Tdmec,
dml_float_t *Tdmsks,
dml_uint_t *VUpdateOffsetPix,
dml_uint_t *VUpdateWidthPix,
dml_uint_t *VReadyOffsetPix);
static void PixelClockAdjustmentForProgressiveToInterlaceUnit(struct dml_display_cfg_st *display_cfg, dml_bool_t ptoi_supported);
static dml_float_t TruncToValidBPP(
dml_float_t LinkBitRate,
dml_uint_t Lanes,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_float_t PixelClock,
dml_float_t DesiredBPP,
dml_bool_t DSCEnable,
enum dml_output_encoder_class Output,
enum dml_output_format_class Format,
dml_uint_t DSCInputBitPerComponent,
dml_uint_t DSCSlices,
dml_uint_t AudioRate,
dml_uint_t AudioLayout,
enum dml_odm_mode ODMModeNoDSC,
enum dml_odm_mode ODMModeDSC,
dml_uint_t *RequiredSlotsSingle);
static void CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(
struct display_mode_lib_scratch_st *s,
struct CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport_params_st *p);
static void CalculateDCFCLKDeepSleep(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t BytePerPixelY[],
dml_uint_t BytePerPixelC[],
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_uint_t SwathWidthY[],
dml_uint_t SwathWidthC[],
dml_uint_t DPPPerSurface[],
dml_float_t HRatio[],
dml_float_t HRatioChroma[],
dml_float_t PixelClock[],
dml_float_t PSCL_THROUGHPUT[],
dml_float_t PSCL_THROUGHPUT_CHROMA[],
dml_float_t Dppclk[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_uint_t ReturnBusWidth,
dml_float_t *DCFCLKDeepSleep);
static void CalculateUrgentBurstFactor(
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange,
dml_uint_t swath_width_luma_ub,
dml_uint_t swath_width_chroma_ub,
dml_uint_t SwathHeightY,
dml_uint_t SwathHeightC,
dml_float_t LineTime,
dml_float_t UrgentLatency,
dml_float_t CursorBufferSize,
dml_uint_t CursorWidth,
dml_uint_t CursorBPP,
dml_float_t VRatio,
dml_float_t VRatioC,
dml_float_t BytePerPixelInDETY,
dml_float_t BytePerPixelInDETC,
dml_uint_t DETBufferSizeY,
dml_uint_t DETBufferSizeC,
dml_float_t *UrgentBurstFactorCursor,
dml_float_t *UrgentBurstFactorLuma,
dml_float_t *UrgentBurstFactorChroma,
dml_bool_t *NotEnoughUrgentLatencyHiding);
static dml_float_t RequiredDTBCLK(
dml_bool_t DSCEnable,
dml_float_t PixelClock,
enum dml_output_format_class OutputFormat,
dml_float_t OutputBpp,
dml_uint_t DSCSlices,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_uint_t AudioRate,
dml_uint_t AudioLayoutSingle);
static void UseMinimumDCFCLK(
struct display_mode_lib_scratch_st *scratch,
struct UseMinimumDCFCLK_params_st *p);
static void CalculatePixelDeliveryTimes(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_float_t VRatioPrefetchY[],
dml_float_t VRatioPrefetchC[],
dml_uint_t swath_width_luma_ub[],
dml_uint_t swath_width_chroma_ub[],
dml_uint_t DPPPerSurface[],
dml_float_t HRatio[],
dml_float_t HRatioChroma[],
dml_float_t PixelClock[],
dml_float_t PSCL_THROUGHPUT[],
dml_float_t PSCL_THROUGHPUT_CHROMA[],
dml_float_t Dppclk[],
dml_uint_t BytePerPixelC[],
enum dml_rotation_angle SourceScan[],
dml_uint_t NumberOfCursors[],
dml_uint_t CursorWidth[],
dml_uint_t CursorBPP[],
dml_uint_t BlockWidth256BytesY[],
dml_uint_t BlockHeight256BytesY[],
dml_uint_t BlockWidth256BytesC[],
dml_uint_t BlockHeight256BytesC[],
dml_float_t DisplayPipeLineDeliveryTimeLuma[],
dml_float_t DisplayPipeLineDeliveryTimeChroma[],
dml_float_t DisplayPipeLineDeliveryTimeLumaPrefetch[],
dml_float_t DisplayPipeLineDeliveryTimeChromaPrefetch[],
dml_float_t DisplayPipeRequestDeliveryTimeLuma[],
dml_float_t DisplayPipeRequestDeliveryTimeChroma[],
dml_float_t DisplayPipeRequestDeliveryTimeLumaPrefetch[],
dml_float_t DisplayPipeRequestDeliveryTimeChromaPrefetch[],
dml_float_t CursorRequestDeliveryTime[],
dml_float_t CursorRequestDeliveryTimePrefetch[]);
static void CalculateMetaAndPTETimes(
dml_bool_t use_one_row_for_frame[],
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t GPUVMEnable,
dml_uint_t MetaChunkSize,
dml_uint_t MinMetaChunkSizeBytes,
dml_uint_t HTotal[],
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_float_t DestinationLinesToRequestRowInVBlank[],
dml_float_t DestinationLinesToRequestRowInImmediateFlip[],
dml_bool_t DCCEnable[],
dml_float_t PixelClock[],
dml_uint_t BytePerPixelY[],
dml_uint_t BytePerPixelC[],
enum dml_rotation_angle SourceScan[],
dml_uint_t dpte_row_height[],
dml_uint_t dpte_row_height_chroma[],
dml_uint_t meta_row_width[],
dml_uint_t meta_row_width_chroma[],
dml_uint_t meta_row_height[],
dml_uint_t meta_row_height_chroma[],
dml_uint_t meta_req_width[],
dml_uint_t meta_req_width_chroma[],
dml_uint_t meta_req_height[],
dml_uint_t meta_req_height_chroma[],
dml_uint_t dpte_group_bytes[],
dml_uint_t PTERequestSizeY[],
dml_uint_t PTERequestSizeC[],
dml_uint_t PixelPTEReqWidthY[],
dml_uint_t PixelPTEReqHeightY[],
dml_uint_t PixelPTEReqWidthC[],
dml_uint_t PixelPTEReqHeightC[],
dml_uint_t dpte_row_width_luma_ub[],
dml_uint_t dpte_row_width_chroma_ub[],
dml_float_t DST_Y_PER_PTE_ROW_NOM_L[],
dml_float_t DST_Y_PER_PTE_ROW_NOM_C[],
dml_float_t DST_Y_PER_META_ROW_NOM_L[],
dml_float_t DST_Y_PER_META_ROW_NOM_C[],
dml_float_t TimePerMetaChunkNominal[],
dml_float_t TimePerChromaMetaChunkNominal[],
dml_float_t TimePerMetaChunkVBlank[],
dml_float_t TimePerChromaMetaChunkVBlank[],
dml_float_t TimePerMetaChunkFlip[],
dml_float_t TimePerChromaMetaChunkFlip[],
dml_float_t time_per_pte_group_nom_luma[],
dml_float_t time_per_pte_group_vblank_luma[],
dml_float_t time_per_pte_group_flip_luma[],
dml_float_t time_per_pte_group_nom_chroma[],
dml_float_t time_per_pte_group_vblank_chroma[],
dml_float_t time_per_pte_group_flip_chroma[]);
static void CalculateVMGroupAndRequestTimes(
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t GPUVMEnable,
dml_uint_t GPUVMMaxPageTableLevels,
dml_uint_t HTotal[],
dml_uint_t BytePerPixelC[],
dml_float_t DestinationLinesToRequestVMInVBlank[],
dml_float_t DestinationLinesToRequestVMInImmediateFlip[],
dml_bool_t DCCEnable[],
dml_float_t PixelClock[],
dml_uint_t dpte_row_width_luma_ub[],
dml_uint_t dpte_row_width_chroma_ub[],
dml_uint_t vm_group_bytes[],
dml_uint_t dpde0_bytes_per_frame_ub_l[],
dml_uint_t dpde0_bytes_per_frame_ub_c[],
dml_uint_t meta_pte_bytes_per_frame_ub_l[],
dml_uint_t meta_pte_bytes_per_frame_ub_c[],
dml_float_t TimePerVMGroupVBlank[],
dml_float_t TimePerVMGroupFlip[],
dml_float_t TimePerVMRequestVBlank[],
dml_float_t TimePerVMRequestFlip[]);
static void CalculateStutterEfficiency(
struct display_mode_lib_scratch_st *scratch,
struct CalculateStutterEfficiency_params_st *p);
static void CalculateSwathAndDETConfiguration(
struct display_mode_lib_scratch_st *scratch,
struct CalculateSwathAndDETConfiguration_params_st *p);
static void CalculateSwathWidth(
dml_bool_t ForceSingleDPP,
dml_uint_t NumberOfActiveSurfaces,
enum dml_source_format_class SourcePixelFormat[],
enum dml_rotation_angle SourceScan[],
dml_bool_t ViewportStationary[],
dml_uint_t ViewportWidth[],
dml_uint_t ViewportHeight[],
dml_uint_t ViewportXStart[],
dml_uint_t ViewportYStart[],
dml_uint_t ViewportXStartC[],
dml_uint_t ViewportYStartC[],
dml_uint_t SurfaceWidthY[],
dml_uint_t SurfaceWidthC[],
dml_uint_t SurfaceHeightY[],
dml_uint_t SurfaceHeightC[],
enum dml_odm_mode ODMMode[],
dml_uint_t BytePerPixY[],
dml_uint_t BytePerPixC[],
dml_uint_t Read256BytesBlockHeightY[],
dml_uint_t Read256BytesBlockHeightC[],
dml_uint_t Read256BytesBlockWidthY[],
dml_uint_t Read256BytesBlockWidthC[],
dml_uint_t BlendingAndTiming[],
dml_uint_t HActive[],
dml_float_t HRatio[],
dml_uint_t DPPPerSurface[],
dml_uint_t SwathWidthSingleDPPY[],
dml_uint_t SwathWidthSingleDPPC[],
dml_uint_t SwathWidthY[],
dml_uint_t SwathWidthC[],
dml_uint_t MaximumSwathHeightY[],
dml_uint_t MaximumSwathHeightC[],
dml_uint_t swath_width_luma_ub[],
dml_uint_t swath_width_chroma_ub[]);
static dml_float_t CalculateExtraLatency(
dml_uint_t RoundTripPingLatencyCycles,
dml_uint_t ReorderingBytes,
dml_float_t DCFCLK,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t PixelChunkSizeInKByte,
dml_uint_t TotalNumberOfDCCActiveDPP,
dml_uint_t MetaChunkSize,
dml_float_t ReturnBW,
dml_bool_t GPUVMEnable,
dml_bool_t HostVMEnable,
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t NumberOfDPP[],
dml_uint_t dpte_group_bytes[],
dml_float_t HostVMInefficiencyFactor,
dml_uint_t HostVMMinPageSize,
dml_uint_t HostVMMaxNonCachedPageTableLevels);
static dml_uint_t CalculateExtraLatencyBytes(
dml_uint_t ReorderingBytes,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t PixelChunkSizeInKByte,
dml_uint_t TotalNumberOfDCCActiveDPP,
dml_uint_t MetaChunkSize,
dml_bool_t GPUVMEnable,
dml_bool_t HostVMEnable,
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t NumberOfDPP[],
dml_uint_t dpte_group_bytes[],
dml_float_t HostVMInefficiencyFactor,
dml_uint_t HostVMMinPageSize,
dml_uint_t HostVMMaxNonCachedPageTableLevels);
static dml_float_t CalculateUrgentLatency(
dml_float_t UrgentLatencyPixelDataOnly,
dml_float_t UrgentLatencyPixelMixedWithVMData,
dml_float_t UrgentLatencyVMDataOnly,
dml_bool_t DoUrgentLatencyAdjustment,
dml_float_t UrgentLatencyAdjustmentFabricClockComponent,
dml_float_t UrgentLatencyAdjustmentFabricClockReference,
dml_float_t FabricClockSingle);
static dml_bool_t UnboundedRequest(
enum dml_unbounded_requesting_policy UseUnboundedRequestingFinal,
dml_uint_t TotalNumberOfActiveDPP,
dml_bool_t NoChromaOrLinear,
enum dml_output_encoder_class Output);
static void CalculateSurfaceSizeInMall(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t MALLAllocatedForDCN,
enum dml_use_mall_for_static_screen_mode UseMALLForStaticScreen[],
dml_bool_t DCCEnable[],
dml_bool_t ViewportStationary[],
dml_uint_t ViewportXStartY[],
dml_uint_t ViewportYStartY[],
dml_uint_t ViewportXStartC[],
dml_uint_t ViewportYStartC[],
dml_uint_t ViewportWidthY[],
dml_uint_t ViewportHeightY[],
dml_uint_t BytesPerPixelY[],
dml_uint_t ViewportWidthC[],
dml_uint_t ViewportHeightC[],
dml_uint_t BytesPerPixelC[],
dml_uint_t SurfaceWidthY[],
dml_uint_t SurfaceWidthC[],
dml_uint_t SurfaceHeightY[],
dml_uint_t SurfaceHeightC[],
dml_uint_t Read256BytesBlockWidthY[],
dml_uint_t Read256BytesBlockWidthC[],
dml_uint_t Read256BytesBlockHeightY[],
dml_uint_t Read256BytesBlockHeightC[],
dml_uint_t ReadBlockWidthY[],
dml_uint_t ReadBlockWidthC[],
dml_uint_t ReadBlockHeightY[],
dml_uint_t ReadBlockHeightC[],
dml_uint_t SurfaceSizeInMALL[],
dml_bool_t *ExceededMALLSize);
static void CalculateDETBufferSize(
dml_uint_t DETSizeOverride[],
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
dml_bool_t ForceSingleDPP,
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t UnboundedRequestEnabled,
dml_uint_t nomDETInKByte,
dml_uint_t MaxTotalDETInKByte,
dml_uint_t ConfigReturnBufferSizeInKByte,
dml_uint_t MinCompressedBufferSizeInKByte,
dml_uint_t ConfigReturnBufferSegmentSizeInkByte,
dml_uint_t CompressedBufferSegmentSizeInkByteFinal,
enum dml_source_format_class SourcePixelFormat[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_uint_t RotesY[],
dml_uint_t RoundedUpMaxSwathSizeBytesC[],
dml_uint_t DPPPerSurface[],
dml_uint_t DETBufferSizeInKByte[],
dml_uint_t *CompressedBufferSizeInkByte);
static void CalculateMaxDETAndMinCompressedBufferSize(
dml_uint_t ConfigReturnBufferSizeInKByte,
dml_uint_t ConfigReturnBufferSegmentSizeInKByte,
dml_uint_t ROBBufferSizeInKByte,
dml_uint_t MaxNumDPP,
dml_bool_t nomDETInKByteOverrideEnable,
dml_uint_t nomDETInKByteOverrideValue,
dml_uint_t *MaxTotalDETInKByte,
dml_uint_t *nomDETInKByte,
dml_uint_t *MinCompressedBufferSizeInKByte);
static dml_uint_t DSCDelayRequirement(
dml_bool_t DSCEnabled,
enum dml_odm_mode ODMMode,
dml_uint_t DSCInputBitPerComponent,
dml_float_t OutputBpp,
dml_uint_t HActive,
dml_uint_t HTotal,
dml_uint_t NumberOfDSCSlices,
enum dml_output_format_class OutputFormat,
enum dml_output_encoder_class Output,
dml_float_t PixelClock,
dml_float_t PixelClockBackEnd);
static dml_bool_t CalculateVActiveBandwithSupport(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
dml_bool_t NotUrgentLatencyHiding[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[]);
static void CalculatePrefetchBandwithSupport(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
dml_bool_t NotUrgentLatencyHiding[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_float_t cursor_bw_pre[],
dml_float_t prefetch_vmrow_bw[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[],
dml_float_t *PrefetchBandwidth,
dml_float_t *PrefetchBandwidthNotIncludingMALLPrefetch,
dml_float_t *FractionOfUrgentBandwidth,
dml_bool_t *PrefetchBandwidthSupport);
static dml_float_t CalculateBandwidthAvailableForImmediateFlip(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t cursor_bw_pre[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[]);
static void CalculateImmediateFlipBandwithSupport(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
enum dml_immediate_flip_requirement ImmediateFlipRequirement[],
dml_float_t final_flip_bw[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_float_t cursor_bw_pre[],
dml_float_t prefetch_vmrow_bw[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[],
dml_float_t *TotalBandwidth,
dml_float_t *TotalBandwidthNotIncludingMALLPrefetch,
dml_float_t *FractionOfUrgentBandwidth,
dml_bool_t *ImmediateFlipBandwidthSupport);
static dml_uint_t dscceComputeDelay(
dml_uint_t bpc,
dml_float_t BPP,
dml_uint_t sliceWidth,
dml_uint_t numSlices,
enum dml_output_format_class pixelFormat,
enum dml_output_encoder_class Output)
{ … }
static dml_uint_t dscComputeDelay(enum dml_output_format_class pixelFormat, enum dml_output_encoder_class Output)
{ … }
static dml_bool_t CalculatePrefetchSchedule(struct display_mode_lib_scratch_st *scratch,
struct CalculatePrefetchSchedule_params_st *p)
{ … }
static void CalculateBytePerPixelAndBlockSizes(
enum dml_source_format_class SourcePixelFormat,
enum dml_swizzle_mode SurfaceTiling,
dml_uint_t *BytePerPixelY,
dml_uint_t *BytePerPixelC,
dml_float_t *BytePerPixelDETY,
dml_float_t *BytePerPixelDETC,
dml_uint_t *BlockHeight256BytesY,
dml_uint_t *BlockHeight256BytesC,
dml_uint_t *BlockWidth256BytesY,
dml_uint_t *BlockWidth256BytesC,
dml_uint_t *MacroTileHeightY,
dml_uint_t *MacroTileHeightC,
dml_uint_t *MacroTileWidthY,
dml_uint_t *MacroTileWidthC)
{ … }
static dml_float_t CalculateTWait(
dml_uint_t PrefetchMode,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange,
dml_bool_t SynchronizeDRRDisplaysForUCLKPStateChangeFinal,
dml_bool_t DRRDisplay,
dml_float_t DRAMClockChangeLatency,
dml_float_t FCLKChangeLatency,
dml_float_t UrgentLatency,
dml_float_t SREnterPlusExitTime)
{ … }
static void CalculatePrefetchMode(
enum dml_prefetch_modes AllowForPStateChangeOrStutterInVBlank,
dml_uint_t *MinPrefetchMode,
dml_uint_t *MaxPrefetchMode)
{ … }
static dml_float_t CalculateWriteBackDISPCLK(
enum dml_source_format_class WritebackPixelFormat,
dml_float_t PixelClock,
dml_float_t WritebackHRatio,
dml_float_t WritebackVRatio,
dml_uint_t WritebackHTaps,
dml_uint_t WritebackVTaps,
dml_uint_t WritebackSourceWidth,
dml_uint_t WritebackDestinationWidth,
dml_uint_t HTotal,
dml_uint_t WritebackLineBufferSize,
dml_float_t DISPCLKDPPCLKVCOSpeed)
{ … }
static dml_float_t CalculateWriteBackDelay(
enum dml_source_format_class WritebackPixelFormat,
dml_float_t WritebackHRatio,
dml_float_t WritebackVRatio,
dml_uint_t WritebackVTaps,
dml_uint_t WritebackDestinationWidth,
dml_uint_t WritebackDestinationHeight,
dml_uint_t WritebackSourceHeight,
dml_uint_t HTotal)
{ … }
static void CalculateVUpdateAndDynamicMetadataParameters(
dml_uint_t MaxInterDCNTileRepeaters,
dml_float_t Dppclk,
dml_float_t Dispclk,
dml_float_t DCFClkDeepSleep,
dml_float_t PixelClock,
dml_uint_t HTotal,
dml_uint_t VBlank,
dml_uint_t DynamicMetadataTransmittedBytes,
dml_uint_t DynamicMetadataLinesBeforeActiveRequired,
dml_uint_t InterlaceEnable,
dml_bool_t ProgressiveToInterlaceUnitInOPP,
dml_float_t *TSetup,
dml_float_t *Tdmbf,
dml_float_t *Tdmec,
dml_float_t *Tdmsks,
dml_uint_t *VUpdateOffsetPix,
dml_uint_t *VUpdateWidthPix,
dml_uint_t *VReadyOffsetPix)
{ … }
static void CalculateRowBandwidth(
dml_bool_t GPUVMEnable,
enum dml_source_format_class SourcePixelFormat,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_bool_t DCCEnable,
dml_float_t LineTime,
dml_uint_t MetaRowByteLuma,
dml_uint_t MetaRowByteChroma,
dml_uint_t meta_row_height_luma,
dml_uint_t meta_row_height_chroma,
dml_uint_t PixelPTEBytesPerRowLuma,
dml_uint_t PixelPTEBytesPerRowChroma,
dml_uint_t dpte_row_height_luma,
dml_uint_t dpte_row_height_chroma,
dml_float_t *meta_row_bw,
dml_float_t *dpte_row_bw)
{ … }
static void CalculateFlipSchedule(
dml_float_t HostVMInefficiencyFactor,
dml_float_t UrgentExtraLatency,
dml_float_t UrgentLatency,
dml_uint_t GPUVMMaxPageTableLevels,
dml_bool_t HostVMEnable,
dml_uint_t HostVMMaxNonCachedPageTableLevels,
dml_bool_t GPUVMEnable,
dml_uint_t HostVMMinPageSize,
dml_float_t PDEAndMetaPTEBytesPerFrame,
dml_float_t MetaRowBytes,
dml_float_t DPTEBytesPerRow,
dml_float_t BandwidthAvailableForImmediateFlip,
dml_uint_t TotImmediateFlipBytes,
enum dml_source_format_class SourcePixelFormat,
dml_float_t LineTime,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_float_t Tno_bw,
dml_bool_t DCCEnable,
dml_uint_t dpte_row_height,
dml_uint_t meta_row_height,
dml_uint_t dpte_row_height_chroma,
dml_uint_t meta_row_height_chroma,
dml_bool_t use_one_row_for_frame_flip,
dml_float_t *DestinationLinesToRequestVMInImmediateFlip,
dml_float_t *DestinationLinesToRequestRowInImmediateFlip,
dml_float_t *final_flip_bw,
dml_bool_t *ImmediateFlipSupportedForPipe)
{ … }
static dml_float_t RoundToDFSGranularity(dml_float_t Clock, dml_bool_t round_up, dml_float_t VCOSpeed)
{ … }
static void CalculateDCCConfiguration(
dml_bool_t DCCEnabled,
dml_bool_t DCCProgrammingAssumesScanDirectionUnknown,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t SurfaceWidthLuma,
dml_uint_t SurfaceWidthChroma,
dml_uint_t SurfaceHeightLuma,
dml_uint_t SurfaceHeightChroma,
dml_uint_t nomDETInKByte,
dml_uint_t RequestHeight256ByteLuma,
dml_uint_t RequestHeight256ByteChroma,
enum dml_swizzle_mode TilingFormat,
dml_uint_t BytePerPixelY,
dml_uint_t BytePerPixelC,
dml_float_t BytePerPixelDETY,
dml_float_t BytePerPixelDETC,
enum dml_rotation_angle SourceScan,
dml_uint_t *MaxUncompressedBlockLuma,
dml_uint_t *MaxUncompressedBlockChroma,
dml_uint_t *MaxCompressedBlockLuma,
dml_uint_t *MaxCompressedBlockChroma,
dml_uint_t *IndependentBlockLuma,
dml_uint_t *IndependentBlockChroma)
{ … }
static dml_uint_t CalculatePrefetchSourceLines(
dml_float_t VRatio,
dml_uint_t VTaps,
dml_bool_t Interlace,
dml_bool_t ProgressiveToInterlaceUnitInOPP,
dml_uint_t SwathHeight,
enum dml_rotation_angle SourceScan,
dml_bool_t ViewportStationary,
dml_uint_t SwathWidth,
dml_uint_t ViewportHeight,
dml_uint_t ViewportXStart,
dml_uint_t ViewportYStart,
dml_uint_t *VInitPreFill,
dml_uint_t *MaxNumSwath)
{ … }
static dml_uint_t CalculateVMAndRowBytes(
dml_bool_t ViewportStationary,
dml_bool_t DCCEnable,
dml_uint_t NumberOfDPPs,
dml_uint_t BlockHeight256Bytes,
dml_uint_t BlockWidth256Bytes,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t SurfaceTiling,
dml_uint_t BytePerPixel,
enum dml_rotation_angle SourceScan,
dml_uint_t SwathWidth,
dml_uint_t ViewportHeight,
dml_uint_t ViewportXStart,
dml_uint_t ViewportYStart,
dml_bool_t GPUVMEnable,
dml_uint_t GPUVMMaxPageTableLevels,
dml_uint_t GPUVMMinPageSizeKBytes,
dml_uint_t PTEBufferSizeInRequests,
dml_uint_t Pitch,
dml_uint_t DCCMetaPitch,
dml_uint_t MacroTileWidth,
dml_uint_t MacroTileHeight,
dml_uint_t *MetaRowByte,
dml_uint_t *PixelPTEBytesPerRow,
dml_uint_t *PixelPTEBytesPerRowStorage,
dml_uint_t *dpte_row_width_ub,
dml_uint_t *dpte_row_height,
dml_uint_t *dpte_row_height_linear,
dml_uint_t *PixelPTEBytesPerRow_one_row_per_frame,
dml_uint_t *dpte_row_width_ub_one_row_per_frame,
dml_uint_t *dpte_row_height_one_row_per_frame,
dml_uint_t *MetaRequestWidth,
dml_uint_t *MetaRequestHeight,
dml_uint_t *meta_row_width,
dml_uint_t *meta_row_height,
dml_uint_t *PixelPTEReqWidth,
dml_uint_t *PixelPTEReqHeight,
dml_uint_t *PTERequestSize,
dml_uint_t *DPDE0BytesFrame,
dml_uint_t *MetaPTEBytesFrame)
{ … }
static void PixelClockAdjustmentForProgressiveToInterlaceUnit(struct dml_display_cfg_st *display_cfg, dml_bool_t ptoi_supported)
{ … }
static dml_float_t TruncToValidBPP(
dml_float_t LinkBitRate,
dml_uint_t Lanes,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_float_t PixelClock,
dml_float_t DesiredBPP,
dml_bool_t DSCEnable,
enum dml_output_encoder_class Output,
enum dml_output_format_class Format,
dml_uint_t DSCInputBitPerComponent,
dml_uint_t DSCSlices,
dml_uint_t AudioRate,
dml_uint_t AudioLayout,
enum dml_odm_mode ODMModeNoDSC,
enum dml_odm_mode ODMModeDSC,
dml_uint_t *RequiredSlots)
{ … }
static void CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(
struct display_mode_lib_scratch_st *scratch,
struct CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport_params_st *p)
{ … }
static void CalculateDCFCLKDeepSleep(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t BytePerPixelY[],
dml_uint_t BytePerPixelC[],
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_uint_t SwathWidthY[],
dml_uint_t SwathWidthC[],
dml_uint_t DPPPerSurface[],
dml_float_t HRatio[],
dml_float_t HRatioChroma[],
dml_float_t PixelClock[],
dml_float_t PSCL_THROUGHPUT[],
dml_float_t PSCL_THROUGHPUT_CHROMA[],
dml_float_t Dppclk[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_uint_t ReturnBusWidth,
dml_float_t *DCFClkDeepSleep)
{ … }
static void CalculateUrgentBurstFactor(
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange,
dml_uint_t swath_width_luma_ub,
dml_uint_t swath_width_chroma_ub,
dml_uint_t SwathHeightY,
dml_uint_t SwathHeightC,
dml_float_t LineTime,
dml_float_t UrgentLatency,
dml_float_t CursorBufferSize,
dml_uint_t CursorWidth,
dml_uint_t CursorBPP,
dml_float_t VRatio,
dml_float_t VRatioC,
dml_float_t BytePerPixelInDETY,
dml_float_t BytePerPixelInDETC,
dml_uint_t DETBufferSizeY,
dml_uint_t DETBufferSizeC,
dml_float_t *UrgentBurstFactorCursor,
dml_float_t *UrgentBurstFactorLuma,
dml_float_t *UrgentBurstFactorChroma,
dml_bool_t *NotEnoughUrgentLatencyHiding)
{ … }
static void CalculatePixelDeliveryTimes(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_float_t VRatioPrefetchY[],
dml_float_t VRatioPrefetchC[],
dml_uint_t swath_width_luma_ub[],
dml_uint_t swath_width_chroma_ub[],
dml_uint_t DPPPerSurface[],
dml_float_t HRatio[],
dml_float_t HRatioChroma[],
dml_float_t PixelClock[],
dml_float_t PSCL_THROUGHPUT[],
dml_float_t PSCL_THROUGHPUT_CHROMA[],
dml_float_t Dppclk[],
dml_uint_t BytePerPixelC[],
enum dml_rotation_angle SourceScan[],
dml_uint_t NumberOfCursors[],
dml_uint_t CursorWidth[],
dml_uint_t CursorBPP[],
dml_uint_t BlockWidth256BytesY[],
dml_uint_t BlockHeight256BytesY[],
dml_uint_t BlockWidth256BytesC[],
dml_uint_t BlockHeight256BytesC[],
dml_float_t DisplayPipeLineDeliveryTimeLuma[],
dml_float_t DisplayPipeLineDeliveryTimeChroma[],
dml_float_t DisplayPipeLineDeliveryTimeLumaPrefetch[],
dml_float_t DisplayPipeLineDeliveryTimeChromaPrefetch[],
dml_float_t DisplayPipeRequestDeliveryTimeLuma[],
dml_float_t DisplayPipeRequestDeliveryTimeChroma[],
dml_float_t DisplayPipeRequestDeliveryTimeLumaPrefetch[],
dml_float_t DisplayPipeRequestDeliveryTimeChromaPrefetch[],
dml_float_t CursorRequestDeliveryTime[],
dml_float_t CursorRequestDeliveryTimePrefetch[])
{ … }
static void CalculateMetaAndPTETimes(
dml_bool_t use_one_row_for_frame[],
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t GPUVMEnable,
dml_uint_t MetaChunkSize,
dml_uint_t MinMetaChunkSizeBytes,
dml_uint_t HTotal[],
dml_float_t VRatio[],
dml_float_t VRatioChroma[],
dml_float_t DestinationLinesToRequestRowInVBlank[],
dml_float_t DestinationLinesToRequestRowInImmediateFlip[],
dml_bool_t DCCEnable[],
dml_float_t PixelClock[],
dml_uint_t BytePerPixelY[],
dml_uint_t BytePerPixelC[],
enum dml_rotation_angle SourceScan[],
dml_uint_t dpte_row_height[],
dml_uint_t dpte_row_height_chroma[],
dml_uint_t meta_row_width[],
dml_uint_t meta_row_width_chroma[],
dml_uint_t meta_row_height[],
dml_uint_t meta_row_height_chroma[],
dml_uint_t meta_req_width[],
dml_uint_t meta_req_width_chroma[],
dml_uint_t meta_req_height[],
dml_uint_t meta_req_height_chroma[],
dml_uint_t dpte_group_bytes[],
dml_uint_t PTERequestSizeY[],
dml_uint_t PTERequestSizeC[],
dml_uint_t PixelPTEReqWidthY[],
dml_uint_t PixelPTEReqHeightY[],
dml_uint_t PixelPTEReqWidthC[],
dml_uint_t PixelPTEReqHeightC[],
dml_uint_t dpte_row_width_luma_ub[],
dml_uint_t dpte_row_width_chroma_ub[],
dml_float_t DST_Y_PER_PTE_ROW_NOM_L[],
dml_float_t DST_Y_PER_PTE_ROW_NOM_C[],
dml_float_t DST_Y_PER_META_ROW_NOM_L[],
dml_float_t DST_Y_PER_META_ROW_NOM_C[],
dml_float_t TimePerMetaChunkNominal[],
dml_float_t TimePerChromaMetaChunkNominal[],
dml_float_t TimePerMetaChunkVBlank[],
dml_float_t TimePerChromaMetaChunkVBlank[],
dml_float_t TimePerMetaChunkFlip[],
dml_float_t TimePerChromaMetaChunkFlip[],
dml_float_t time_per_pte_group_nom_luma[],
dml_float_t time_per_pte_group_vblank_luma[],
dml_float_t time_per_pte_group_flip_luma[],
dml_float_t time_per_pte_group_nom_chroma[],
dml_float_t time_per_pte_group_vblank_chroma[],
dml_float_t time_per_pte_group_flip_chroma[])
{ … }
static void CalculateVMGroupAndRequestTimes(
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t GPUVMEnable,
dml_uint_t GPUVMMaxPageTableLevels,
dml_uint_t HTotal[],
dml_uint_t BytePerPixelC[],
dml_float_t DestinationLinesToRequestVMInVBlank[],
dml_float_t DestinationLinesToRequestVMInImmediateFlip[],
dml_bool_t DCCEnable[],
dml_float_t PixelClock[],
dml_uint_t dpte_row_width_luma_ub[],
dml_uint_t dpte_row_width_chroma_ub[],
dml_uint_t vm_group_bytes[],
dml_uint_t dpde0_bytes_per_frame_ub_l[],
dml_uint_t dpde0_bytes_per_frame_ub_c[],
dml_uint_t meta_pte_bytes_per_frame_ub_l[],
dml_uint_t meta_pte_bytes_per_frame_ub_c[],
dml_float_t TimePerVMGroupVBlank[],
dml_float_t TimePerVMGroupFlip[],
dml_float_t TimePerVMRequestVBlank[],
dml_float_t TimePerVMRequestFlip[])
{ … }
static void CalculateStutterEfficiency(struct display_mode_lib_scratch_st *scratch,
struct CalculateStutterEfficiency_params_st *p)
{ … }
static void CalculateSwathAndDETConfiguration(struct display_mode_lib_scratch_st *scratch,
struct CalculateSwathAndDETConfiguration_params_st *p)
{ … }
static void CalculateSwathWidth(
dml_bool_t ForceSingleDPP,
dml_uint_t NumberOfActiveSurfaces,
enum dml_source_format_class SourcePixelFormat[],
enum dml_rotation_angle SourceScan[],
dml_bool_t ViewportStationary[],
dml_uint_t ViewportWidth[],
dml_uint_t ViewportHeight[],
dml_uint_t ViewportXStart[],
dml_uint_t ViewportYStart[],
dml_uint_t ViewportXStartC[],
dml_uint_t ViewportYStartC[],
dml_uint_t SurfaceWidthY[],
dml_uint_t SurfaceWidthC[],
dml_uint_t SurfaceHeightY[],
dml_uint_t SurfaceHeightC[],
enum dml_odm_mode ODMMode[],
dml_uint_t BytePerPixY[],
dml_uint_t BytePerPixC[],
dml_uint_t Read256BytesBlockHeightY[],
dml_uint_t Read256BytesBlockHeightC[],
dml_uint_t Read256BytesBlockWidthY[],
dml_uint_t Read256BytesBlockWidthC[],
dml_uint_t BlendingAndTiming[],
dml_uint_t HActive[],
dml_float_t HRatio[],
dml_uint_t DPPPerSurface[],
dml_uint_t SwathWidthSingleDPPY[],
dml_uint_t SwathWidthSingleDPPC[],
dml_uint_t SwathWidthY[],
dml_uint_t SwathWidthC[],
dml_uint_t MaximumSwathHeightY[],
dml_uint_t MaximumSwathHeightC[],
dml_uint_t swath_width_luma_ub[],
dml_uint_t swath_width_chroma_ub[])
{ … }
static dml_float_t CalculateExtraLatency(
dml_uint_t RoundTripPingLatencyCycles,
dml_uint_t ReorderingBytes,
dml_float_t DCFCLK,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t PixelChunkSizeInKByte,
dml_uint_t TotalNumberOfDCCActiveDPP,
dml_uint_t MetaChunkSize,
dml_float_t ReturnBW,
dml_bool_t GPUVMEnable,
dml_bool_t HostVMEnable,
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t NumberOfDPP[],
dml_uint_t dpte_group_bytes[],
dml_float_t HostVMInefficiencyFactor,
dml_uint_t HostVMMinPageSize,
dml_uint_t HostVMMaxNonCachedPageTableLevels)
{ … }
static dml_uint_t CalculateHostVMDynamicLevels(
dml_bool_t GPUVMEnable,
dml_bool_t HostVMEnable,
dml_uint_t HostVMMinPageSize,
dml_uint_t HostVMMaxNonCachedPageTableLevels)
{ … }
static dml_uint_t CalculateExtraLatencyBytes(dml_uint_t ReorderingBytes,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t PixelChunkSizeInKByte,
dml_uint_t TotalNumberOfDCCActiveDPP,
dml_uint_t MetaChunkSize,
dml_bool_t GPUVMEnable,
dml_bool_t HostVMEnable,
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t NumberOfDPP[],
dml_uint_t dpte_group_bytes[],
dml_float_t HostVMInefficiencyFactor,
dml_uint_t HostVMMinPageSize,
dml_uint_t HostVMMaxNonCachedPageTableLevels)
{ … }
static dml_float_t CalculateUrgentLatency(
dml_float_t UrgentLatencyPixelDataOnly,
dml_float_t UrgentLatencyPixelMixedWithVMData,
dml_float_t UrgentLatencyVMDataOnly,
dml_bool_t DoUrgentLatencyAdjustment,
dml_float_t UrgentLatencyAdjustmentFabricClockComponent,
dml_float_t UrgentLatencyAdjustmentFabricClockReference,
dml_float_t FabricClock)
{ … }
static dml_float_t RequiredDTBCLK(
dml_bool_t DSCEnable,
dml_float_t PixelClock,
enum dml_output_format_class OutputFormat,
dml_float_t OutputBpp,
dml_uint_t DSCSlices,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_uint_t AudioRate,
dml_uint_t AudioLayout)
{ … }
static void UseMinimumDCFCLK(struct display_mode_lib_scratch_st *scratch, struct UseMinimumDCFCLK_params_st *p)
{ … }
static dml_bool_t UnboundedRequest(enum dml_unbounded_requesting_policy UseUnboundedRequestingFinal,
dml_uint_t TotalNumberOfActiveDPP,
dml_bool_t NoChromaOrLinear,
enum dml_output_encoder_class Output)
{ … }
static void CalculateSurfaceSizeInMall(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t MALLAllocatedForDCN,
enum dml_use_mall_for_static_screen_mode UseMALLForStaticScreen[],
dml_bool_t DCCEnable[],
dml_bool_t ViewportStationary[],
dml_uint_t ViewportXStartY[],
dml_uint_t ViewportYStartY[],
dml_uint_t ViewportXStartC[],
dml_uint_t ViewportYStartC[],
dml_uint_t ViewportWidthY[],
dml_uint_t ViewportHeightY[],
dml_uint_t BytesPerPixelY[],
dml_uint_t ViewportWidthC[],
dml_uint_t ViewportHeightC[],
dml_uint_t BytesPerPixelC[],
dml_uint_t SurfaceWidthY[],
dml_uint_t SurfaceWidthC[],
dml_uint_t SurfaceHeightY[],
dml_uint_t SurfaceHeightC[],
dml_uint_t Read256BytesBlockWidthY[],
dml_uint_t Read256BytesBlockWidthC[],
dml_uint_t Read256BytesBlockHeightY[],
dml_uint_t Read256BytesBlockHeightC[],
dml_uint_t ReadBlockWidthY[],
dml_uint_t ReadBlockWidthC[],
dml_uint_t ReadBlockHeightY[],
dml_uint_t ReadBlockHeightC[],
dml_uint_t SurfaceSizeInMALL[],
dml_bool_t *ExceededMALLSize)
{ … }
static void CalculateDETBufferSize(
dml_uint_t DETSizeOverride[],
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
dml_bool_t ForceSingleDPP,
dml_uint_t NumberOfActiveSurfaces,
dml_bool_t UnboundedRequestEnabled,
dml_uint_t nomDETInKByte,
dml_uint_t MaxTotalDETInKByte,
dml_uint_t ConfigReturnBufferSizeInKByte,
dml_uint_t MinCompressedBufferSizeInKByte,
dml_uint_t ConfigReturnBufferSegmentSizeInkByte,
dml_uint_t CompressedBufferSegmentSizeInkByteFinal,
enum dml_source_format_class SourcePixelFormat[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_uint_t RoundedUpMaxSwathSizeBytesY[],
dml_uint_t RoundedUpMaxSwathSizeBytesC[],
dml_uint_t DPPPerSurface[],
dml_uint_t DETBufferSizeInKByte[],
dml_uint_t *CompressedBufferSizeInkByte)
{ … }
static void CalculateMaxDETAndMinCompressedBufferSize(
dml_uint_t ConfigReturnBufferSizeInKByte,
dml_uint_t ConfigReturnBufferSegmentSizeInKByte,
dml_uint_t ROBBufferSizeInKByte,
dml_uint_t MaxNumDPP,
dml_bool_t nomDETInKByteOverrideEnable,
dml_uint_t nomDETInKByteOverrideValue,
dml_uint_t *MaxTotalDETInKByte,
dml_uint_t *nomDETInKByte,
dml_uint_t *MinCompressedBufferSizeInKByte)
{ … }
static void CalculateVMRowAndSwath(struct display_mode_lib_scratch_st *scratch,
struct CalculateVMRowAndSwath_params_st *p)
{ … }
static void CalculateOutputLink(
dml_float_t PHYCLKPerState,
dml_float_t PHYCLKD18PerState,
dml_float_t PHYCLKD32PerState,
dml_float_t Downspreading,
dml_bool_t IsMainSurfaceUsingTheIndicatedTiming,
enum dml_output_encoder_class Output,
enum dml_output_format_class OutputFormat,
dml_uint_t HTotal,
dml_uint_t HActive,
dml_float_t PixelClockBackEnd,
dml_float_t ForcedOutputLinkBPP,
dml_uint_t DSCInputBitPerComponent,
dml_uint_t NumberOfDSCSlices,
dml_float_t AudioSampleRate,
dml_uint_t AudioSampleLayout,
enum dml_odm_mode ODMModeNoDSC,
enum dml_odm_mode ODMModeDSC,
enum dml_dsc_enable DSCEnable,
dml_uint_t OutputLinkDPLanes,
enum dml_output_link_dp_rate OutputLinkDPRate,
dml_bool_t *RequiresDSC,
dml_bool_t *RequiresFEC,
dml_float_t *OutBpp,
enum dml_output_type_and_rate__type *OutputType,
enum dml_output_type_and_rate__rate *OutputRate,
dml_uint_t *RequiredSlots)
{ … }
static void CalculateODMMode(
dml_uint_t MaximumPixelsPerLinePerDSCUnit,
dml_uint_t HActive,
enum dml_output_encoder_class Output,
enum dml_output_format_class OutputFormat,
enum dml_odm_use_policy ODMUse,
dml_float_t StateDispclk,
dml_float_t MaxDispclk,
dml_bool_t DSCEnable,
dml_uint_t TotalNumberOfActiveDPP,
dml_uint_t MaxNumDPP,
dml_float_t PixelClock,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKRampingMargin,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_uint_t NumberOfDSCSlices,
dml_bool_t *TotalAvailablePipesSupport,
dml_uint_t *NumberOfDPP,
enum dml_odm_mode *ODMMode,
dml_float_t *RequiredDISPCLKPerSurface)
{ … }
static dml_float_t CalculateRequiredDispclk(
enum dml_odm_mode ODMMode,
dml_float_t PixelClock,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKRampingMargin,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_float_t MaxDispclk)
{ … }
static void CalculateSinglePipeDPPCLKAndSCLThroughput(
dml_float_t HRatio,
dml_float_t HRatioChroma,
dml_float_t VRatio,
dml_float_t VRatioChroma,
dml_float_t MaxDCHUBToPSCLThroughput,
dml_float_t MaxPSCLToLBThroughput,
dml_float_t PixelClock,
enum dml_source_format_class SourcePixelFormat,
dml_uint_t HTaps,
dml_uint_t HTapsChroma,
dml_uint_t VTaps,
dml_uint_t VTapsChroma,
dml_float_t *PSCL_THROUGHPUT,
dml_float_t *PSCL_THROUGHPUT_CHROMA,
dml_float_t *DPPCLKUsingSingleDPP)
{ … }
static void CalculateDPPCLK(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t DISPCLKDPPCLKDSCCLKDownSpreading,
dml_float_t DISPCLKDPPCLKVCOSpeed,
dml_float_t DPPCLKUsingSingleDPP[],
dml_uint_t DPPPerSurface[],
dml_float_t *GlobalDPPCLK,
dml_float_t Dppclk[])
{ … }
static void CalculateMALLUseForStaticScreen(
dml_uint_t NumberOfActiveSurfaces,
dml_uint_t MALLAllocatedForDCNFinal,
enum dml_use_mall_for_static_screen_mode *UseMALLForStaticScreen,
dml_uint_t SurfaceSizeInMALL[],
dml_bool_t one_row_per_frame_fits_in_buffer[],
dml_bool_t UsesMALLForStaticScreen[])
{ … }
dml_float_t dml_get_return_bw_mbps_vm_only(
const struct soc_bounding_box_st *soc,
dml_bool_t use_ideal_dram_bw_strobe,
dml_bool_t HostVMEnable,
dml_float_t DCFCLK,
dml_float_t FabricClock,
dml_float_t DRAMSpeed)
{ … }
dml_float_t dml_get_return_bw_mbps(
const struct soc_bounding_box_st *soc,
dml_bool_t use_ideal_dram_bw_strobe,
dml_bool_t HostVMEnable,
dml_float_t DCFCLK,
dml_float_t FabricClock,
dml_float_t DRAMSpeed)
{ … }
static dml_float_t dml_get_return_dram_bw_mbps(
const struct soc_bounding_box_st *soc,
dml_bool_t use_ideal_dram_bw_strobe,
dml_bool_t HostVMEnable,
dml_float_t DRAMSpeed)
{ … }
static dml_uint_t DSCDelayRequirement(
dml_bool_t DSCEnabled,
enum dml_odm_mode ODMMode,
dml_uint_t DSCInputBitPerComponent,
dml_float_t OutputBpp,
dml_uint_t HActive,
dml_uint_t HTotal,
dml_uint_t NumberOfDSCSlices,
enum dml_output_format_class OutputFormat,
enum dml_output_encoder_class Output,
dml_float_t PixelClock,
dml_float_t PixelClockBackEnd)
{ … }
static dml_bool_t CalculateVActiveBandwithSupport(dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
dml_bool_t NotUrgentLatencyHiding[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[])
{ … }
static void CalculatePrefetchBandwithSupport(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
dml_bool_t NotUrgentLatencyHiding[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_float_t cursor_bw_pre[],
dml_float_t prefetch_vmrow_bw[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[],
dml_float_t *PrefetchBandwidth,
dml_float_t *PrefetchBandwidthNotIncludingMALLPrefetch,
dml_float_t *FractionOfUrgentBandwidth,
dml_bool_t *PrefetchBandwidthSupport)
{ … }
static dml_float_t CalculateBandwidthAvailableForImmediateFlip(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t cursor_bw_pre[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[])
{ … }
static void CalculateImmediateFlipBandwithSupport(
dml_uint_t NumberOfActiveSurfaces,
dml_float_t ReturnBW,
enum dml_use_mall_for_pstate_change_mode UseMALLForPStateChange[],
enum dml_immediate_flip_requirement ImmediateFlipRequirement[],
dml_float_t final_flip_bw[],
dml_float_t ReadBandwidthLuma[],
dml_float_t ReadBandwidthChroma[],
dml_float_t PrefetchBandwidthLuma[],
dml_float_t PrefetchBandwidthChroma[],
dml_float_t cursor_bw[],
dml_float_t meta_row_bandwidth[],
dml_float_t dpte_row_bandwidth[],
dml_float_t cursor_bw_pre[],
dml_float_t prefetch_vmrow_bw[],
dml_uint_t NumberOfDPP[],
dml_float_t UrgentBurstFactorLuma[],
dml_float_t UrgentBurstFactorChroma[],
dml_float_t UrgentBurstFactorCursor[],
dml_float_t UrgentBurstFactorLumaPre[],
dml_float_t UrgentBurstFactorChromaPre[],
dml_float_t UrgentBurstFactorCursorPre[],
dml_float_t *TotalBandwidth,
dml_float_t *TotalBandwidthNotIncludingMALLPrefetch,
dml_float_t *FractionOfUrgentBandwidth,
dml_bool_t *ImmediateFlipBandwidthSupport)
{ … }
static dml_uint_t MicroSecToVertLines(dml_uint_t num_us, dml_uint_t h_total, dml_float_t pixel_clock)
{ … }
static dml_uint_t CalculateMaxVStartup(
dml_uint_t plane_idx,
dml_bool_t ptoi_supported,
dml_uint_t vblank_nom_default_us,
struct dml_timing_cfg_st *timing,
dml_float_t write_back_delay_us)
{ … }
static void set_calculate_prefetch_schedule_params(struct display_mode_lib_st *mode_lib,
struct CalculatePrefetchSchedule_params_st *CalculatePrefetchSchedule_params,
dml_uint_t j,
dml_uint_t k)
{ … }
static void dml_prefetch_check(struct display_mode_lib_st *mode_lib)
{ … }
dml_bool_t dml_core_mode_support(struct display_mode_lib_st *mode_lib)
{ … }
void dml_core_mode_support_partial(struct display_mode_lib_st *mode_lib)
{ … }
void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struct dml_clk_cfg_st *clk_cfg)
{ … }
void dml_core_get_row_heights(
dml_uint_t *dpte_row_height,
dml_uint_t *meta_row_height,
const struct display_mode_lib_st *mode_lib,
dml_bool_t is_plane1,
enum dml_source_format_class SourcePixelFormat,
enum dml_swizzle_mode SurfaceTiling,
enum dml_rotation_angle ScanDirection,
dml_uint_t pitch,
dml_uint_t GPUVMMinPageSizeKBytes)
{ … }
static struct soc_state_bounding_box_st dml_get_soc_state_bounding_box(
const struct soc_states_st *states,
dml_uint_t state_idx)
{ … }
static void cache_ip_soc_cfg(struct display_mode_lib_st *mode_lib,
dml_uint_t state_idx)
{ … }
static void cache_display_cfg(struct display_mode_lib_st *mode_lib,
const struct dml_display_cfg_st *display_cfg)
{ … }
static void fetch_socbb_params(struct display_mode_lib_st *mode_lib)
{ … }
dml_bool_t dml_mode_support(
struct display_mode_lib_st *mode_lib,
dml_uint_t state_idx,
const struct dml_display_cfg_st *display_cfg)
{ … }
dml_bool_t dml_mode_programming(
struct display_mode_lib_st *mode_lib,
dml_uint_t state_idx,
const struct dml_display_cfg_st *display_cfg,
bool call_standalone)
{ … }
static dml_uint_t mode_support_pwr_states(
dml_uint_t *lowest_state_idx,
struct display_mode_lib_st *mode_lib,
const struct dml_display_cfg_st *display_cfg,
dml_uint_t start_state_idx,
dml_uint_t end_state_idx)
{ … }
dml_uint_t dml_mode_support_ex(struct dml_mode_support_ex_params_st *in_out_params)
{ … }
dml_bool_t dml_get_is_phantom_pipe(struct display_mode_lib_st *mode_lib, dml_uint_t pipe_idx)
{ … }
#define dml_get_per_surface_var_func(variable, type, interval_var) …
#define dml_get_var_func(var, type, internal_var) …
dml_get_var_func(wm_urgent, dml_float_t, mode_lib->mp.Watermark.UrgentWatermark);
dml_get_var_func(wm_stutter_exit, dml_float_t, mode_lib->mp.Watermark.StutterExitWatermark);
dml_get_var_func(wm_stutter_enter_exit, dml_float_t, mode_lib->mp.Watermark.StutterEnterPlusExitWatermark);
dml_get_var_func(wm_memory_trip, dml_float_t, mode_lib->mp.UrgentLatency);
dml_get_var_func(wm_fclk_change, dml_float_t, mode_lib->mp.Watermark.FCLKChangeWatermark);
dml_get_var_func(wm_usr_retraining, dml_float_t, mode_lib->mp.Watermark.USRRetrainingWatermark);
dml_get_var_func(wm_dram_clock_change, dml_float_t, mode_lib->mp.Watermark.DRAMClockChangeWatermark);
dml_get_var_func(wm_z8_stutter_enter_exit, dml_float_t, mode_lib->mp.Watermark.Z8StutterEnterPlusExitWatermark);
dml_get_var_func(wm_z8_stutter, dml_float_t, mode_lib->mp.Watermark.Z8StutterExitWatermark);
dml_get_var_func(fraction_of_urgent_bandwidth, dml_float_t, mode_lib->mp.FractionOfUrgentBandwidth);
dml_get_var_func(fraction_of_urgent_bandwidth_imm_flip, dml_float_t, mode_lib->mp.FractionOfUrgentBandwidthImmediateFlip);
dml_get_var_func(urgent_latency, dml_float_t, mode_lib->mp.UrgentLatency);
dml_get_var_func(clk_dcf_deepsleep, dml_float_t, mode_lib->mp.DCFCLKDeepSleep);
dml_get_var_func(wm_writeback_dram_clock_change, dml_float_t, mode_lib->mp.Watermark.WritebackDRAMClockChangeWatermark);
dml_get_var_func(wm_writeback_urgent, dml_float_t, mode_lib->mp.Watermark.WritebackUrgentWatermark);
dml_get_var_func(stutter_efficiency, dml_float_t, mode_lib->mp.StutterEfficiency);
dml_get_var_func(stutter_efficiency_no_vblank, dml_float_t, mode_lib->mp.StutterEfficiencyNotIncludingVBlank);
dml_get_var_func(stutter_efficiency_z8, dml_float_t, mode_lib->mp.Z8StutterEfficiency);
dml_get_var_func(stutter_num_bursts_z8, dml_float_t, mode_lib->mp.Z8NumberOfStutterBurstsPerFrame);
dml_get_var_func(stutter_period, dml_float_t, mode_lib->mp.StutterPeriod);
dml_get_var_func(stutter_efficiency_z8_bestcase, dml_float_t, mode_lib->mp.Z8StutterEfficiencyBestCase);
dml_get_var_func(stutter_num_bursts_z8_bestcase, dml_float_t, mode_lib->mp.Z8NumberOfStutterBurstsPerFrameBestCase);
dml_get_var_func(stutter_period_bestcase, dml_float_t, mode_lib->mp.StutterPeriodBestCase);
dml_get_var_func(urgent_extra_latency, dml_float_t, mode_lib->mp.UrgentExtraLatency);
dml_get_var_func(fclk_change_latency, dml_float_t, mode_lib->mp.MaxActiveFCLKChangeLatencySupported);
dml_get_var_func(dispclk_calculated, dml_float_t, mode_lib->mp.Dispclk_calculated);
dml_get_var_func(total_data_read_bw, dml_float_t, mode_lib->mp.TotalDataReadBandwidth);
dml_get_var_func(return_bw, dml_float_t, mode_lib->ms.ReturnBW);
dml_get_var_func(return_dram_bw, dml_float_t, mode_lib->ms.ReturnDRAMBW);
dml_get_var_func(tcalc, dml_float_t, mode_lib->mp.TCalc);
dml_get_var_func(comp_buffer_size_kbytes, dml_uint_t, mode_lib->mp.CompressedBufferSizeInkByte);
dml_get_var_func(pixel_chunk_size_in_kbyte, dml_uint_t, mode_lib->ms.ip.pixel_chunk_size_kbytes);
dml_get_var_func(alpha_pixel_chunk_size_in_kbyte, dml_uint_t, mode_lib->ms.ip.alpha_pixel_chunk_size_kbytes);
dml_get_var_func(meta_chunk_size_in_kbyte, dml_uint_t, mode_lib->ms.ip.meta_chunk_size_kbytes);
dml_get_var_func(min_pixel_chunk_size_in_byte, dml_uint_t, mode_lib->ms.ip.min_pixel_chunk_size_bytes);
dml_get_var_func(min_meta_chunk_size_in_byte, dml_uint_t, mode_lib->ms.ip.min_meta_chunk_size_bytes);
dml_get_var_func(total_immediate_flip_bytes, dml_uint_t, mode_lib->mp.TotImmediateFlipBytes);
dml_get_per_surface_var_func(dsc_delay, dml_uint_t, mode_lib->mp.DSCDelay);
dml_get_per_surface_var_func(dppclk_calculated, dml_float_t, mode_lib->mp.Dppclk_calculated);
dml_get_per_surface_var_func(dscclk_calculated, dml_float_t, mode_lib->mp.DSCCLK_calculated);
dml_get_per_surface_var_func(min_ttu_vblank_in_us, dml_float_t, mode_lib->mp.MinTTUVBlank);
dml_get_per_surface_var_func(vratio_prefetch_l, dml_float_t, mode_lib->mp.VRatioPrefetchY);
dml_get_per_surface_var_func(vratio_prefetch_c, dml_float_t, mode_lib->mp.VRatioPrefetchC);
dml_get_per_surface_var_func(dst_x_after_scaler, dml_uint_t, mode_lib->mp.DSTXAfterScaler);
dml_get_per_surface_var_func(dst_y_after_scaler, dml_uint_t, mode_lib->mp.DSTYAfterScaler);
dml_get_per_surface_var_func(dst_y_per_vm_vblank, dml_float_t, mode_lib->mp.DestinationLinesToRequestVMInVBlank);
dml_get_per_surface_var_func(dst_y_per_row_vblank, dml_float_t, mode_lib->mp.DestinationLinesToRequestRowInVBlank);
dml_get_per_surface_var_func(dst_y_prefetch, dml_float_t, mode_lib->mp.DestinationLinesForPrefetch);
dml_get_per_surface_var_func(dst_y_per_vm_flip, dml_float_t, mode_lib->mp.DestinationLinesToRequestVMInImmediateFlip);
dml_get_per_surface_var_func(dst_y_per_row_flip, dml_float_t, mode_lib->mp.DestinationLinesToRequestRowInImmediateFlip);
dml_get_per_surface_var_func(dst_y_per_pte_row_nom_l, dml_float_t, mode_lib->mp.DST_Y_PER_PTE_ROW_NOM_L);
dml_get_per_surface_var_func(dst_y_per_pte_row_nom_c, dml_float_t, mode_lib->mp.DST_Y_PER_PTE_ROW_NOM_C);
dml_get_per_surface_var_func(dst_y_per_meta_row_nom_l, dml_float_t, mode_lib->mp.DST_Y_PER_META_ROW_NOM_L);
dml_get_per_surface_var_func(dst_y_per_meta_row_nom_c, dml_float_t, mode_lib->mp.DST_Y_PER_META_ROW_NOM_C);
dml_get_per_surface_var_func(refcyc_per_vm_group_vblank_in_us, dml_float_t, mode_lib->mp.TimePerVMGroupVBlank);
dml_get_per_surface_var_func(refcyc_per_vm_group_flip_in_us, dml_float_t, mode_lib->mp.TimePerVMGroupFlip);
dml_get_per_surface_var_func(refcyc_per_vm_req_vblank_in_us, dml_float_t, mode_lib->mp.TimePerVMRequestVBlank);
dml_get_per_surface_var_func(refcyc_per_vm_req_flip_in_us, dml_float_t, mode_lib->mp.TimePerVMRequestFlip);
dml_get_per_surface_var_func(refcyc_per_vm_dmdata_in_us, dml_float_t, mode_lib->mp.Tdmdl_vm);
dml_get_per_surface_var_func(dmdata_dl_delta_in_us, dml_float_t, mode_lib->mp.Tdmdl);
dml_get_per_surface_var_func(refcyc_per_line_delivery_l_in_us, dml_float_t, mode_lib->mp.DisplayPipeLineDeliveryTimeLuma);
dml_get_per_surface_var_func(refcyc_per_line_delivery_c_in_us, dml_float_t, mode_lib->mp.DisplayPipeLineDeliveryTimeChroma);
dml_get_per_surface_var_func(refcyc_per_line_delivery_pre_l_in_us, dml_float_t, mode_lib->mp.DisplayPipeLineDeliveryTimeLumaPrefetch);
dml_get_per_surface_var_func(refcyc_per_line_delivery_pre_c_in_us, dml_float_t, mode_lib->mp.DisplayPipeLineDeliveryTimeChromaPrefetch);
dml_get_per_surface_var_func(refcyc_per_req_delivery_l_in_us, dml_float_t, mode_lib->mp.DisplayPipeRequestDeliveryTimeLuma);
dml_get_per_surface_var_func(refcyc_per_req_delivery_c_in_us, dml_float_t, mode_lib->mp.DisplayPipeRequestDeliveryTimeChroma);
dml_get_per_surface_var_func(refcyc_per_req_delivery_pre_l_in_us, dml_float_t, mode_lib->mp.DisplayPipeRequestDeliveryTimeLumaPrefetch);
dml_get_per_surface_var_func(refcyc_per_req_delivery_pre_c_in_us, dml_float_t, mode_lib->mp.DisplayPipeRequestDeliveryTimeChromaPrefetch);
dml_get_per_surface_var_func(refcyc_per_cursor_req_delivery_in_us, dml_float_t, mode_lib->mp.CursorRequestDeliveryTime);
dml_get_per_surface_var_func(refcyc_per_cursor_req_delivery_pre_in_us, dml_float_t, mode_lib->mp.CursorRequestDeliveryTimePrefetch);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_nom_l_in_us, dml_float_t, mode_lib->mp.TimePerMetaChunkNominal);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_nom_c_in_us, dml_float_t, mode_lib->mp.TimePerChromaMetaChunkNominal);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_vblank_l_in_us, dml_float_t, mode_lib->mp.TimePerMetaChunkVBlank);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_vblank_c_in_us, dml_float_t, mode_lib->mp.TimePerChromaMetaChunkVBlank);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_flip_l_in_us, dml_float_t, mode_lib->mp.TimePerMetaChunkFlip);
dml_get_per_surface_var_func(refcyc_per_meta_chunk_flip_c_in_us, dml_float_t, mode_lib->mp.TimePerChromaMetaChunkFlip);
dml_get_per_surface_var_func(refcyc_per_pte_group_nom_l_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_nom_luma);
dml_get_per_surface_var_func(refcyc_per_pte_group_nom_c_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_nom_chroma);
dml_get_per_surface_var_func(refcyc_per_pte_group_vblank_l_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_vblank_luma);
dml_get_per_surface_var_func(refcyc_per_pte_group_vblank_c_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_vblank_chroma);
dml_get_per_surface_var_func(refcyc_per_pte_group_flip_l_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_flip_luma);
dml_get_per_surface_var_func(refcyc_per_pte_group_flip_c_in_us, dml_float_t, mode_lib->mp.time_per_pte_group_flip_chroma);
dml_get_per_surface_var_func(dpte_group_size_in_bytes, dml_uint_t, mode_lib->mp.dpte_group_bytes);
dml_get_per_surface_var_func(vm_group_size_in_bytes, dml_uint_t, mode_lib->mp.vm_group_bytes);
dml_get_per_surface_var_func(swath_height_l, dml_uint_t, mode_lib->ms.SwathHeightY);
dml_get_per_surface_var_func(swath_height_c, dml_uint_t, mode_lib->ms.SwathHeightC);
dml_get_per_surface_var_func(dpte_row_height_l, dml_uint_t, mode_lib->mp.dpte_row_height);
dml_get_per_surface_var_func(dpte_row_height_c, dml_uint_t, mode_lib->mp.dpte_row_height_chroma);
dml_get_per_surface_var_func(dpte_row_height_linear_l, dml_uint_t, mode_lib->mp.dpte_row_height_linear);
dml_get_per_surface_var_func(dpte_row_height_linear_c, dml_uint_t, mode_lib->mp.dpte_row_height_linear_chroma);
dml_get_per_surface_var_func(meta_row_height_l, dml_uint_t, mode_lib->mp.meta_row_height);
dml_get_per_surface_var_func(meta_row_height_c, dml_uint_t, mode_lib->mp.meta_row_height_chroma);
dml_get_per_surface_var_func(vstartup_calculated, dml_uint_t, mode_lib->mp.VStartup);
dml_get_per_surface_var_func(vupdate_offset, dml_uint_t, mode_lib->mp.VUpdateOffsetPix);
dml_get_per_surface_var_func(vupdate_width, dml_uint_t, mode_lib->mp.VUpdateWidthPix);
dml_get_per_surface_var_func(vready_offset, dml_uint_t, mode_lib->mp.VReadyOffsetPix);
dml_get_per_surface_var_func(vready_at_or_after_vsync, dml_uint_t, mode_lib->mp.VREADY_AT_OR_AFTER_VSYNC);
dml_get_per_surface_var_func(min_dst_y_next_start, dml_uint_t, mode_lib->mp.MIN_DST_Y_NEXT_START);
dml_get_per_surface_var_func(det_stored_buffer_size_l_bytes, dml_uint_t, mode_lib->ms.DETBufferSizeY);
dml_get_per_surface_var_func(det_stored_buffer_size_c_bytes, dml_uint_t, mode_lib->ms.DETBufferSizeC);
dml_get_per_surface_var_func(use_mall_for_static_screen, dml_uint_t, mode_lib->mp.UsesMALLForStaticScreen);
dml_get_per_surface_var_func(surface_size_for_mall, dml_uint_t, mode_lib->mp.SurfaceSizeInTheMALL);
dml_get_per_surface_var_func(dcc_max_uncompressed_block_l, dml_uint_t, mode_lib->mp.DCCYMaxUncompressedBlock);
dml_get_per_surface_var_func(dcc_max_compressed_block_l, dml_uint_t, mode_lib->mp.DCCYMaxCompressedBlock);
dml_get_per_surface_var_func(dcc_independent_block_l, dml_uint_t, mode_lib->mp.DCCYIndependentBlock);
dml_get_per_surface_var_func(dcc_max_uncompressed_block_c, dml_uint_t, mode_lib->mp.DCCCMaxUncompressedBlock);
dml_get_per_surface_var_func(dcc_max_compressed_block_c, dml_uint_t, mode_lib->mp.DCCCMaxCompressedBlock);
dml_get_per_surface_var_func(dcc_independent_block_c, dml_uint_t, mode_lib->mp.DCCCIndependentBlock);
dml_get_per_surface_var_func(max_active_dram_clock_change_latency_supported, dml_uint_t, mode_lib->mp.MaxActiveDRAMClockChangeLatencySupported);
dml_get_per_surface_var_func(pte_buffer_mode, dml_uint_t, mode_lib->mp.PTE_BUFFER_MODE);
dml_get_per_surface_var_func(bigk_fragment_size, dml_uint_t, mode_lib->mp.BIGK_FRAGMENT_SIZE);
dml_get_per_surface_var_func(dpte_bytes_per_row, dml_uint_t, mode_lib->mp.PixelPTEBytesPerRow);
dml_get_per_surface_var_func(meta_bytes_per_row, dml_uint_t, mode_lib->mp.MetaRowByte);
dml_get_per_surface_var_func(det_buffer_size_kbytes, dml_uint_t, mode_lib->ms.DETBufferSizeInKByte);