1 /* 2 * Copyright 2022 Advanced Micro Devices, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 * 22 * Authors: AMD 23 * 24 */ 25 26 #ifndef __DML_DCN32_DISPLAY_MODE_VBA_UTIL_32_H__ 27 #define __DML_DCN32_DISPLAY_MODE_VBA_UTIL_32_H__ 28 29 #include "../display_mode_enums.h" 30 #include "os_types.h" 31 #include "../dc_features.h" 32 #include "../display_mode_structs.h" 33 #include "../display_mode_vba.h" 34 35 unsigned int dml32_dscceComputeDelay( 36 unsigned int bpc, 37 double BPP, 38 unsigned int sliceWidth, 39 unsigned int numSlices, 40 enum output_format_class pixelFormat, 41 enum output_encoder_class Output); 42 43 unsigned int dml32_dscComputeDelay(enum output_format_class pixelFormat, enum output_encoder_class Output); 44 45 bool IsVertical(enum dm_rotation_angle Scan); 46 47 void dml32_CalculateBytePerPixelAndBlockSizes( 48 enum source_format_class SourcePixelFormat, 49 enum dm_swizzle_mode SurfaceTiling, 50 51 /*Output*/ 52 unsigned int *BytePerPixelY, 53 unsigned int *BytePerPixelC, 54 double *BytePerPixelDETY, 55 double *BytePerPixelDETC, 56 unsigned int *BlockHeight256BytesY, 57 unsigned int *BlockHeight256BytesC, 58 unsigned int *BlockWidth256BytesY, 59 unsigned int *BlockWidth256BytesC, 60 unsigned int *MacroTileHeightY, 61 unsigned int *MacroTileHeightC, 62 unsigned int *MacroTileWidthY, 63 unsigned int *MacroTileWidthC); 64 65 void dml32_CalculateSinglePipeDPPCLKAndSCLThroughput( 66 double HRatio, 67 double HRatioChroma, 68 double VRatio, 69 double VRatioChroma, 70 double MaxDCHUBToPSCLThroughput, 71 double MaxPSCLToLBThroughput, 72 double PixelClock, 73 enum source_format_class SourcePixelFormat, 74 unsigned int HTaps, 75 unsigned int HTapsChroma, 76 unsigned int VTaps, 77 unsigned int VTapsChroma, 78 79 /* output */ 80 double *PSCL_THROUGHPUT, 81 double *PSCL_THROUGHPUT_CHROMA, 82 double *DPPCLKUsingSingleDPP); 83 84 void dml32_CalculateSwathAndDETConfiguration( 85 unsigned int DETSizeOverride[], 86 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange[], 87 unsigned int ConfigReturnBufferSizeInKByte, 88 unsigned int MaxTotalDETInKByte, 89 unsigned int MinCompressedBufferSizeInKByte, 90 double ForceSingleDPP, 91 unsigned int NumberOfActiveSurfaces, 92 unsigned int nomDETInKByte, 93 enum unbounded_requesting_policy UseUnboundedRequestingFinal, 94 bool DisableUnboundRequestIfCompBufReservedSpaceNeedAdjustment, 95 unsigned int PixelChunkSizeKBytes, 96 unsigned int ROBSizeKBytes, 97 unsigned int CompressedBufferSegmentSizeInkByteFinal, 98 enum output_encoder_class Output[], 99 double ReadBandwidthLuma[], 100 double ReadBandwidthChroma[], 101 double MaximumSwathWidthLuma[], 102 double MaximumSwathWidthChroma[], 103 enum dm_rotation_angle SourceRotation[], 104 bool ViewportStationary[], 105 enum source_format_class SourcePixelFormat[], 106 enum dm_swizzle_mode SurfaceTiling[], 107 unsigned int ViewportWidth[], 108 unsigned int ViewportHeight[], 109 unsigned int ViewportXStart[], 110 unsigned int ViewportYStart[], 111 unsigned int ViewportXStartC[], 112 unsigned int ViewportYStartC[], 113 unsigned int SurfaceWidthY[], 114 unsigned int SurfaceWidthC[], 115 unsigned int SurfaceHeightY[], 116 unsigned int SurfaceHeightC[], 117 unsigned int Read256BytesBlockHeightY[], 118 unsigned int Read256BytesBlockHeightC[], 119 unsigned int Read256BytesBlockWidthY[], 120 unsigned int Read256BytesBlockWidthC[], 121 enum odm_combine_mode ODMMode[], 122 unsigned int BlendingAndTiming[], 123 unsigned int BytePerPixY[], 124 unsigned int BytePerPixC[], 125 double BytePerPixDETY[], 126 double BytePerPixDETC[], 127 unsigned int HActive[], 128 double HRatio[], 129 double HRatioChroma[], 130 unsigned int DPPPerSurface[], 131 132 /* Output */ 133 unsigned int swath_width_luma_ub[], 134 unsigned int swath_width_chroma_ub[], 135 double SwathWidth[], 136 double SwathWidthChroma[], 137 unsigned int SwathHeightY[], 138 unsigned int SwathHeightC[], 139 unsigned int DETBufferSizeInKByte[], 140 unsigned int DETBufferSizeY[], 141 unsigned int DETBufferSizeC[], 142 bool *UnboundedRequestEnabled, 143 unsigned int *CompressedBufferSizeInkByte, 144 unsigned int *CompBufReservedSpaceKBytes, 145 bool *CompBufReservedSpaceNeedAdjustment, 146 bool ViewportSizeSupportPerSurface[], 147 bool *ViewportSizeSupport); 148 149 void dml32_CalculateSwathWidth( 150 bool ForceSingleDPP, 151 unsigned int NumberOfActiveSurfaces, 152 enum source_format_class SourcePixelFormat[], 153 enum dm_rotation_angle SourceScan[], 154 bool ViewportStationary[], 155 unsigned int ViewportWidth[], 156 unsigned int ViewportHeight[], 157 unsigned int ViewportXStart[], 158 unsigned int ViewportYStart[], 159 unsigned int ViewportXStartC[], 160 unsigned int ViewportYStartC[], 161 unsigned int SurfaceWidthY[], 162 unsigned int SurfaceWidthC[], 163 unsigned int SurfaceHeightY[], 164 unsigned int SurfaceHeightC[], 165 enum odm_combine_mode ODMMode[], 166 unsigned int BytePerPixY[], 167 unsigned int BytePerPixC[], 168 unsigned int Read256BytesBlockHeightY[], 169 unsigned int Read256BytesBlockHeightC[], 170 unsigned int Read256BytesBlockWidthY[], 171 unsigned int Read256BytesBlockWidthC[], 172 unsigned int BlendingAndTiming[], 173 unsigned int HActive[], 174 double HRatio[], 175 unsigned int DPPPerSurface[], 176 177 /* Output */ 178 double SwathWidthdoubleDPPY[], 179 double SwathWidthdoubleDPPC[], 180 double SwathWidthY[], // per-pipe 181 double SwathWidthC[], // per-pipe 182 unsigned int MaximumSwathHeightY[], 183 unsigned int MaximumSwathHeightC[], 184 unsigned int swath_width_luma_ub[], // per-pipe 185 unsigned int swath_width_chroma_ub[]); 186 187 bool dml32_UnboundedRequest(enum unbounded_requesting_policy UseUnboundedRequestingFinal, 188 unsigned int TotalNumberOfActiveDPP, 189 bool NoChroma, 190 enum output_encoder_class Output, 191 enum dm_swizzle_mode SurfaceTiling, 192 bool CompBufReservedSpaceNeedAdjustment, 193 bool DisableUnboundRequestIfCompBufReservedSpaceNeedAdjustment); 194 195 void dml32_CalculateDETBufferSize( 196 unsigned int DETSizeOverride[], 197 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange[], 198 bool ForceSingleDPP, 199 unsigned int NumberOfActiveSurfaces, 200 bool UnboundedRequestEnabled, 201 unsigned int nomDETInKByte, 202 unsigned int MaxTotalDETInKByte, 203 unsigned int ConfigReturnBufferSizeInKByte, 204 unsigned int MinCompressedBufferSizeInKByte, 205 unsigned int CompressedBufferSegmentSizeInkByteFinal, 206 enum source_format_class SourcePixelFormat[], 207 double ReadBandwidthLuma[], 208 double ReadBandwidthChroma[], 209 unsigned int RoundedUpMaxSwathSizeBytesY[], 210 unsigned int RoundedUpMaxSwathSizeBytesC[], 211 unsigned int DPPPerSurface[], 212 /* Output */ 213 unsigned int DETBufferSizeInKByte[], 214 unsigned int *CompressedBufferSizeInkByte); 215 216 void dml32_CalculateODMMode( 217 unsigned int MaximumPixelsPerLinePerDSCUnit, 218 unsigned int HActive, 219 enum output_format_class OutFormat, 220 enum output_encoder_class Output, 221 enum odm_combine_policy ODMUse, 222 double StateDispclk, 223 double MaxDispclk, 224 bool DSCEnable, 225 unsigned int TotalNumberOfActiveDPP, 226 unsigned int MaxNumDPP, 227 double PixelClock, 228 double DISPCLKDPPCLKDSCCLKDownSpreading, 229 double DISPCLKRampingMargin, 230 double DISPCLKDPPCLKVCOSpeed, 231 unsigned int NumberOfDSCSlices, 232 233 /* Output */ 234 bool *TotalAvailablePipesSupport, 235 unsigned int *NumberOfDPP, 236 enum odm_combine_mode *ODMMode, 237 double *RequiredDISPCLKPerSurface); 238 239 double dml32_CalculateRequiredDispclk( 240 enum odm_combine_mode ODMMode, 241 double PixelClock, 242 double DISPCLKDPPCLKDSCCLKDownSpreading, 243 double DISPCLKRampingMargin, 244 double DISPCLKDPPCLKVCOSpeed, 245 double MaxDispclk); 246 247 double dml32_RoundToDFSGranularity(double Clock, bool round_up, double VCOSpeed); 248 249 void dml32_CalculateOutputLink( 250 double PHYCLKPerState, 251 double PHYCLKD18PerState, 252 double PHYCLKD32PerState, 253 double Downspreading, 254 bool IsMainSurfaceUsingTheIndicatedTiming, 255 enum output_encoder_class Output, 256 enum output_format_class OutputFormat, 257 unsigned int HTotal, 258 unsigned int HActive, 259 double PixelClockBackEnd, 260 double ForcedOutputLinkBPP, 261 unsigned int DSCInputBitPerComponent, 262 unsigned int NumberOfDSCSlices, 263 double AudioSampleRate, 264 unsigned int AudioSampleLayout, 265 enum odm_combine_mode ODMModeNoDSC, 266 enum odm_combine_mode ODMModeDSC, 267 bool DSCEnable, 268 unsigned int OutputLinkDPLanes, 269 enum dm_output_link_dp_rate OutputLinkDPRate, 270 271 /* Output */ 272 bool *RequiresDSC, 273 double *RequiresFEC, 274 double *OutBpp, 275 enum dm_output_type *OutputType, 276 enum dm_output_rate *OutputRate, 277 unsigned int *RequiredSlots); 278 279 void dml32_CalculateDPPCLK( 280 unsigned int NumberOfActiveSurfaces, 281 double DISPCLKDPPCLKDSCCLKDownSpreading, 282 double DISPCLKDPPCLKVCOSpeed, 283 double DPPCLKUsingSingleDPP[], 284 unsigned int DPPPerSurface[], 285 286 /* output */ 287 double *GlobalDPPCLK, 288 double Dppclk[]); 289 290 double dml32_TruncToValidBPP( 291 double LinkBitRate, 292 unsigned int Lanes, 293 unsigned int HTotal, 294 unsigned int HActive, 295 double PixelClock, 296 double DesiredBPP, 297 bool DSCEnable, 298 enum output_encoder_class Output, 299 enum output_format_class Format, 300 unsigned int DSCInputBitPerComponent, 301 unsigned int DSCSlices, 302 unsigned int AudioRate, 303 unsigned int AudioLayout, 304 enum odm_combine_mode ODMModeNoDSC, 305 enum odm_combine_mode ODMModeDSC, 306 /* Output */ 307 unsigned int *RequiredSlots); 308 309 double dml32_RequiredDTBCLK( 310 bool DSCEnable, 311 double PixelClock, 312 enum output_format_class OutputFormat, 313 double OutputBpp, 314 unsigned int DSCSlices, 315 unsigned int HTotal, 316 unsigned int HActive, 317 unsigned int AudioRate, 318 unsigned int AudioLayout); 319 320 unsigned int dml32_DSCDelayRequirement(bool DSCEnabled, 321 enum odm_combine_mode ODMMode, 322 unsigned int DSCInputBitPerComponent, 323 double OutputBpp, 324 unsigned int HActive, 325 unsigned int HTotal, 326 unsigned int NumberOfDSCSlices, 327 enum output_format_class OutputFormat, 328 enum output_encoder_class Output, 329 double PixelClock, 330 double PixelClockBackEnd, 331 double dsc_delay_factor_wa); 332 333 void dml32_CalculateSurfaceSizeInMall( 334 unsigned int NumberOfActiveSurfaces, 335 unsigned int MALLAllocatedForDCN, 336 enum dm_use_mall_for_static_screen_mode UseMALLForStaticScreen[], 337 enum dm_use_mall_for_pstate_change_mode UsesMALLForPStateChange[], 338 bool DCCEnable[], 339 bool ViewportStationary[], 340 unsigned int ViewportXStartY[], 341 unsigned int ViewportYStartY[], 342 unsigned int ViewportXStartC[], 343 unsigned int ViewportYStartC[], 344 unsigned int ViewportWidthY[], 345 unsigned int ViewportHeightY[], 346 unsigned int BytesPerPixelY[], 347 unsigned int ViewportWidthC[], 348 unsigned int ViewportHeightC[], 349 unsigned int BytesPerPixelC[], 350 unsigned int SurfaceWidthY[], 351 unsigned int SurfaceWidthC[], 352 unsigned int SurfaceHeightY[], 353 unsigned int SurfaceHeightC[], 354 unsigned int Read256BytesBlockWidthY[], 355 unsigned int Read256BytesBlockWidthC[], 356 unsigned int Read256BytesBlockHeightY[], 357 unsigned int Read256BytesBlockHeightC[], 358 unsigned int ReadBlockWidthY[], 359 unsigned int ReadBlockWidthC[], 360 unsigned int ReadBlockHeightY[], 361 unsigned int ReadBlockHeightC[], 362 unsigned int DCCMetaPitchY[], 363 unsigned int DCCMetaPitchC[], 364 365 /* Output */ 366 unsigned int SurfaceSizeInMALL[], 367 bool *ExceededMALLSize); 368 369 void dml32_CalculateVMRowAndSwath( 370 unsigned int NumberOfActiveSurfaces, 371 DmlPipe myPipe[], 372 unsigned int SurfaceSizeInMALL[], 373 unsigned int PTEBufferSizeInRequestsLuma, 374 unsigned int PTEBufferSizeInRequestsChroma, 375 unsigned int DCCMetaBufferSizeBytes, 376 enum dm_use_mall_for_static_screen_mode UseMALLForStaticScreen[], 377 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange[], 378 unsigned int MALLAllocatedForDCN, 379 double SwathWidthY[], 380 double SwathWidthC[], 381 bool GPUVMEnable, 382 bool HostVMEnable, 383 unsigned int HostVMMaxNonCachedPageTableLevels, 384 unsigned int GPUVMMaxPageTableLevels, 385 unsigned int GPUVMMinPageSizeKBytes[], 386 unsigned int HostVMMinPageSize, 387 388 /* Output */ 389 bool PTEBufferSizeNotExceeded[], 390 bool DCCMetaBufferSizeNotExceeded[], 391 unsigned int dpte_row_width_luma_ub[], 392 unsigned int dpte_row_width_chroma_ub[], 393 unsigned int dpte_row_height_luma[], 394 unsigned int dpte_row_height_chroma[], 395 unsigned int dpte_row_height_linear_luma[], // VBA_DELTA 396 unsigned int dpte_row_height_linear_chroma[], // VBA_DELTA 397 unsigned int meta_req_width[], 398 unsigned int meta_req_width_chroma[], 399 unsigned int meta_req_height[], 400 unsigned int meta_req_height_chroma[], 401 unsigned int meta_row_width[], 402 unsigned int meta_row_width_chroma[], 403 unsigned int meta_row_height[], 404 unsigned int meta_row_height_chroma[], 405 unsigned int vm_group_bytes[], 406 unsigned int dpte_group_bytes[], 407 unsigned int PixelPTEReqWidthY[], 408 unsigned int PixelPTEReqHeightY[], 409 unsigned int PTERequestSizeY[], 410 unsigned int PixelPTEReqWidthC[], 411 unsigned int PixelPTEReqHeightC[], 412 unsigned int PTERequestSizeC[], 413 unsigned int dpde0_bytes_per_frame_ub_l[], 414 unsigned int meta_pte_bytes_per_frame_ub_l[], 415 unsigned int dpde0_bytes_per_frame_ub_c[], 416 unsigned int meta_pte_bytes_per_frame_ub_c[], 417 double PrefetchSourceLinesY[], 418 double PrefetchSourceLinesC[], 419 double VInitPreFillY[], 420 double VInitPreFillC[], 421 unsigned int MaxNumSwathY[], 422 unsigned int MaxNumSwathC[], 423 double meta_row_bw[], 424 double dpte_row_bw[], 425 double PixelPTEBytesPerRow[], 426 double PDEAndMetaPTEBytesFrame[], 427 double MetaRowByte[], 428 bool use_one_row_for_frame[], 429 bool use_one_row_for_frame_flip[], 430 bool UsesMALLForStaticScreen[], 431 bool PTE_BUFFER_MODE[], 432 unsigned int BIGK_FRAGMENT_SIZE[]); 433 434 unsigned int dml32_CalculateVMAndRowBytes( 435 bool ViewportStationary, 436 bool DCCEnable, 437 unsigned int NumberOfDPPs, 438 unsigned int BlockHeight256Bytes, 439 unsigned int BlockWidth256Bytes, 440 enum source_format_class SourcePixelFormat, 441 unsigned int SurfaceTiling, 442 unsigned int BytePerPixel, 443 enum dm_rotation_angle SourceScan, 444 double SwathWidth, 445 unsigned int ViewportHeight, 446 unsigned int ViewportXStart, 447 unsigned int ViewportYStart, 448 bool GPUVMEnable, 449 bool HostVMEnable, 450 unsigned int HostVMMaxNonCachedPageTableLevels, 451 unsigned int GPUVMMaxPageTableLevels, 452 unsigned int GPUVMMinPageSizeKBytes, 453 unsigned int HostVMMinPageSize, 454 unsigned int PTEBufferSizeInRequests, 455 unsigned int Pitch, 456 unsigned int DCCMetaPitch, 457 unsigned int MacroTileWidth, 458 unsigned int MacroTileHeight, 459 460 /* Output */ 461 unsigned int *MetaRowByte, 462 unsigned int *PixelPTEBytesPerRow, 463 unsigned int *dpte_row_width_ub, 464 unsigned int *dpte_row_height, 465 unsigned int *dpte_row_height_linear, 466 unsigned int *PixelPTEBytesPerRow_one_row_per_frame, 467 unsigned int *dpte_row_width_ub_one_row_per_frame, 468 unsigned int *dpte_row_height_one_row_per_frame, 469 unsigned int *MetaRequestWidth, 470 unsigned int *MetaRequestHeight, 471 unsigned int *meta_row_width, 472 unsigned int *meta_row_height, 473 unsigned int *PixelPTEReqWidth, 474 unsigned int *PixelPTEReqHeight, 475 unsigned int *PTERequestSize, 476 unsigned int *DPDE0BytesFrame, 477 unsigned int *MetaPTEBytesFrame); 478 479 double dml32_CalculatePrefetchSourceLines( 480 double VRatio, 481 unsigned int VTaps, 482 bool Interlace, 483 bool ProgressiveToInterlaceUnitInOPP, 484 unsigned int SwathHeight, 485 enum dm_rotation_angle SourceRotation, 486 bool ViewportStationary, 487 double SwathWidth, 488 unsigned int ViewportHeight, 489 unsigned int ViewportXStart, 490 unsigned int ViewportYStart, 491 492 /* Output */ 493 double *VInitPreFill, 494 unsigned int *MaxNumSwath); 495 496 void dml32_CalculateMALLUseForStaticScreen( 497 unsigned int NumberOfActiveSurfaces, 498 unsigned int MALLAllocatedForDCNFinal, 499 enum dm_use_mall_for_static_screen_mode *UseMALLForStaticScreen, 500 unsigned int SurfaceSizeInMALL[], 501 bool one_row_per_frame_fits_in_buffer[], 502 503 /* output */ 504 bool UsesMALLForStaticScreen[]); 505 506 void dml32_CalculateRowBandwidth( 507 bool GPUVMEnable, 508 enum source_format_class SourcePixelFormat, 509 double VRatio, 510 double VRatioChroma, 511 bool DCCEnable, 512 double LineTime, 513 unsigned int MetaRowByteLuma, 514 unsigned int MetaRowByteChroma, 515 unsigned int meta_row_height_luma, 516 unsigned int meta_row_height_chroma, 517 unsigned int PixelPTEBytesPerRowLuma, 518 unsigned int PixelPTEBytesPerRowChroma, 519 unsigned int dpte_row_height_luma, 520 unsigned int dpte_row_height_chroma, 521 /* Output */ 522 double *meta_row_bw, 523 double *dpte_row_bw); 524 525 double dml32_CalculateUrgentLatency( 526 double UrgentLatencyPixelDataOnly, 527 double UrgentLatencyPixelMixedWithVMData, 528 double UrgentLatencyVMDataOnly, 529 bool DoUrgentLatencyAdjustment, 530 double UrgentLatencyAdjustmentFabricClockComponent, 531 double UrgentLatencyAdjustmentFabricClockReference, 532 double FabricClock); 533 534 void dml32_CalculateUrgentBurstFactor( 535 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange, 536 unsigned int swath_width_luma_ub, 537 unsigned int swath_width_chroma_ub, 538 unsigned int SwathHeightY, 539 unsigned int SwathHeightC, 540 double LineTime, 541 double UrgentLatency, 542 double CursorBufferSize, 543 unsigned int CursorWidth, 544 unsigned int CursorBPP, 545 double VRatio, 546 double VRatioC, 547 double BytePerPixelInDETY, 548 double BytePerPixelInDETC, 549 unsigned int DETBufferSizeY, 550 unsigned int DETBufferSizeC, 551 /* Output */ 552 double *UrgentBurstFactorCursor, 553 double *UrgentBurstFactorLuma, 554 double *UrgentBurstFactorChroma, 555 bool *NotEnoughUrgentLatencyHiding); 556 557 void dml32_CalculateDCFCLKDeepSleep( 558 unsigned int NumberOfActiveSurfaces, 559 unsigned int BytePerPixelY[], 560 unsigned int BytePerPixelC[], 561 double VRatio[], 562 double VRatioChroma[], 563 double SwathWidthY[], 564 double SwathWidthC[], 565 unsigned int DPPPerSurface[], 566 double HRatio[], 567 double HRatioChroma[], 568 double PixelClock[], 569 double PSCL_THROUGHPUT[], 570 double PSCL_THROUGHPUT_CHROMA[], 571 double Dppclk[], 572 double ReadBandwidthLuma[], 573 double ReadBandwidthChroma[], 574 unsigned int ReturnBusWidth, 575 576 /* Output */ 577 double *DCFClkDeepSleep); 578 579 double dml32_CalculateWriteBackDelay( 580 enum source_format_class WritebackPixelFormat, 581 double WritebackHRatio, 582 double WritebackVRatio, 583 unsigned int WritebackVTaps, 584 unsigned int WritebackDestinationWidth, 585 unsigned int WritebackDestinationHeight, 586 unsigned int WritebackSourceHeight, 587 unsigned int HTotal); 588 589 void dml32_UseMinimumDCFCLK( 590 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange[], 591 bool DRRDisplay[], 592 bool SynchronizeDRRDisplaysForUCLKPStateChangeFinal, 593 unsigned int MaxInterDCNTileRepeaters, 594 unsigned int MaxPrefetchMode, 595 double DRAMClockChangeLatencyFinal, 596 double FCLKChangeLatency, 597 double SREnterPlusExitTime, 598 unsigned int ReturnBusWidth, 599 unsigned int RoundTripPingLatencyCycles, 600 unsigned int ReorderingBytes, 601 unsigned int PixelChunkSizeInKByte, 602 unsigned int MetaChunkSize, 603 bool GPUVMEnable, 604 unsigned int GPUVMMaxPageTableLevels, 605 bool HostVMEnable, 606 unsigned int NumberOfActiveSurfaces, 607 double HostVMMinPageSize, 608 unsigned int HostVMMaxNonCachedPageTableLevels, 609 bool DynamicMetadataVMEnabled, 610 bool ImmediateFlipRequirement, 611 bool ProgressiveToInterlaceUnitInOPP, 612 double MaxAveragePercentOfIdealSDPPortBWDisplayCanUseInNormalSystemOperation, 613 double PercentOfIdealSDPPortBWReceivedAfterUrgLatency, 614 unsigned int VTotal[], 615 unsigned int VActive[], 616 unsigned int DynamicMetadataTransmittedBytes[], 617 unsigned int DynamicMetadataLinesBeforeActiveRequired[], 618 bool Interlace[], 619 double RequiredDPPCLKPerSurface[][2][DC__NUM_DPP__MAX], 620 double RequiredDISPCLK[][2], 621 double UrgLatency[], 622 unsigned int NoOfDPP[][2][DC__NUM_DPP__MAX], 623 double ProjectedDCFClkDeepSleep[][2], 624 double MaximumVStartup[][2][DC__NUM_DPP__MAX], 625 unsigned int TotalNumberOfActiveDPP[][2], 626 unsigned int TotalNumberOfDCCActiveDPP[][2], 627 unsigned int dpte_group_bytes[], 628 double PrefetchLinesY[][2][DC__NUM_DPP__MAX], 629 double PrefetchLinesC[][2][DC__NUM_DPP__MAX], 630 unsigned int swath_width_luma_ub_all_states[][2][DC__NUM_DPP__MAX], 631 unsigned int swath_width_chroma_ub_all_states[][2][DC__NUM_DPP__MAX], 632 unsigned int BytePerPixelY[], 633 unsigned int BytePerPixelC[], 634 unsigned int HTotal[], 635 double PixelClock[], 636 double PDEAndMetaPTEBytesPerFrame[][2][DC__NUM_DPP__MAX], 637 double DPTEBytesPerRow[][2][DC__NUM_DPP__MAX], 638 double MetaRowBytes[][2][DC__NUM_DPP__MAX], 639 bool DynamicMetadataEnable[], 640 double ReadBandwidthLuma[], 641 double ReadBandwidthChroma[], 642 double DCFCLKPerState[], 643 /* Output */ 644 double DCFCLKState[][2]); 645 646 unsigned int dml32_CalculateExtraLatencyBytes(unsigned int ReorderingBytes, 647 unsigned int TotalNumberOfActiveDPP, 648 unsigned int PixelChunkSizeInKByte, 649 unsigned int TotalNumberOfDCCActiveDPP, 650 unsigned int MetaChunkSize, 651 bool GPUVMEnable, 652 bool HostVMEnable, 653 unsigned int NumberOfActiveSurfaces, 654 unsigned int NumberOfDPP[], 655 unsigned int dpte_group_bytes[], 656 double HostVMInefficiencyFactor, 657 double HostVMMinPageSize, 658 unsigned int HostVMMaxNonCachedPageTableLevels); 659 660 void dml32_CalculateVUpdateAndDynamicMetadataParameters( 661 unsigned int MaxInterDCNTileRepeaters, 662 double Dppclk, 663 double Dispclk, 664 double DCFClkDeepSleep, 665 double PixelClock, 666 unsigned int HTotal, 667 unsigned int VBlank, 668 unsigned int DynamicMetadataTransmittedBytes, 669 unsigned int DynamicMetadataLinesBeforeActiveRequired, 670 unsigned int InterlaceEnable, 671 bool ProgressiveToInterlaceUnitInOPP, 672 double *TSetup, 673 double *Tdmbf, 674 double *Tdmec, 675 double *Tdmsks, 676 unsigned int *VUpdateOffsetPix, 677 double *VUpdateWidthPix, 678 double *VReadyOffsetPix); 679 680 double dml32_CalculateTWait( 681 unsigned int PrefetchMode, 682 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange, 683 bool SynchronizeDRRDisplaysForUCLKPStateChangeFinal, 684 bool DRRDisplay, 685 double DRAMClockChangeLatency, 686 double FCLKChangeLatency, 687 double UrgentLatency, 688 double SREnterPlusExitTime); 689 690 double dml32_get_return_bw_mbps(const soc_bounding_box_st *soc, 691 const int VoltageLevel, 692 const bool HostVMEnable, 693 const double DCFCLK, 694 const double FabricClock, 695 const double DRAMSpeed); 696 697 double dml32_get_return_bw_mbps_vm_only(const soc_bounding_box_st *soc, 698 const int VoltageLevel, 699 const double DCFCLK, 700 const double FabricClock, 701 const double DRAMSpeed); 702 703 double dml32_CalculateExtraLatency( 704 unsigned int RoundTripPingLatencyCycles, 705 unsigned int ReorderingBytes, 706 double DCFCLK, 707 unsigned int TotalNumberOfActiveDPP, 708 unsigned int PixelChunkSizeInKByte, 709 unsigned int TotalNumberOfDCCActiveDPP, 710 unsigned int MetaChunkSize, 711 double ReturnBW, 712 bool GPUVMEnable, 713 bool HostVMEnable, 714 unsigned int NumberOfActiveSurfaces, 715 unsigned int NumberOfDPP[], 716 unsigned int dpte_group_bytes[], 717 double HostVMInefficiencyFactor, 718 double HostVMMinPageSize, 719 unsigned int HostVMMaxNonCachedPageTableLevels); 720 721 bool dml32_CalculatePrefetchSchedule( 722 struct vba_vars_st *v, 723 unsigned int k, 724 double HostVMInefficiencyFactor, 725 DmlPipe *myPipe, 726 unsigned int DSCDelay, 727 unsigned int DPP_RECOUT_WIDTH, 728 unsigned int VStartup, 729 unsigned int MaxVStartup, 730 double UrgentLatency, 731 double UrgentExtraLatency, 732 double TCalc, 733 unsigned int PDEAndMetaPTEBytesFrame, 734 unsigned int MetaRowByte, 735 unsigned int PixelPTEBytesPerRow, 736 double PrefetchSourceLinesY, 737 unsigned int SwathWidthY, 738 unsigned int VInitPreFillY, 739 unsigned int MaxNumSwathY, 740 double PrefetchSourceLinesC, 741 unsigned int SwathWidthC, 742 unsigned int VInitPreFillC, 743 unsigned int MaxNumSwathC, 744 unsigned int swath_width_luma_ub, 745 unsigned int swath_width_chroma_ub, 746 unsigned int SwathHeightY, 747 unsigned int SwathHeightC, 748 double TWait, 749 double TPreReq, 750 /* Output */ 751 double *DSTXAfterScaler, 752 double *DSTYAfterScaler, 753 double *DestinationLinesForPrefetch, 754 double *PrefetchBandwidth, 755 double *DestinationLinesToRequestVMInVBlank, 756 double *DestinationLinesToRequestRowInVBlank, 757 double *VRatioPrefetchY, 758 double *VRatioPrefetchC, 759 double *RequiredPrefetchPixDataBWLuma, 760 double *RequiredPrefetchPixDataBWChroma, 761 bool *NotEnoughTimeForDynamicMetadata, 762 double *Tno_bw, 763 double *prefetch_vmrow_bw, 764 double *Tdmdl_vm, 765 double *Tdmdl, 766 double *TSetup, 767 unsigned int *VUpdateOffsetPix, 768 double *VUpdateWidthPix, 769 double *VReadyOffsetPix); 770 771 void dml32_CalculateFlipSchedule( 772 double HostVMInefficiencyFactor, 773 double UrgentExtraLatency, 774 double UrgentLatency, 775 unsigned int GPUVMMaxPageTableLevels, 776 bool HostVMEnable, 777 unsigned int HostVMMaxNonCachedPageTableLevels, 778 bool GPUVMEnable, 779 double HostVMMinPageSize, 780 double PDEAndMetaPTEBytesPerFrame, 781 double MetaRowBytes, 782 double DPTEBytesPerRow, 783 double BandwidthAvailableForImmediateFlip, 784 unsigned int TotImmediateFlipBytes, 785 enum source_format_class SourcePixelFormat, 786 double LineTime, 787 double VRatio, 788 double VRatioChroma, 789 double Tno_bw, 790 bool DCCEnable, 791 unsigned int dpte_row_height, 792 unsigned int meta_row_height, 793 unsigned int dpte_row_height_chroma, 794 unsigned int meta_row_height_chroma, 795 bool use_one_row_for_frame_flip, 796 797 /* Output */ 798 double *DestinationLinesToRequestVMInImmediateFlip, 799 double *DestinationLinesToRequestRowInImmediateFlip, 800 double *final_flip_bw, 801 bool *ImmediateFlipSupportedForPipe); 802 803 void dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport( 804 struct vba_vars_st *v, 805 unsigned int PrefetchMode, 806 double DCFCLK, 807 double ReturnBW, 808 SOCParametersList mmSOCParameters, 809 double SOCCLK, 810 double DCFClkDeepSleep, 811 unsigned int DETBufferSizeY[], 812 unsigned int DETBufferSizeC[], 813 unsigned int SwathHeightY[], 814 unsigned int SwathHeightC[], 815 double SwathWidthY[], 816 double SwathWidthC[], 817 unsigned int DPPPerSurface[], 818 double BytePerPixelDETY[], 819 double BytePerPixelDETC[], 820 double DSTXAfterScaler[], 821 double DSTYAfterScaler[], 822 bool UnboundedRequestEnabled, 823 unsigned int CompressedBufferSizeInkByte, 824 825 /* Output */ 826 enum clock_change_support *DRAMClockChangeSupport, 827 double MaxActiveDRAMClockChangeLatencySupported[], 828 unsigned int SubViewportLinesNeededInMALL[], 829 enum dm_fclock_change_support *FCLKChangeSupport, 830 double *MinActiveFCLKChangeLatencySupported, 831 bool *USRRetrainingSupport, 832 double ActiveDRAMClockChangeLatencyMargin[]); 833 834 double dml32_CalculateWriteBackDISPCLK( 835 enum source_format_class WritebackPixelFormat, 836 double PixelClock, 837 double WritebackHRatio, 838 double WritebackVRatio, 839 unsigned int WritebackHTaps, 840 unsigned int WritebackVTaps, 841 unsigned int WritebackSourceWidth, 842 unsigned int WritebackDestinationWidth, 843 unsigned int HTotal, 844 unsigned int WritebackLineBufferSize, 845 double DISPCLKDPPCLKVCOSpeed); 846 847 void dml32_CalculateMinAndMaxPrefetchMode( 848 enum dm_prefetch_modes AllowForPStateChangeOrStutterInVBlankFinal, 849 unsigned int *MinPrefetchMode, 850 unsigned int *MaxPrefetchMode); 851 852 void dml32_CalculatePixelDeliveryTimes( 853 unsigned int NumberOfActiveSurfaces, 854 double VRatio[], 855 double VRatioChroma[], 856 double VRatioPrefetchY[], 857 double VRatioPrefetchC[], 858 unsigned int swath_width_luma_ub[], 859 unsigned int swath_width_chroma_ub[], 860 unsigned int DPPPerSurface[], 861 double HRatio[], 862 double HRatioChroma[], 863 double PixelClock[], 864 double PSCL_THROUGHPUT[], 865 double PSCL_THROUGHPUT_CHROMA[], 866 double Dppclk[], 867 unsigned int BytePerPixelC[], 868 enum dm_rotation_angle SourceRotation[], 869 unsigned int NumberOfCursors[], 870 unsigned int CursorWidth[][DC__NUM_CURSOR__MAX], 871 unsigned int CursorBPP[][DC__NUM_CURSOR__MAX], 872 unsigned int BlockWidth256BytesY[], 873 unsigned int BlockHeight256BytesY[], 874 unsigned int BlockWidth256BytesC[], 875 unsigned int BlockHeight256BytesC[], 876 877 /* Output */ 878 double DisplayPipeLineDeliveryTimeLuma[], 879 double DisplayPipeLineDeliveryTimeChroma[], 880 double DisplayPipeLineDeliveryTimeLumaPrefetch[], 881 double DisplayPipeLineDeliveryTimeChromaPrefetch[], 882 double DisplayPipeRequestDeliveryTimeLuma[], 883 double DisplayPipeRequestDeliveryTimeChroma[], 884 double DisplayPipeRequestDeliveryTimeLumaPrefetch[], 885 double DisplayPipeRequestDeliveryTimeChromaPrefetch[], 886 double CursorRequestDeliveryTime[], 887 double CursorRequestDeliveryTimePrefetch[]); 888 889 void dml32_CalculateMetaAndPTETimes( 890 bool use_one_row_for_frame[], 891 unsigned int NumberOfActiveSurfaces, 892 bool GPUVMEnable, 893 unsigned int MetaChunkSize, 894 unsigned int MinMetaChunkSizeBytes, 895 unsigned int HTotal[], 896 double VRatio[], 897 double VRatioChroma[], 898 double DestinationLinesToRequestRowInVBlank[], 899 double DestinationLinesToRequestRowInImmediateFlip[], 900 bool DCCEnable[], 901 double PixelClock[], 902 unsigned int BytePerPixelY[], 903 unsigned int BytePerPixelC[], 904 enum dm_rotation_angle SourceRotation[], 905 unsigned int dpte_row_height[], 906 unsigned int dpte_row_height_chroma[], 907 unsigned int meta_row_width[], 908 unsigned int meta_row_width_chroma[], 909 unsigned int meta_row_height[], 910 unsigned int meta_row_height_chroma[], 911 unsigned int meta_req_width[], 912 unsigned int meta_req_width_chroma[], 913 unsigned int meta_req_height[], 914 unsigned int meta_req_height_chroma[], 915 unsigned int dpte_group_bytes[], 916 unsigned int PTERequestSizeY[], 917 unsigned int PTERequestSizeC[], 918 unsigned int PixelPTEReqWidthY[], 919 unsigned int PixelPTEReqHeightY[], 920 unsigned int PixelPTEReqWidthC[], 921 unsigned int PixelPTEReqHeightC[], 922 unsigned int dpte_row_width_luma_ub[], 923 unsigned int dpte_row_width_chroma_ub[], 924 925 /* Output */ 926 double DST_Y_PER_PTE_ROW_NOM_L[], 927 double DST_Y_PER_PTE_ROW_NOM_C[], 928 double DST_Y_PER_META_ROW_NOM_L[], 929 double DST_Y_PER_META_ROW_NOM_C[], 930 double TimePerMetaChunkNominal[], 931 double TimePerChromaMetaChunkNominal[], 932 double TimePerMetaChunkVBlank[], 933 double TimePerChromaMetaChunkVBlank[], 934 double TimePerMetaChunkFlip[], 935 double TimePerChromaMetaChunkFlip[], 936 double time_per_pte_group_nom_luma[], 937 double time_per_pte_group_vblank_luma[], 938 double time_per_pte_group_flip_luma[], 939 double time_per_pte_group_nom_chroma[], 940 double time_per_pte_group_vblank_chroma[], 941 double time_per_pte_group_flip_chroma[]); 942 943 void dml32_CalculateVMGroupAndRequestTimes( 944 unsigned int NumberOfActiveSurfaces, 945 bool GPUVMEnable, 946 unsigned int GPUVMMaxPageTableLevels, 947 unsigned int HTotal[], 948 unsigned int BytePerPixelC[], 949 double DestinationLinesToRequestVMInVBlank[], 950 double DestinationLinesToRequestVMInImmediateFlip[], 951 bool DCCEnable[], 952 double PixelClock[], 953 unsigned int dpte_row_width_luma_ub[], 954 unsigned int dpte_row_width_chroma_ub[], 955 unsigned int vm_group_bytes[], 956 unsigned int dpde0_bytes_per_frame_ub_l[], 957 unsigned int dpde0_bytes_per_frame_ub_c[], 958 unsigned int meta_pte_bytes_per_frame_ub_l[], 959 unsigned int meta_pte_bytes_per_frame_ub_c[], 960 961 /* Output */ 962 double TimePerVMGroupVBlank[], 963 double TimePerVMGroupFlip[], 964 double TimePerVMRequestVBlank[], 965 double TimePerVMRequestFlip[]); 966 967 void dml32_CalculateDCCConfiguration( 968 bool DCCEnabled, 969 bool DCCProgrammingAssumesScanDirectionUnknown, 970 enum source_format_class SourcePixelFormat, 971 unsigned int SurfaceWidthLuma, 972 unsigned int SurfaceWidthChroma, 973 unsigned int SurfaceHeightLuma, 974 unsigned int SurfaceHeightChroma, 975 unsigned int nomDETInKByte, 976 unsigned int RequestHeight256ByteLuma, 977 unsigned int RequestHeight256ByteChroma, 978 enum dm_swizzle_mode TilingFormat, 979 unsigned int BytePerPixelY, 980 unsigned int BytePerPixelC, 981 double BytePerPixelDETY, 982 double BytePerPixelDETC, 983 enum dm_rotation_angle SourceRotation, 984 /* Output */ 985 unsigned int *MaxUncompressedBlockLuma, 986 unsigned int *MaxUncompressedBlockChroma, 987 unsigned int *MaxCompressedBlockLuma, 988 unsigned int *MaxCompressedBlockChroma, 989 unsigned int *IndependentBlockLuma, 990 unsigned int *IndependentBlockChroma); 991 992 void dml32_CalculateStutterEfficiency( 993 unsigned int CompressedBufferSizeInkByte, 994 enum dm_use_mall_for_pstate_change_mode UseMALLForPStateChange[], 995 bool UnboundedRequestEnabled, 996 unsigned int MetaFIFOSizeInKEntries, 997 unsigned int ZeroSizeBufferEntries, 998 unsigned int PixelChunkSizeInKByte, 999 unsigned int NumberOfActiveSurfaces, 1000 unsigned int ROBBufferSizeInKByte, 1001 double TotalDataReadBandwidth, 1002 double DCFCLK, 1003 double ReturnBW, 1004 unsigned int CompbufReservedSpace64B, 1005 unsigned int CompbufReservedSpaceZs, 1006 double SRExitTime, 1007 double SRExitZ8Time, 1008 bool SynchronizeTimingsFinal, 1009 unsigned int BlendingAndTiming[], 1010 double StutterEnterPlusExitWatermark, 1011 double Z8StutterEnterPlusExitWatermark, 1012 bool ProgressiveToInterlaceUnitInOPP, 1013 bool Interlace[], 1014 double MinTTUVBlank[], 1015 unsigned int DPPPerSurface[], 1016 unsigned int DETBufferSizeY[], 1017 unsigned int BytePerPixelY[], 1018 double BytePerPixelDETY[], 1019 double SwathWidthY[], 1020 unsigned int SwathHeightY[], 1021 unsigned int SwathHeightC[], 1022 double NetDCCRateLuma[], 1023 double NetDCCRateChroma[], 1024 double DCCFractionOfZeroSizeRequestsLuma[], 1025 double DCCFractionOfZeroSizeRequestsChroma[], 1026 unsigned int HTotal[], 1027 unsigned int VTotal[], 1028 double PixelClock[], 1029 double VRatio[], 1030 enum dm_rotation_angle SourceRotation[], 1031 unsigned int BlockHeight256BytesY[], 1032 unsigned int BlockWidth256BytesY[], 1033 unsigned int BlockHeight256BytesC[], 1034 unsigned int BlockWidth256BytesC[], 1035 unsigned int DCCYMaxUncompressedBlock[], 1036 unsigned int DCCCMaxUncompressedBlock[], 1037 unsigned int VActive[], 1038 bool DCCEnable[], 1039 bool WritebackEnable[], 1040 double ReadBandwidthSurfaceLuma[], 1041 double ReadBandwidthSurfaceChroma[], 1042 double meta_row_bw[], 1043 double dpte_row_bw[], 1044 1045 /* Output */ 1046 double *StutterEfficiencyNotIncludingVBlank, 1047 double *StutterEfficiency, 1048 unsigned int *NumberOfStutterBurstsPerFrame, 1049 double *Z8StutterEfficiencyNotIncludingVBlank, 1050 double *Z8StutterEfficiency, 1051 unsigned int *Z8NumberOfStutterBurstsPerFrame, 1052 double *StutterPeriod, 1053 bool *DCHUBBUB_ARB_CSTATE_MAX_CAP_MODE); 1054 1055 void dml32_CalculateMaxDETAndMinCompressedBufferSize( 1056 unsigned int ConfigReturnBufferSizeInKByte, 1057 unsigned int ROBBufferSizeInKByte, 1058 unsigned int MaxNumDPP, 1059 bool nomDETInKByteOverrideEnable, // VBA_DELTA, allow DV to override default DET size 1060 unsigned int nomDETInKByteOverrideValue, // VBA_DELTA 1061 1062 /* Output */ 1063 unsigned int *MaxTotalDETInKByte, 1064 unsigned int *nomDETInKByte, 1065 unsigned int *MinCompressedBufferSizeInKByte); 1066 1067 bool dml32_CalculateVActiveBandwithSupport(unsigned int NumberOfActiveSurfaces, 1068 double ReturnBW, 1069 bool NotUrgentLatencyHiding[], 1070 double ReadBandwidthLuma[], 1071 double ReadBandwidthChroma[], 1072 double cursor_bw[], 1073 double meta_row_bandwidth[], 1074 double dpte_row_bandwidth[], 1075 unsigned int NumberOfDPP[], 1076 double UrgentBurstFactorLuma[], 1077 double UrgentBurstFactorChroma[], 1078 double UrgentBurstFactorCursor[]); 1079 1080 void dml32_CalculatePrefetchBandwithSupport(unsigned int NumberOfActiveSurfaces, 1081 double ReturnBW, 1082 bool NotUrgentLatencyHiding[], 1083 double ReadBandwidthLuma[], 1084 double ReadBandwidthChroma[], 1085 double PrefetchBandwidthLuma[], 1086 double PrefetchBandwidthChroma[], 1087 double cursor_bw[], 1088 double meta_row_bandwidth[], 1089 double dpte_row_bandwidth[], 1090 double cursor_bw_pre[], 1091 double prefetch_vmrow_bw[], 1092 unsigned int NumberOfDPP[], 1093 double UrgentBurstFactorLuma[], 1094 double UrgentBurstFactorChroma[], 1095 double UrgentBurstFactorCursor[], 1096 double UrgentBurstFactorLumaPre[], 1097 double UrgentBurstFactorChromaPre[], 1098 double UrgentBurstFactorCursorPre[], 1099 double PrefetchBW[], 1100 double VRatio[], 1101 double MaxVRatioPre, 1102 1103 /* output */ 1104 double *MaxPrefetchBandwidth, 1105 double *FractionOfUrgentBandwidth, 1106 bool *PrefetchBandwidthSupport); 1107 1108 double dml32_CalculateBandwidthAvailableForImmediateFlip(unsigned int NumberOfActiveSurfaces, 1109 double ReturnBW, 1110 double ReadBandwidthLuma[], 1111 double ReadBandwidthChroma[], 1112 double PrefetchBandwidthLuma[], 1113 double PrefetchBandwidthChroma[], 1114 double cursor_bw[], 1115 double cursor_bw_pre[], 1116 unsigned int NumberOfDPP[], 1117 double UrgentBurstFactorLuma[], 1118 double UrgentBurstFactorChroma[], 1119 double UrgentBurstFactorCursor[], 1120 double UrgentBurstFactorLumaPre[], 1121 double UrgentBurstFactorChromaPre[], 1122 double UrgentBurstFactorCursorPre[]); 1123 1124 void dml32_CalculateImmediateFlipBandwithSupport(unsigned int NumberOfActiveSurfaces, 1125 double ReturnBW, 1126 enum immediate_flip_requirement ImmediateFlipRequirement[], 1127 double final_flip_bw[], 1128 double ReadBandwidthLuma[], 1129 double ReadBandwidthChroma[], 1130 double PrefetchBandwidthLuma[], 1131 double PrefetchBandwidthChroma[], 1132 double cursor_bw[], 1133 double meta_row_bandwidth[], 1134 double dpte_row_bandwidth[], 1135 double cursor_bw_pre[], 1136 double prefetch_vmrow_bw[], 1137 unsigned int NumberOfDPP[], 1138 double UrgentBurstFactorLuma[], 1139 double UrgentBurstFactorChroma[], 1140 double UrgentBurstFactorCursor[], 1141 double UrgentBurstFactorLumaPre[], 1142 double UrgentBurstFactorChromaPre[], 1143 double UrgentBurstFactorCursorPre[], 1144 1145 /* output */ 1146 double *TotalBandwidth, 1147 double *FractionOfUrgentBandwidth, 1148 bool *ImmediateFlipBandwidthSupport); 1149 1150 bool dml32_CalculateDETSwathFillLatencyHiding(unsigned int NumberOfActiveSurfaces, 1151 double ReturnBW, 1152 double UrgentLatency, 1153 unsigned int SwathHeightY[], 1154 unsigned int SwathHeightC[], 1155 unsigned int SwathWidthY[], 1156 unsigned int SwathWidthC[], 1157 double BytePerPixelInDETY[], 1158 double BytePerPixelInDETC[], 1159 unsigned int DETBufferSizeY[], 1160 unsigned int DETBufferSizeC[], 1161 unsigned int NumOfDPP[], 1162 unsigned int HTotal[], 1163 double PixelClock[], 1164 double VRatioY[], 1165 double VRatioC[], 1166 enum dm_use_mall_for_pstate_change_mode UsesMALLForPStateChange[], 1167 enum unbounded_requesting_policy UseUnboundedRequesting); 1168 1169 #endif 1170