1 // SPDX-License-Identifier: MIT 2 // 3 // Copyright 2024 Advanced Micro Devices, Inc. 4 5 #ifndef __DML_TOP_TYPES_H__ 6 #define __DML_TOP_TYPES_H__ 7 8 #include "dml_top_display_cfg_types.h" 9 #include "dml_top_soc_parameter_types.h" 10 #include "dml_top_policy_types.h" 11 #include "dml_top_dchub_registers.h" 12 13 #include "dmub_cmd.h" 14 15 struct dml2_instance; 16 17 enum dml2_status { 18 dml2_success = 0, 19 dml2_error_generic = 1 20 }; 21 22 enum dml2_project_id { 23 dml2_project_invalid = 0, 24 dml2_project_dcn4x_stage1 = 1, 25 dml2_project_dcn4x_stage2 = 2, 26 dml2_project_dcn4x_stage2_auto_drr_svp = 3, 27 }; 28 29 enum dml2_pstate_change_support { 30 dml2_pstate_change_vactive = 0, 31 dml2_pstate_change_vblank = 1, 32 dml2_pstate_change_vblank_and_vactive = 2, 33 dml2_pstate_change_drr = 3, 34 dml2_pstate_change_mall_svp = 4, 35 dml2_pstate_change_mall_full_frame = 6, 36 dml2_pstate_change_unsupported = 7 37 }; 38 39 enum dml2_output_type_and_rate__type { 40 dml2_output_type_unknown = 0, 41 dml2_output_type_dp = 1, 42 dml2_output_type_edp = 2, 43 dml2_output_type_dp2p0 = 3, 44 dml2_output_type_hdmi = 4, 45 dml2_output_type_hdmifrl = 5 46 }; 47 48 enum dml2_output_type_and_rate__rate { 49 dml2_output_rate_unknown = 0, 50 dml2_output_rate_dp_rate_hbr = 1, 51 dml2_output_rate_dp_rate_hbr2 = 2, 52 dml2_output_rate_dp_rate_hbr3 = 3, 53 dml2_output_rate_dp_rate_uhbr10 = 4, 54 dml2_output_rate_dp_rate_uhbr13p5 = 5, 55 dml2_output_rate_dp_rate_uhbr20 = 6, 56 dml2_output_rate_hdmi_rate_3x3 = 7, 57 dml2_output_rate_hdmi_rate_6x3 = 8, 58 dml2_output_rate_hdmi_rate_6x4 = 9, 59 dml2_output_rate_hdmi_rate_8x4 = 10, 60 dml2_output_rate_hdmi_rate_10x4 = 11, 61 dml2_output_rate_hdmi_rate_12x4 = 12 62 }; 63 64 struct dml2_pmo_options { 65 bool disable_vblank; 66 bool disable_svp; 67 bool disable_drr_var; 68 bool disable_drr_clamped; 69 bool disable_drr_var_when_var_active; 70 bool disable_drr_clamped_when_var_active; 71 bool disable_fams2; 72 bool disable_vactive_det_fill_bw_pad; /* dml2_project_dcn4x_stage2_auto_drr_svp and above only */ 73 bool disable_dyn_odm; 74 bool disable_dyn_odm_for_multi_stream; 75 bool disable_dyn_odm_for_stream_with_svp; 76 }; 77 78 struct dml2_options { 79 enum dml2_project_id project_id; 80 struct dml2_pmo_options pmo_options; 81 }; 82 83 struct dml2_initialize_instance_in_out { 84 struct dml2_instance *dml2_instance; 85 struct dml2_options options; 86 struct dml2_soc_bb soc_bb; 87 struct dml2_ip_capabilities ip_caps; 88 89 struct { 90 void *explicit_ip_bb; 91 unsigned int explicit_ip_bb_size; 92 } overrides; 93 }; 94 95 struct dml2_reset_instance_in_out { 96 struct dml2_instance *dml2_instance; 97 }; 98 99 struct dml2_check_mode_supported_in_out { 100 /* 101 * Inputs 102 */ 103 struct dml2_instance *dml2_instance; 104 const struct dml2_display_cfg *display_config; 105 106 /* 107 * Outputs 108 */ 109 bool is_supported; 110 }; 111 112 struct dml2_mcache_surface_allocation { 113 bool valid; 114 /* 115 * For iMALL, dedicated mall mcaches are required (sharing of last 116 * slice possible), for legacy phantom or phantom without return 117 * the only mall mcaches need to be valid. 118 */ 119 bool requires_dedicated_mall_mcache; 120 121 unsigned int num_mcaches_plane0; 122 unsigned int num_mcaches_plane1; 123 /* 124 * A plane is divided into vertical slices of mcaches, 125 * which wrap on the surface width. 126 * 127 * For example, if the surface width is 7680, and split into 128 * three slices of equal width, the boundary array would contain 129 * [2560, 5120, 7680] 130 * 131 * The assignments are 132 * 0 = [0 .. 2559] 133 * 1 = [2560 .. 5119] 134 * 2 = [5120 .. 7679] 135 * 0 = [7680 .. INF] 136 * The final element implicitly is the same as the first, and 137 * at first seems invalid since it is never referenced (since) 138 * it is outside the surface. However, its useful when shifting 139 * (see below). 140 * 141 * For any given valid mcache assignment, a shifted version, wrapped 142 * on the surface width boundary is also assumed to be valid. 143 * 144 * For example, shifting [2560, 5120, 7680] by -50 results in 145 * [2510, 5170, 7630]. 146 * 147 * The assignments are now: 148 * 0 = [0 .. 2509] 149 * 1 = [2510 .. 5169] 150 * 2 = [5170 .. 7629] 151 * 0 = [7630 .. INF] 152 */ 153 int mcache_x_offsets_plane0[DML2_MAX_MCACHES + 1]; 154 int mcache_x_offsets_plane1[DML2_MAX_MCACHES + 1]; 155 156 /* 157 * Shift grainularity is not necessarily 1 158 */ 159 struct { 160 int p0; 161 int p1; 162 } shift_granularity; 163 164 /* 165 * MCacheIDs have global scope in the SoC, and they are stored here. 166 * These IDs are generally not valid until all planes in a display 167 * configuration have had their mcache requirements calculated. 168 */ 169 int global_mcache_ids_plane0[DML2_MAX_MCACHES + 1]; 170 int global_mcache_ids_plane1[DML2_MAX_MCACHES + 1]; 171 int global_mcache_ids_mall_plane0[DML2_MAX_MCACHES + 1]; 172 int global_mcache_ids_mall_plane1[DML2_MAX_MCACHES + 1]; 173 174 /* 175 * Generally, plane0/1 slices must use a disjoint set of caches 176 * but in some cases the final segement of the two planes can 177 * use the same cache. If plane0_plane1 is set, then this is 178 * allowed. 179 * 180 * Similarly, the caches allocated to MALL prefetcher are generally 181 * disjoint, but if mall_prefetch is set, then the final segment 182 * between the main and the mall pixel requestor can use the same 183 * cache. 184 * 185 * Note that both bits may be set at the same time. 186 */ 187 struct { 188 bool mall_comb_mcache_p0; 189 bool mall_comb_mcache_p1; 190 bool plane0_plane1; 191 } last_slice_sharing; 192 193 struct { 194 int meta_row_bytes_plane0; 195 int meta_row_bytes_plane1; 196 } informative; 197 }; 198 199 enum dml2_pstate_method { 200 dml2_pstate_method_na = 0, 201 /* hw exclusive modes */ 202 dml2_pstate_method_vactive = 1, 203 dml2_pstate_method_vblank = 2, 204 dml2_pstate_method_reserved_hw = 5, 205 /* fw assisted exclusive modes */ 206 dml2_pstate_method_fw_svp = 6, 207 dml2_pstate_method_reserved_fw = 10, 208 /* fw assisted modes requiring drr modulation */ 209 dml2_pstate_method_fw_vactive_drr = 11, 210 dml2_pstate_method_fw_vblank_drr = 12, 211 dml2_pstate_method_fw_svp_drr = 13, 212 dml2_pstate_method_reserved_fw_drr_clamped = 20, 213 dml2_pstate_method_fw_drr = 21, 214 dml2_pstate_method_reserved_fw_drr_var = 22, 215 dml2_pstate_method_count 216 }; 217 218 struct dml2_per_plane_programming { 219 const struct dml2_plane_parameters *plane_descriptor; 220 221 union { 222 struct { 223 unsigned long dppclk_khz; 224 } dcn4x; 225 } min_clocks; 226 227 struct dml2_mcache_surface_allocation mcache_allocation; 228 229 // If a stream is using automatic or forced odm combine 230 // and the stream for this plane has num_odms_required > 1 231 // num_dpps_required is always equal to num_odms_required for 232 // ALL planes of the stream 233 234 // If a stream is using odm split, then this value is always 1 235 unsigned int num_dpps_required; 236 237 enum dml2_pstate_method uclk_pstate_support_method; 238 239 // MALL size requirements for MALL SS and SubVP 240 unsigned int surface_size_mall_bytes; 241 unsigned int svp_size_mall_bytes; 242 243 struct dml2_dchub_per_pipe_register_set *pipe_regs[DML2_MAX_PLANES]; 244 245 struct { 246 bool valid; 247 struct dml2_plane_parameters descriptor; 248 struct dml2_dchub_per_pipe_register_set *pipe_regs[DML2_MAX_PLANES]; 249 } phantom_plane; 250 }; 251 252 union dml2_global_sync_programming { 253 struct { 254 unsigned int vstartup_lines; 255 unsigned int vupdate_offset_pixels; 256 unsigned int vupdate_vupdate_width_pixels; 257 unsigned int vready_offset_pixels; 258 unsigned int pstate_keepout_start_lines; 259 } dcn4x; 260 }; 261 262 struct dml2_per_stream_programming { 263 const struct dml2_stream_parameters *stream_descriptor; 264 265 union { 266 struct { 267 unsigned long dscclk_khz; 268 unsigned long dtbclk_khz; 269 unsigned long phyclk_khz; 270 } dcn4x; 271 } min_clocks; 272 273 union dml2_global_sync_programming global_sync; 274 275 unsigned int num_odms_required; 276 277 enum dml2_pstate_method uclk_pstate_method; 278 279 struct { 280 bool enabled; 281 struct dml2_stream_parameters descriptor; 282 union dml2_global_sync_programming global_sync; 283 } phantom_stream; 284 285 union dmub_cmd_fams2_config fams2_base_params; 286 union dmub_cmd_fams2_config fams2_sub_params; 287 }; 288 289 //----------------- 290 // Mode Support Information 291 //----------------- 292 293 struct dml2_mode_support_info { 294 bool ModeIsSupported; //<brief Is the mode support any voltage and combine setting 295 bool ImmediateFlipSupport; //<brief Means mode support immediate flip at the max combine setting; determine in mode support and used in mode programming 296 // Mode Support Reason 297 bool WritebackLatencySupport; 298 bool ScaleRatioAndTapsSupport; 299 bool SourceFormatPixelAndScanSupport; 300 bool P2IWith420; 301 bool DSCOnlyIfNecessaryWithBPP; 302 bool DSC422NativeNotSupported; 303 bool LinkRateDoesNotMatchDPVersion; 304 bool LinkRateForMultistreamNotIndicated; 305 bool BPPForMultistreamNotIndicated; 306 bool MultistreamWithHDMIOreDP; 307 bool MSOOrODMSplitWithNonDPLink; 308 bool NotEnoughLanesForMSO; 309 bool NumberOfOTGSupport; 310 bool NumberOfHDMIFRLSupport; 311 bool NumberOfDP2p0Support; 312 bool WritebackScaleRatioAndTapsSupport; 313 bool CursorSupport; 314 bool PitchSupport; 315 bool ViewportExceedsSurface; 316 bool ImmediateFlipRequiredButTheRequirementForEachSurfaceIsNotSpecified; 317 bool ImmediateFlipOrHostVMAndPStateWithMALLFullFrameOrPhantomPipe; 318 bool InvalidCombinationOfMALLUseForPStateAndStaticScreen; 319 bool InvalidCombinationOfMALLUseForPState; 320 bool ExceededMALLSize; 321 bool EnoughWritebackUnits; 322 bool ExceededMultistreamSlots; 323 bool NotEnoughDSCUnits; 324 bool NotEnoughDSCSlices; 325 bool PixelsPerLinePerDSCUnitSupport; 326 bool DSCCLKRequiredMoreThanSupported; 327 bool DTBCLKRequiredMoreThanSupported; 328 bool LinkCapacitySupport; 329 bool ROBSupport; 330 bool OutstandingRequestsSupport; 331 bool OutstandingRequestsUrgencyAvoidance; 332 bool PTEBufferSizeNotExceeded; 333 bool DCCMetaBufferSizeNotExceeded; 334 bool TotalVerticalActiveBandwidthSupport; 335 bool VActiveBandwidthSupport; 336 enum dml2_pstate_change_support FCLKChangeSupport[DML2_MAX_PLANES]; 337 bool USRRetrainingSupport; 338 bool PrefetchSupported; 339 bool DynamicMetadataSupported; 340 bool VRatioInPrefetchSupported; 341 bool DISPCLK_DPPCLK_Support; 342 bool TotalAvailablePipesSupport; 343 bool ViewportSizeSupport; 344 bool ImmediateFlipSupportedForState; 345 double MaxTotalVerticalActiveAvailableBandwidth; 346 bool MPCCombineEnable[DML2_MAX_PLANES]; /// <brief Indicate if the MPC Combine enable in the given state and optimize mpc combine setting 347 enum dml2_odm_mode ODMMode[DML2_MAX_PLANES]; /// <brief ODM mode that is chosen in the mode check stage and will be used in mode programming stage 348 unsigned int DPPPerSurface[DML2_MAX_PLANES]; /// <brief How many DPPs are needed drive the surface to output. If MPCC or ODMC could be 2 or 4. 349 bool DSCEnabled[DML2_MAX_PLANES]; /// <brief Indicate if the DSC is actually required; used in mode_programming 350 bool FECEnabled[DML2_MAX_PLANES]; /// <brief Indicate if the FEC is actually required 351 unsigned int NumberOfDSCSlices[DML2_MAX_PLANES]; /// <brief Indicate how many slices needed to support the given mode 352 double OutputBpp[DML2_MAX_PLANES]; 353 enum dml2_output_type_and_rate__type OutputType[DML2_MAX_PLANES]; 354 enum dml2_output_type_and_rate__rate OutputRate[DML2_MAX_PLANES]; 355 unsigned int AlignedYPitch[DML2_MAX_PLANES]; 356 unsigned int AlignedCPitch[DML2_MAX_PLANES]; 357 bool g6_temp_read_support; 358 bool temp_read_or_ppt_support; 359 }; // dml2_mode_support_info 360 361 struct dml2_display_cfg_programming { 362 struct dml2_display_cfg display_config; 363 364 union { 365 struct { 366 unsigned long dcfclk_khz; 367 unsigned long fclk_khz; 368 unsigned long uclk_khz; 369 unsigned long socclk_khz; 370 unsigned long dispclk_khz; 371 unsigned long dcfclk_deepsleep_khz; 372 unsigned long dpp_ref_khz; 373 } dcn32x; 374 struct { 375 struct { 376 unsigned long uclk_khz; 377 unsigned long fclk_khz; 378 unsigned long dcfclk_khz; 379 } active; 380 struct { 381 unsigned long uclk_khz; 382 unsigned long fclk_khz; 383 unsigned long dcfclk_khz; 384 } idle; 385 struct { 386 unsigned long uclk_khz; 387 unsigned long fclk_khz; 388 unsigned long dcfclk_khz; 389 } svp_prefetch; 390 struct { 391 unsigned long uclk_khz; 392 unsigned long fclk_khz; 393 unsigned long dcfclk_khz; 394 } svp_prefetch_no_throttle; 395 396 unsigned long deepsleep_dcfclk_khz; 397 unsigned long dispclk_khz; 398 unsigned long dpprefclk_khz; 399 unsigned long dtbrefclk_khz; 400 unsigned long socclk_khz; 401 402 struct { 403 uint32_t dispclk_did; 404 uint32_t dpprefclk_did; 405 uint32_t dtbrefclk_did; 406 } divider_ids; 407 } dcn4x; 408 } min_clocks; 409 410 bool uclk_pstate_supported; 411 bool fclk_pstate_supported; 412 413 /* indicates this configuration requires FW to support */ 414 bool fams2_required; 415 struct dmub_cmd_fams2_global_config fams2_global_config; 416 417 struct { 418 bool supported_in_blank; // Changing to configurations where this is false requires stutter to be disabled during the transition 419 } stutter; 420 421 struct { 422 bool meets_eco; // Stutter cycles will meet Z8 ECO criteria 423 bool supported_in_blank; // Changing to configurations where this is false requires Z8 to be disabled during the transition 424 } z8_stutter; 425 426 struct dml2_dchub_global_register_set global_regs; 427 428 struct dml2_per_plane_programming plane_programming[DML2_MAX_PLANES]; 429 struct dml2_per_stream_programming stream_programming[DML2_MAX_PLANES]; 430 431 // Don't access this structure directly, access it through plane_programming.pipe_regs 432 struct dml2_dchub_per_pipe_register_set pipe_regs[DML2_MAX_PLANES]; 433 434 struct { 435 struct { 436 double urgent_us; 437 double writeback_urgent_us; 438 double writeback_pstate_us; 439 double writeback_fclk_pstate_us; 440 double cstate_exit_us; 441 double cstate_enter_plus_exit_us; 442 double z8_cstate_exit_us; 443 double z8_cstate_enter_plus_exit_us; 444 double pstate_change_us; 445 double fclk_pstate_change_us; 446 double usr_retraining_us; 447 double temp_read_or_ppt_watermark_us; 448 } watermarks; 449 450 struct { 451 unsigned int swath_width_plane0; 452 unsigned int swath_height_plane0; 453 unsigned int swath_height_plane1; 454 unsigned int dpte_row_height_plane0; 455 unsigned int dpte_row_height_plane1; 456 unsigned int meta_row_height_plane0; 457 unsigned int meta_row_height_plane1; 458 } plane_info[DML2_MAX_PLANES]; 459 460 struct { 461 unsigned long long total_surface_size_in_mall_bytes; 462 unsigned int subviewport_lines_needed_in_mall[DML2_MAX_PLANES]; 463 } mall; 464 465 struct { 466 double urgent_latency_us; // urgent ramp latency 467 double max_non_urgent_latency_us; 468 double max_urgent_latency_us; 469 double avg_non_urgent_latency_us; 470 double avg_urgent_latency_us; 471 double wm_memory_trip_us; 472 double meta_trip_memory_us; 473 double fraction_of_urgent_bandwidth; // nom 474 double fraction_of_urgent_bandwidth_immediate_flip; 475 double fraction_of_urgent_bandwidth_mall; 476 double max_active_fclk_change_latency_supported; 477 unsigned int min_return_latency_in_dcfclk; 478 479 struct { 480 struct { 481 double sdp_bw_mbps; 482 double dram_bw_mbps; 483 double dram_vm_only_bw_mbps; 484 } svp_prefetch; 485 486 struct { 487 double sdp_bw_mbps; 488 double dram_bw_mbps; 489 double dram_vm_only_bw_mbps; 490 } sys_active; 491 } urg_bw_available; 492 493 struct { 494 struct { 495 double sdp_bw_mbps; 496 double dram_bw_mbps; 497 } svp_prefetch; 498 499 struct { 500 double sdp_bw_mbps; 501 double dram_bw_mbps; 502 } sys_active; 503 } avg_bw_available; 504 505 struct { 506 struct { 507 double sdp_bw_mbps; 508 double dram_bw_mbps; 509 } svp_prefetch; 510 511 struct { 512 double sdp_bw_mbps; 513 double dram_bw_mbps; 514 } sys_active; 515 } non_urg_bw_required; 516 517 struct { 518 struct { 519 double sdp_bw_mbps; 520 double dram_bw_mbps; 521 } svp_prefetch; 522 523 struct { 524 double sdp_bw_mbps; 525 double dram_bw_mbps; 526 } sys_active; 527 } non_urg_bw_required_with_flip; 528 529 struct { 530 struct { 531 double sdp_bw_mbps; 532 double dram_bw_mbps; 533 } svp_prefetch; 534 535 struct { 536 double sdp_bw_mbps; 537 double dram_bw_mbps; 538 } sys_active; 539 540 } urg_bw_required; 541 542 struct { 543 struct { 544 double sdp_bw_mbps; 545 double dram_bw_mbps; 546 } svp_prefetch; 547 548 struct { 549 double sdp_bw_mbps; 550 double dram_bw_mbps; 551 } sys_active; 552 } urg_bw_required_with_flip; 553 554 struct { 555 struct { 556 double sdp_bw_mbps; 557 double dram_bw_mbps; 558 } svp_prefetch; 559 560 struct { 561 double sdp_bw_mbps; 562 double dram_bw_mbps; 563 } sys_active; 564 } avg_bw_required; 565 } qos; 566 567 struct { 568 unsigned long long det_size_in_kbytes[DML2_MAX_PLANES]; 569 unsigned long long DETBufferSizeY[DML2_MAX_PLANES]; 570 unsigned long long comp_buffer_size_kbytes; 571 bool UnboundedRequestEnabled; 572 unsigned int compbuf_reserved_space_64b; 573 } crb; 574 575 struct { 576 unsigned int max_uncompressed_block_plane0; 577 unsigned int max_compressed_block_plane0; 578 unsigned int independent_block_plane0; 579 unsigned int max_uncompressed_block_plane1; 580 unsigned int max_compressed_block_plane1; 581 unsigned int independent_block_plane1; 582 } dcc_control[DML2_MAX_PLANES]; 583 584 struct { 585 double stutter_efficiency; 586 double stutter_efficiency_with_vblank; 587 double stutter_num_bursts; 588 589 struct { 590 double stutter_efficiency; 591 double stutter_efficiency_with_vblank; 592 double stutter_num_bursts; 593 double stutter_period; 594 595 struct { 596 double stutter_efficiency; 597 double stutter_num_bursts; 598 double stutter_period; 599 } bestcase; 600 } z8; 601 } power_management; 602 603 struct { 604 double min_ttu_vblank_us[DML2_MAX_PLANES]; 605 bool vready_at_or_after_vsync[DML2_MAX_PLANES]; 606 double min_dst_y_next_start[DML2_MAX_PLANES]; 607 bool cstate_max_cap_mode; 608 bool hw_debug5; 609 unsigned int dcfclk_deep_sleep_hysteresis; 610 unsigned int dst_x_after_scaler[DML2_MAX_PLANES]; 611 unsigned int dst_y_after_scaler[DML2_MAX_PLANES]; 612 unsigned int prefetch_source_lines_plane0[DML2_MAX_PLANES]; 613 unsigned int prefetch_source_lines_plane1[DML2_MAX_PLANES]; 614 bool ImmediateFlipSupportedForPipe[DML2_MAX_PLANES]; 615 bool UsesMALLForStaticScreen[DML2_MAX_PLANES]; 616 unsigned int CursorDstXOffset[DML2_MAX_PLANES]; 617 unsigned int CursorDstYOffset[DML2_MAX_PLANES]; 618 unsigned int CursorChunkHDLAdjust[DML2_MAX_PLANES]; 619 unsigned int dpte_group_bytes[DML2_MAX_PLANES]; 620 unsigned int vm_group_bytes[DML2_MAX_PLANES]; 621 double DisplayPipeRequestDeliveryTimeLuma[DML2_MAX_PLANES]; 622 double DisplayPipeRequestDeliveryTimeChroma[DML2_MAX_PLANES]; 623 double DisplayPipeRequestDeliveryTimeLumaPrefetch[DML2_MAX_PLANES]; 624 double DisplayPipeRequestDeliveryTimeChromaPrefetch[DML2_MAX_PLANES]; 625 double TimePerVMGroupVBlank[DML2_MAX_PLANES]; 626 double TimePerVMGroupFlip[DML2_MAX_PLANES]; 627 double TimePerVMRequestVBlank[DML2_MAX_PLANES]; 628 double TimePerVMRequestFlip[DML2_MAX_PLANES]; 629 double Tdmdl_vm[DML2_MAX_PLANES]; 630 double Tdmdl[DML2_MAX_PLANES]; 631 unsigned int VStartup[DML2_MAX_PLANES]; 632 unsigned int VUpdateOffsetPix[DML2_MAX_PLANES]; 633 unsigned int VUpdateWidthPix[DML2_MAX_PLANES]; 634 unsigned int VReadyOffsetPix[DML2_MAX_PLANES]; 635 636 double DST_Y_PER_PTE_ROW_NOM_L[DML2_MAX_PLANES]; 637 double DST_Y_PER_PTE_ROW_NOM_C[DML2_MAX_PLANES]; 638 double time_per_pte_group_nom_luma[DML2_MAX_PLANES]; 639 double time_per_pte_group_nom_chroma[DML2_MAX_PLANES]; 640 double time_per_pte_group_vblank_luma[DML2_MAX_PLANES]; 641 double time_per_pte_group_vblank_chroma[DML2_MAX_PLANES]; 642 double time_per_pte_group_flip_luma[DML2_MAX_PLANES]; 643 double time_per_pte_group_flip_chroma[DML2_MAX_PLANES]; 644 double VRatioPrefetchY[DML2_MAX_PLANES]; 645 double VRatioPrefetchC[DML2_MAX_PLANES]; 646 double DestinationLinesForPrefetch[DML2_MAX_PLANES]; 647 double DestinationLinesToRequestVMInVBlank[DML2_MAX_PLANES]; 648 double DestinationLinesToRequestRowInVBlank[DML2_MAX_PLANES]; 649 double DestinationLinesToRequestVMInImmediateFlip[DML2_MAX_PLANES]; 650 double DestinationLinesToRequestRowInImmediateFlip[DML2_MAX_PLANES]; 651 double DisplayPipeLineDeliveryTimeLuma[DML2_MAX_PLANES]; 652 double DisplayPipeLineDeliveryTimeChroma[DML2_MAX_PLANES]; 653 double DisplayPipeLineDeliveryTimeLumaPrefetch[DML2_MAX_PLANES]; 654 double DisplayPipeLineDeliveryTimeChromaPrefetch[DML2_MAX_PLANES]; 655 656 double WritebackRequiredBandwidth; 657 double WritebackAllowDRAMClockChangeEndPosition[DML2_MAX_PLANES]; 658 double WritebackAllowFCLKChangeEndPosition[DML2_MAX_PLANES]; 659 double DSCCLK_calculated[DML2_MAX_PLANES]; 660 unsigned int BIGK_FRAGMENT_SIZE[DML2_MAX_PLANES]; 661 bool PTE_BUFFER_MODE[DML2_MAX_PLANES]; 662 double DSCDelay[DML2_MAX_PLANES]; 663 double MaxActiveDRAMClockChangeLatencySupported[DML2_MAX_PLANES]; 664 unsigned int PrefetchMode[DML2_MAX_PLANES]; // LEGACY_ONLY 665 bool ROBUrgencyAvoidance; 666 double LowestPrefetchMargin; 667 } misc; 668 669 struct dml2_mode_support_info mode_support_info; 670 unsigned int voltage_level; // LEGACY_ONLY 671 672 // For DV only 673 // This is what dml core calculated, only on the full_vp width and assume we have 674 // unlimited # of mcache 675 struct dml2_mcache_surface_allocation non_optimized_mcache_allocation[DML2_MAX_PLANES]; 676 677 bool failed_mcache_validation; 678 bool failed_dpmm; 679 bool failed_mode_programming; 680 bool failed_map_watermarks; 681 } informative; 682 }; 683 684 struct dml2_build_mode_programming_in_out { 685 /* 686 * Inputs 687 */ 688 struct dml2_instance *dml2_instance; 689 const struct dml2_display_cfg *display_config; 690 691 /* 692 * Outputs 693 */ 694 struct dml2_display_cfg_programming *programming; 695 }; 696 697 struct dml2_build_mcache_programming_in_out { 698 /* 699 * Inputs 700 */ 701 struct dml2_instance *dml2_instance; 702 703 struct dml2_plane_mcache_configuration_descriptor mcache_configurations[DML2_MAX_PLANES]; 704 char num_configurations; 705 706 /* 707 * Outputs 708 */ 709 // per_plane_pipe_mcache_regs[i][j] refers to the proper programming for the j-th pipe of the 710 // i-th plane (from mcache_configurations) 711 struct dml2_hubp_pipe_mcache_regs *per_plane_pipe_mcache_regs[DML2_MAX_PLANES][DML2_MAX_DCN_PIPES]; 712 713 // It's not a good idea to reference this directly, better to use the pointer structure above instead 714 struct dml2_hubp_pipe_mcache_regs mcache_regs_set[DML2_MAX_DCN_PIPES]; 715 }; 716 717 struct dml2_unit_test_in_out { 718 /* 719 * Inputs 720 */ 721 struct dml2_instance *dml2_instance; 722 }; 723 724 725 #endif 726