History

Merge tag 'drm-next-2022-10-05' of git://anongit.freedesktop.org/drm/drm

Pull drm updates from Dave Airlie: "Lots of stuff all over, some new AMD IP support and gang submit support. i915 has further DG2 and Meteorlake pieces, and a bunch of i915 display refactoring. msm has a shrinker rework. There are also a bunch of conversions to use kunit. This has two external pieces, some MEI changes needed for future Intel discrete GPUs. These should be acked by Greg. There is also a cross maintainer shared tree with some backlight rework from Hans in here. Core: - convert selftests to kunit - managed init for more objects - move to idr_init_base - rename fb and gem cma helpers to dma - hide unregistered connectors from getconnector ioctl - DSC passthrough aux support - backlight handling improvements - add dma_resv_assert_held to vmap/vunmap edid: - move luminance calculation to core fbdev: - fix aperture helper usage fourcc: - add more format helpers - add DRM_FORMAT_Cxx, DRM_FORMAT_Rxx, DRM_FORMAT_Dxx - add packed AYUV8888, XYUV8888 - add some kunit tests ttm: - allow bos without backing store - rewrite placement to use intersect/compatible functions dma-buf: - docs update - improve signalling when debugging udmabuf: - fix failure path GPF dp: - drop dp/mst legacy code - atomic mst state support - audio infoframe packing panel: - Samsung LTL101AL01 - B120XAN01.0 - R140NWF5 RH - DMT028VGHMCMI-1A T - AUO B133UAN02.1 - IVO M133NW4J-R3 - Innolux N120ACA-EA1 amdgpu: - Gang submit support - Mode2 reset for RDNA2 - New IP support: DCN 3.1.4, 3.2 SMU 13.x NBIO 7.7 GC 11.x PSP 13.x SDMA 6.x GMC 11.x - DSC passthrough support - PSP fixes for TA support - vangogh GFXOFF stats - clang fixes - gang submit CS cleanup prep work - fix VRAM eviction issues amdkfd: - GC 10.3 IP ISA fixes - fix CRIU regression - CPU fault on COW mapping fixes i915: - align fw versioning with kernel practices - add display substruct to i915 private - add initial runtime info to driver info - split out HDCP and backlight registers - MEI XeHP SDV GSC support - add per-gt sysfs defaults - TLB invalidation improvements - Disable PCI BAR resize on 32-bit - GuC firmware updates and compat changes - GuC log timestamp translation - DG2 preemption workaround changes - DG2 improved HDMI pixel clocks support - PCI BAR sanity checks - Enable DC5 on DG2 - DG2 DMC fw bumped - ADL-S PCI ID added - Meteorlake enablement - Rename ggtt_view to gtt_view - host RPS fixes - release mmaps on rpm suspend on discrete - clocking and dpll refactoring - VBT definitions and parsing updates - SKL watermark code extracted to separate file - allow seamless M/N changes on eDP panels - BUG_ON removal and cleanups msm: - DPU: simplified VBIF configuration cleanup CTL interfaces - DSI: removed unused msm_display_dsc_config struct switch regulator calls to new API switched to PANEL_BRIDGE for direct attached panels - DSI_PHY: convert drivers to parent_hws - DP: cleanup pixel_rate handling - HDMI: turned hdmi-phy-8996 into OF clk provider - misc dt-bindings fixes - choose eDP as primary display if it's available - support getting interconnects from either the mdss or the mdp5/dpu device nodes - gem: Shrinker + LRU re-work: - adds a shared GEM LRU+shrinker helper and moves msm over to that - reduce lock contention between retire and submit by avoiding the need to acquire obj lock in retire path (and instead using resv seeing obj's busyness in the shrinker - fix reclaim vs submit issues - GEM fault injection for triggering userspace error paths - Map/unmap optimization - Improved robustness for a6xx GPU recovery virtio: - improve error and edge conditions handling - convert to use managed helpers - stop exposing LINEAR modifier mgag200: - split modeset handling per model udl: - suspend/disconnect handling improvements vc4: - rework HDMI power up - depend on PM - better unplugging support ast: - resolution handling improvements ingenic: - add JZ4760(B) support - avoid a modeset when sharpness property is unchanged - use the new PM ops it6505: - power seq and clock updates ssd130x: - regmap bulk write - use atomic helpers instead of simple helpers via: - rename via_drv to via_dri1, consolidate all code. radeon: - drop DP MST experimental support - delayed work flush fix - use time_after ti-sn65dsi86: - DP support mediatek: - MT8195 DP support - drop of_gpio header - remove unneeded result - small DP code improvements vkms: - RGB565, XRGB64 and ARGB64 support sun4i: - tv: convert to atomic rcar-du: - Synopsys DW HDMI bridge DT bindings update exynos: - use drm_display_info.is_hdmi - correct return of mixer_mode_valid and hdmi_mode_valid omap: - refcounting fix rockchip: - RK3568 support - RK3399 gamma support" * tag 'drm-next-2022-10-05' of git://anongit.freedesktop.org/drm/drm: (1374 commits) drm/amdkfd: Fix UBSAN shift-out-of-bounds warning drm/amdkfd: Track unified memory when switching xnack mode drm/amdgpu: Enable sram on vcn_4_0_2 drm/amdgpu: Enable VCN DPG for GC11_0_1 drm/msm: Fix build break with recent mm tree drm/panel: simple: Use dev_err_probe() to simplify code drm/panel: panel-edp: Use dev_err_probe() to simplify code drm/panel: simple: Add Multi-Inno Technology MI0800FT-9 dt-bindings: display: simple: Add Multi-Inno Technology MI0800FT-9 panel drm/amdgpu: correct the memcpy size for ip discovery firmware drm/amdgpu: Skip put_reset_domain if it doesn't exist drm/amdgpu: remove switch from amdgpu_gmc_noretry_set drm/amdgpu: Fix mc_umc_status used uninitialized warning drm/amd/display: Prevent OTG shutdown during PSR SU drm/amdgpu: add page retirement handling for CPU RAS drm/amdgpu: use RAS error address convert api in mca notifier drm/amdgpu: support to convert dedicated umc mca address drm/amdgpu: export umc error address convert interface drm/amdgpu: fix sdma v4 init microcode error drm/amd/display: fix array-bounds error in dc_stream_remove_writeback() ...

Linus Torvalds committed 4 years ago

Commit 7e6739b2 parents a47e607 65898681162 files · +113180 −35976Browse files

Unified · Split

495 files
  1. Documentation/devicetree/bindings/display/bridge/chipone,icn6211.yaml +9 −0
  2. Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml +5 −0
  3. Documentation/devicetree/bindings/display/ingenic,lcd.yaml +2 −0
  4. Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml +116 −0
  5. Documentation/devicetree/bindings/display/msm/dp-controller.yaml +41 −6
  6. Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml +4 −0
  7. Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml +3 −0
  8. Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml +3 −0
  9. Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml +3 −0
  10. Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml +4 −0
  11. Documentation/devicetree/bindings/display/msm/gmu.yaml +146 −20
  12. Documentation/devicetree/bindings/display/msm/gpu.yaml +2 −1
  13. Documentation/devicetree/bindings/display/msm/mdp4.yaml +1 −1
  14. Documentation/devicetree/bindings/display/panel/panel-simple.yaml +4 −0
  15. Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml +4 −0
  16. Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt +1 −0
  17. Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml +12 −3
  18. Documentation/gpu/amdgpu/apu-asic-info-table.csv +8 −0
  19. Documentation/gpu/amdgpu/dgpu-asic-info-table.csv +24 −0
  20. Documentation/gpu/amdgpu/display/dc-glossary.rst +1 −1
  21. Documentation/gpu/amdgpu/display/dcn-overview.rst +59 −0
  22. Documentation/gpu/amdgpu/display/dcn2_cm_drm_current.svg +1370 −0
  23. Documentation/gpu/amdgpu/display/dcn3_cm_drm_current.svg +1529 −0
  24. Documentation/gpu/amdgpu/display/display-manager.rst +141 −0
  25. Documentation/gpu/amdgpu/display/index.rst +1 −0
  26. Documentation/gpu/amdgpu/display/mpo-cursor.svg +435 −0
  27. Documentation/gpu/amdgpu/display/mpo-overview.rst +242 −0
  28. Documentation/gpu/amdgpu/display/multi-display-hdcp-mpo-less-pipe-ex.svg +220 −0
  29. Documentation/gpu/amdgpu/display/multi-display-hdcp-mpo.svg +171 −0
  30. Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg +958 −0
  31. Documentation/gpu/amdgpu/display/pipeline_4k_split.svg +1062 −0
  32. Documentation/gpu/amdgpu/display/single-display-mpo-multi-video.svg +339 −0
  33. Documentation/gpu/amdgpu/display/single-display-mpo.svg +266 −0
  34. Documentation/gpu/amdgpu/driver-misc.rst +17 −0
  35. Documentation/gpu/amdgpu/thermal.rst +17 −1
  36. Documentation/gpu/drm-kms-helpers.rst +4 −4
  37. Documentation/gpu/drm-kms.rst +2 −0
  38. Documentation/gpu/drm-mm.rst +8 −8
  39. Documentation/gpu/todo.rst +0 −36
  40. Documentation/gpu/vkms.rst +1 −6
  41. MAINTAINERS +5 −0
  42. drivers/dma-buf/dma-fence.c +13 −9
  43. drivers/dma-buf/st-dma-fence-chain.c +4 −0
  44. drivers/dma-buf/st-dma-fence-unwrap.c +22 −0
  45. drivers/dma-buf/st-dma-fence.c +16 −0
  46. drivers/dma-buf/st-dma-resv.c +10 −0
  47. drivers/dma-buf/sync_file.c +4 −4
  48. drivers/dma-buf/udmabuf.c +6 −3
  49. drivers/firmware/sysfb.c +4 −0
  50. drivers/gpu/drm/Kconfig +6 −19
  51. drivers/gpu/drm/Makefile +3 −4
  52. drivers/gpu/drm/amd/amdgpu/Makefile +4 −3
  53. drivers/gpu/drm/amd/amdgpu/amdgpu.h +9 −0
  54. drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +13 −4
  55. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +5 −5
  56. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +19 −11
  57. drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +6 −1
  58. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +898 −844
  59. drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h +7 −3
  60. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +2 −4
  61. drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h +0 −1
  62. drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +170 −0
  63. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +100 −22
  64. drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +16 −3
  65. drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +1 −1
  66. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +39 −4
  67. drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +180 −1
  68. drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +12 −4
  69. drivers/gpu/drm/amd/amdgpu/amdgpu_gfxhub.h +3 −0
  70. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +9 −39
  71. drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +26 −0
  72. drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c +38 −0
  73. drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +47 −3
  74. drivers/gpu/drm/amd/amdgpu/amdgpu_job.h +10 −0
  75. drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +49 −1
  76. drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +0 −1
  77. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 −2
  78. drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +35 −17
  79. drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +6 −0
  80. drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +18 −17
  81. drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +10 −0
  82. drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c +21 −0
  83. drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h +4 −1
  84. drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +3 −0
  85. drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c +8 −0
  86. drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +133 −0
  87. drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h +4 −0
  88. drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +3 −1
  89. drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +7 −5
  90. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +15 −33
  91. drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +118 −50
  92. drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +1 −0
  93. drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h +6 −0
  94. drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +19 −0
  95. drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +56 −1
  96. drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +5 −0
  97. drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c +2 −2
  98. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +67 −30
  99. drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +8 −1
  100. drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +41 −3
  101. drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c +8 −4
  102. drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +68 −0
  103. drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +18 −6
  104. drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h +1 −0
  105. drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +24 −267
  106. drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +37 −180
  107. drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +25 −193
  108. drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c +108 −0
  109. drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c +511 −0
  110. drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.h +29 −0
  111. drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +16 −3
  112. drivers/gpu/drm/amd/amdgpu/ih_v6_0.c +23 −3
  113. drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +6 −0
  114. drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.c +145 −0
  115. drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.h +29 −0
  116. drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +11 −0
  117. drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c +5 −5
  118. drivers/gpu/drm/amd/amdgpu/mmsch_v4_0.h +140 −0
  119. drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c +1 −0
  120. drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 −0
  121. drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1 −0
  122. drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c +44 −0
  123. drivers/gpu/drm/amd/amdgpu/nbio_v4_3.h +1 −0
  124. drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +9 −0
  125. drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +19 −91
  126. drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +9 −40
  127. drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +3 −71
  128. drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +10 −77
  129. drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c +303 −0
  130. drivers/gpu/drm/amd/amdgpu/sienna_cichlid.h +6 −8
  131. drivers/gpu/drm/amd/amdgpu/soc21.c +18 −1
  132. drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +33 −25
  133. drivers/gpu/drm/amd/amdgpu/umc_v8_10.c +3 −9
  134. drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +10 −7
  135. drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +312 −31
  136. drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h +387 −384
  137. drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm +21 −0
  138. drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +41 −13
  139. drivers/gpu/drm/amd/amdkfd/kfd_crat.c +2 −1
  140. drivers/gpu/drm/amd/amdkfd/kfd_device.c +8 −0
  141. drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +21 −24
  142. drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c +12 −0
  143. drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +36 −21
  144. drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c +12 −73
  145. drivers/gpu/drm/amd/amdkfd/kfd_process.c +0 −5
  146. drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +7 −0
  147. drivers/gpu/drm/amd/amdkfd/kfd_svm.c +59 −23
  148. drivers/gpu/drm/amd/amdkfd/kfd_svm.h +1 −2
  149. drivers/gpu/drm/amd/display/Kconfig +0 −2
  150. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +54 −96
  151. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +41 −6
  152. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +81 −28
  153. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +104 −77
  154. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +123 −86
  155. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +1 −1
  156. drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +76 −27
  157. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +46 −0
  158. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +49 −1
  159. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +47 −1
  160. drivers/gpu/drm/amd/display/dc/core/dc.c +122 −78
  161. drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +38 −0
  162. drivers/gpu/drm/amd/display/dc/core/dc_link.c +84 −46
  163. drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c +18 −0
  164. drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +206 −231
  165. drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c +21 −12
  166. drivers/gpu/drm/amd/display/dc/core/dc_resource.c +22 −3
  167. drivers/gpu/drm/amd/display/dc/core/dc_stream.c +2 −1
  168. drivers/gpu/drm/amd/display/dc/dc.h +123 −17
  169. drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +68 −7
  170. drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +2 −0
  171. drivers/gpu/drm/amd/display/dc/dc_hw_types.h +141 −7
  172. drivers/gpu/drm/amd/display/dc/dc_link.h +29 −1
  173. drivers/gpu/drm/amd/display/dc/dc_stream.h +2 −6
  174. drivers/gpu/drm/amd/display/dc/dce/dce_audio.c +1 −1
  175. drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +5 −7
  176. drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +4 −3
  177. drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +146 −10
  178. drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +19 −1
  179. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +3 −2
  180. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +3 −6
  181. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +91 −62
  182. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +1 −2
  183. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c +4 −0
  184. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +42 −5
  185. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h +2 −0
  186. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +18 −0
  187. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h +1 −0
  188. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c +3 −6
  189. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +33 −4
  190. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +4 −0
  191. drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mmhubbub.c +2 −1
  192. drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c +2 −1
  193. drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c +4 −0
  194. drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +4 −0
  195. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +20 −1
  196. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +4 −0
  197. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.h +0 −8
  198. drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +4 −3
  199. drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c +4 −0
  200. drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +4 −1
  201. drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +2 −1
  202. drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +1 −0
  203. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c +3 −3
  204. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubbub.c +1 −1
  205. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubbub.h +2 −0
  206. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c +1 −1
  207. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c +4 −0
  208. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +1 −2
  209. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c +3 −3
  210. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.h +52 −18
  211. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c +1 −1
  212. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c +3 −0
  213. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c +4 −0
  214. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c +1 −1
  215. drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +2 −3
  216. drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c +0 −1
  217. drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c +0 −1
  218. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c +4 −4
  219. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c +2 −2
  220. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c +1 −1
  221. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.c +1 −1
  222. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c +7 −7
  223. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.h +29 −0
  224. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +268 −123
  225. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h +16 −0
  226. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c +7 −0
  227. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.c +1 −1
  228. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.h +0 −10
  229. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c +3 −3
  230. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c +3 −3
  231. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +402 −370
  232. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h +1167 −2
  233. drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +138 −28
  234. drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +360 −318
  235. drivers/gpu/drm/amd/display/dc/dm_helpers.h +9 −3
  236. drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c +6 −8
  237. drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.c +11 −11
  238. drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c +7 −9
  239. drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c +6 −26
  240. drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +17 −17
  241. drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c +5 −5
  242. drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +5 −3
  243. drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +65 −237
  244. drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c +26 −19
  245. drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c +59 −35
  246. drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c +6 −4
  247. drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +7 −0
  248. drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +6 −4
  249. drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +159 −37
  250. drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h +2 −8
  251. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c +6 −4
  252. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +21 −25
  253. drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h +1 −0
  254. drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c +9 −5
  255. drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h +33 −4
  256. drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +1 −0
  257. drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +1 −0
  258. drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h +2 −7
  259. drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c +0 −1884
  260. drivers/gpu/drm/amd/display/dc/dml/dml_wrapper_translation.c +0 −284
  261. drivers/gpu/drm/amd/display/dc/inc/core_types.h +4 −0
  262. drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +5 −0
  263. drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +14 −0
  264. drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +77 −14
  265. drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h +11 −3
  266. drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +31 −7
  267. drivers/gpu/drm/amd/display/dc/inc/hw_sequencer_private.h +2 −0
  268. drivers/gpu/drm/amd/display/dc/inc/link_hwss.h +3 −3
  269. drivers/gpu/drm/amd/display/dc/inc/resource.h +2 −0
  270. drivers/gpu/drm/amd/display/dc/link/link_hwss_dio.c +2 −2
  271. drivers/gpu/drm/amd/display/dc/link/link_hwss_dio.h +1 −1
  272. drivers/gpu/drm/amd/display/dc/link/link_hwss_dpia.c +1 −1
  273. drivers/gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c +1 −1
  274. drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.c +8 −0
  275. drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 −0
  276. drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +65 −4
  277. drivers/gpu/drm/amd/display/include/dal_asic_id.h +1 −0
  278. drivers/gpu/drm/amd/display/include/ddc_service_types.h +2 −2
  279. drivers/gpu/drm/amd/display/include/link_service_types.h +12 −3
  280. drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h +108 −0
  281. drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_sh_mask.h +1468 −1
  282. drivers/gpu/drm/amd/include/asic_reg/gc/gc_11_0_3_offset.h +12086 −0
  283. drivers/gpu/drm/amd/include/asic_reg/gc/gc_11_0_3_sh_mask.h +44640 −0
  284. drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h +4 −0
  285. drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h +8 −0
  286. drivers/gpu/drm/amd/include/kgd_pp_interface.h +58 −0
  287. drivers/gpu/drm/amd/pm/amdgpu_dpm.c +45 −0
  288. drivers/gpu/drm/amd/pm/amdgpu_pm.c +0 −3
  289. drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +3 −0
  290. drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +4 −1
  291. drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c +12 −13
  292. drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c +1 −4
  293. drivers/gpu/drm/amd/pm/powerplay/inc/hardwaremanager.h +0 −2
  294. drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c +1 −3
  295. drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +34 −0
  296. drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +22 −0
  297. drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v11_0_7_ppsmc.h +2 −2
  298. drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h +4 −1
  299. drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +5 −1
  300. drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +1 −0
  301. drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +54 −0
  302. drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +224 −12
  303. drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +15 −0
  304. drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +3 −0
  305. drivers/gpu/drm/amd/pm/swsmu/smu_internal.h +3 −0
  306. drivers/gpu/drm/arm/Kconfig +2 −2
  307. drivers/gpu/drm/arm/display/Kconfig +1 −1
  308. drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c +1 −2
  309. drivers/gpu/drm/arm/display/komeda/komeda_crtc.c +2 −3
  310. drivers/gpu/drm/arm/display/komeda/komeda_drv.c +2 −0
  311. drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +6 −6
  312. drivers/gpu/drm/arm/display/komeda/komeda_kms.c +25 −6
  313. drivers/gpu/drm/arm/display/komeda/komeda_kms.h +2 −0
  314. drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c +1 −1
  315. drivers/gpu/drm/arm/display/komeda/komeda_plane.c +0 −1
  316. drivers/gpu/drm/arm/hdlcd_crtc.c +5 −6
  317. drivers/gpu/drm/arm/hdlcd_drv.c +28 −49
  318. drivers/gpu/drm/arm/malidp_drv.c +4 −5
  319. drivers/gpu/drm/arm/malidp_mw.c +4 −4
  320. drivers/gpu/drm/arm/malidp_planes.c +17 −18
  321. drivers/gpu/drm/arm/malidp_regs.h +1 −1
  322. drivers/gpu/drm/armada/armada_crtc.c +0 −1
  323. drivers/gpu/drm/armada/armada_gem.c +3 −3
  324. drivers/gpu/drm/armada/armada_overlay.c +1 −7
  325. drivers/gpu/drm/armada/armada_plane.c +1 −1
  326. drivers/gpu/drm/aspeed/Kconfig +1 −1
  327. drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c +5 −5
  328. drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +3 −4
  329. drivers/gpu/drm/ast/ast_drv.c +1 −1
  330. drivers/gpu/drm/ast/ast_mode.c +21 −7
  331. drivers/gpu/drm/ast/ast_tables.h +7 −0
  332. drivers/gpu/drm/atmel-hlcdc/Kconfig +1 −1
  333. drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +3 −3
  334. drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +4 −5
  335. drivers/gpu/drm/bridge/adv7511/adv7511.h +1 −4
  336. drivers/gpu/drm/bridge/adv7511/adv7511_cec.c +2 −2
  337. drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +2 −3
  338. drivers/gpu/drm/bridge/analogix/anx7625.c +32 −6
  339. drivers/gpu/drm/bridge/analogix/anx7625.h +6 −0
  340. drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +2 −1
  341. drivers/gpu/drm/bridge/chipone-icn6211.c +38 −10
  342. drivers/gpu/drm/bridge/ite-it6505.c +18 −9
  343. drivers/gpu/drm/bridge/lontium-lt8912b.c +17 −9
  344. drivers/gpu/drm/bridge/lontium-lt9611.c +2 −1
  345. drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +3 −1
  346. drivers/gpu/drm/bridge/panel.c +74 −0
  347. drivers/gpu/drm/bridge/parade-ps8640.c +7 −2
  348. drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +3 −3
  349. drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +8 −5
  350. drivers/gpu/drm/bridge/tc358762.c +1 −3
  351. drivers/gpu/drm/bridge/tc358764.c +1 −3
  352. drivers/gpu/drm/bridge/tc358767.c +40 −50
  353. drivers/gpu/drm/bridge/ti-sn65dsi86.c +96 −23
  354. drivers/gpu/drm/display/drm_dp_helper.c +33 −10
  355. drivers/gpu/drm/display/drm_dp_mst_topology.c +518 −631
  356. drivers/gpu/drm/display/drm_scdc_helper.c +13 −0
  357. drivers/gpu/drm/drm_aperture.c +5 −5
  358. drivers/gpu/drm/drm_atomic_helper.c +75 −9
  359. drivers/gpu/drm/drm_auth.c +2 −2
  360. drivers/gpu/drm/drm_bridge.c +2 −2
  361. drivers/gpu/drm/drm_client.c +2 −2
  362. drivers/gpu/drm/drm_color_mgmt.c +1 −1
  363. drivers/gpu/drm/drm_connector.c +107 −28
  364. drivers/gpu/drm/drm_crtc.c +82 −12
  365. drivers/gpu/drm/drm_crtc_helper.c +0 −1
  366. drivers/gpu/drm/drm_damage_helper.c +7 −4
  367. drivers/gpu/drm/drm_edid.c +51 −1
  368. drivers/gpu/drm/drm_encoder.c +64 −11
  369. drivers/gpu/drm/drm_fb_dma_helper.c +36 −31
  370. drivers/gpu/drm/drm_fb_helper.c +75 −26
  371. drivers/gpu/drm/drm_file.c +1 −142
  372. drivers/gpu/drm/drm_format_helper.c +456 −246
  373. drivers/gpu/drm/drm_fourcc.c +54 −1
  374. drivers/gpu/drm/drm_framebuffer.c +35 −35
  375. drivers/gpu/drm/drm_gem.c +170 −0
  376. drivers/gpu/drm/drm_gem_dma_helper.c +151 −151
  377. drivers/gpu/drm/drm_gem_framebuffer_helper.c +3 −9
  378. drivers/gpu/drm/drm_gem_shmem_helper.c +1 −1
  379. drivers/gpu/drm/drm_gem_vram_helper.c +3 −3
  380. drivers/gpu/drm/drm_ioctl.c +7 −1
  381. drivers/gpu/drm/drm_mipi_dbi.c +24 −25
  382. drivers/gpu/drm/drm_mipi_dsi.c +4 −1
  383. drivers/gpu/drm/drm_mode_config.c +5 −2
  384. drivers/gpu/drm/drm_modeset_helper.c +30 −36
  385. drivers/gpu/drm/drm_panel_orientation_quirks.c +18 −0
  386. drivers/gpu/drm/drm_plane.c +38 −32
  387. drivers/gpu/drm/drm_plane_helper.c +93 −21
  388. drivers/gpu/drm/drm_probe_helper.c +64 −0
  389. drivers/gpu/drm/drm_simple_kms_helper.c +2 −3
  390. drivers/gpu/drm/exynos/exynos_drm_plane.c +0 −1
  391. drivers/gpu/drm/exynos/exynos_hdmi.c +3 −3
  392. drivers/gpu/drm/exynos/exynos_mixer.c +1 −1
  393. drivers/gpu/drm/fsl-dcu/Kconfig +1 −1
  394. drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +3 −4
  395. drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c +0 −1
  396. drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +6 −12
  397. drivers/gpu/drm/gma500/backlight.c +68 −34
  398. drivers/gpu/drm/gma500/cdv_device.c +9 −41
  399. drivers/gpu/drm/gma500/cdv_intel_dp.c +1 −1
  400. drivers/gpu/drm/gma500/gma_display.c +1 −18
  401. drivers/gpu/drm/gma500/gma_display.h +0 −2
  402. drivers/gpu/drm/gma500/oaktrail_crtc.c +1 −1
  403. drivers/gpu/drm/gma500/oaktrail_device.c +5 −60
  404. drivers/gpu/drm/gma500/oaktrail_lvds.c +0 −1
  405. drivers/gpu/drm/gma500/opregion.c +1 −5
  406. drivers/gpu/drm/gma500/power.c +30 −128
  407. drivers/gpu/drm/gma500/power.h +0 −18
  408. drivers/gpu/drm/gma500/psb_device.c +4 −69
  409. drivers/gpu/drm/gma500/psb_drv.c +5 −45
  410. drivers/gpu/drm/gma500/psb_drv.h +8 −12
  411. drivers/gpu/drm/gma500/psb_intel_display.c +0 −2
  412. drivers/gpu/drm/gma500/psb_intel_drv.h +0 −5
  413. drivers/gpu/drm/gma500/psb_intel_sdvo.c +41 −21
  414. drivers/gpu/drm/gma500/psb_irq.c +7 −8
  415. drivers/gpu/drm/gud/gud_pipe.c +21 −13
  416. drivers/gpu/drm/hisilicon/kirin/Kconfig +1 −1
  417. drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +7 −8
  418. drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +1 −2
  419. drivers/gpu/drm/hyperv/hyperv_drm_modeset.c +4 −5
  420. drivers/gpu/drm/i915/Makefile +3 −1
  421. drivers/gpu/drm/i915/display/g4x_dp.c +2 −2
  422. drivers/gpu/drm/i915/display/hsw_ips.c +1 −1
  423. drivers/gpu/drm/i915/display/i9xx_plane.c +3 −4
  424. drivers/gpu/drm/i915/display/icl_dsi.c +7 −10
  425. drivers/gpu/drm/i915/display/intel_atomic.c +4 −5
  426. drivers/gpu/drm/i915/display/intel_atomic_plane.c +1 −2
  427. drivers/gpu/drm/i915/display/intel_audio.c +51 −51
  428. drivers/gpu/drm/i915/display/intel_backlight.c +22 −20
  429. drivers/gpu/drm/i915/display/intel_backlight_regs.h +124 −0
  430. drivers/gpu/drm/i915/display/intel_bios.c +204 −171
  431. drivers/gpu/drm/i915/display/intel_bios.h +1 −0
  432. drivers/gpu/drm/i915/display/intel_bw.c +103 −35
  433. drivers/gpu/drm/i915/display/intel_cdclk.c +150 −143
  434. drivers/gpu/drm/i915/display/intel_cdclk.h +2 −2
  435. drivers/gpu/drm/i915/display/intel_color.c +18 −17
  436. drivers/gpu/drm/i915/display/intel_connector.c +4 −4
  437. drivers/gpu/drm/i915/display/intel_crt.c +7 −6
  438. drivers/gpu/drm/i915/display/intel_crtc.c +0 −1
  439. drivers/gpu/drm/i915/display/intel_crtc_state_dump.c +5 −4
  440. drivers/gpu/drm/i915/display/intel_cursor.c +3 −4
  441. drivers/gpu/drm/i915/display/intel_ddi.c +45 −44
  442. drivers/gpu/drm/i915/display/intel_display.c +171 −210
  443. drivers/gpu/drm/i915/display/intel_display.h +4 −4
  444. drivers/gpu/drm/i915/display/intel_display_core.h +418 −0
  445. drivers/gpu/drm/i915/display/intel_display_debugfs.c +49 −98
  446. drivers/gpu/drm/i915/display/intel_display_power.c +80 −73
  447. drivers/gpu/drm/i915/display/intel_display_power_map.c +116 −3
  448. drivers/gpu/drm/i915/display/intel_display_power_well.c +87 −42
  449. drivers/gpu/drm/i915/display/intel_display_power_well.h +10 −6
  450. drivers/gpu/drm/i915/display/intel_display_types.h +3 −2
  451. drivers/gpu/drm/i915/display/intel_dmc.c +108 −34
  452. drivers/gpu/drm/i915/display/intel_dmc.h +1 −0
  453. drivers/gpu/drm/i915/display/intel_dmc_regs.h +2 −0
  454. drivers/gpu/drm/i915/display/intel_dp.c +82 −39
  455. drivers/gpu/drm/i915/display/intel_dp_aux.c +54 −3
  456. drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c +13 −2
  457. drivers/gpu/drm/i915/display/intel_dp_hdcp.c +1 −0
  458. drivers/gpu/drm/i915/display/intel_dp_link_training.c +36 −47
  459. drivers/gpu/drm/i915/display/intel_dp_mst.c +39 −66
  460. drivers/gpu/drm/i915/display/intel_dpio_phy.c +1 −1
  461. drivers/gpu/drm/i915/display/intel_dpll.c +82 −29
  462. drivers/gpu/drm/i915/display/intel_dpll_mgr.c +178 −148
  463. drivers/gpu/drm/i915/display/intel_dsb.c +30 −0
  464. drivers/gpu/drm/i915/display/intel_dsb.h +0 −28
  465. drivers/gpu/drm/i915/display/intel_dsi.c +1 −1
  466. drivers/gpu/drm/i915/display/intel_dsi.h +0 −3
  467. drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c +8 −6
  468. drivers/gpu/drm/i915/display/intel_dvo_dev.h +2 −2
  469. drivers/gpu/drm/i915/display/intel_fb.c +9 −9
  470. drivers/gpu/drm/i915/display/intel_fb_pin.c +2 −2
  471. drivers/gpu/drm/i915/display/intel_fb_pin.h +2 −2
  472. drivers/gpu/drm/i915/display/intel_fbc.c +12 −6
  473. drivers/gpu/drm/i915/display/intel_fbc.h +1 −0
  474. drivers/gpu/drm/i915/display/intel_fbdev.c +24 −16
  475. drivers/gpu/drm/i915/display/intel_fdi.c +10 −10
  476. drivers/gpu/drm/i915/display/intel_frontbuffer.c +29 −27
  477. drivers/gpu/drm/i915/display/intel_frontbuffer.h +18 −0
  478. drivers/gpu/drm/i915/display/intel_gmbus.c +153 −137
  479. drivers/gpu/drm/i915/display/intel_gmbus.h +1 −0
  480. drivers/gpu/drm/i915/display/intel_gmbus_regs.h +81 −0
  481. drivers/gpu/drm/i915/display/intel_hdcp.c +93 −70
  482. drivers/gpu/drm/i915/display/intel_hdcp_regs.h +270 −0
  483. drivers/gpu/drm/i915/display/intel_hdmi.c +11 −1
  484. drivers/gpu/drm/i915/display/intel_hotplug.c +58 −58
  485. drivers/gpu/drm/i915/display/intel_lpe_audio.c +24 −23
  486. drivers/gpu/drm/i915/display/intel_lvds.c +2 −2
  487. drivers/gpu/drm/i915/display/intel_modeset_setup.c +8 −7
  488. drivers/gpu/drm/i915/display/intel_modeset_verify.c +4 −4
  489. drivers/gpu/drm/i915/display/intel_opregion.c +21 −21
  490. drivers/gpu/drm/i915/display/intel_overlay.c +8 −8
  491. drivers/gpu/drm/i915/display/intel_panel.c +24 −21
  492. drivers/gpu/drm/i915/display/intel_panel.h +3 −0
  493. drivers/gpu/drm/i915/display/intel_pch_refclk.c +13 −3
  494. drivers/gpu/drm/i915/display/intel_pch_refclk.h +1 −0
  495. drivers/gpu/drm/i915/display/intel_plane_initial.c +1 −1
Documentation/devicetree/bindings/display/bridge/chipone,icn6211.yaml+9−0
@@ -24,6 +24,15 @@ properties: · 23 unmodified lines
2424 maxItems: 1
2525 description: virtual channel number of a DSI peripheral
2626
27+ clock-names:
28+ const: refclk
29+
30+ clocks:
31+ maxItems: 1
32+ description: |
33+ Optional external clock connected to REF_CLK input.
34+ The clock rate must be in 10..154 MHz range.
35+
2736 enable-gpios:
2837 description: Bridge EN pin, chip is reset when EN is low.
2938
Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.yaml+5−0
@@ -38,6 +38,9 @@ properties: · 37 unmodified lines
3838 clock-names:
3939 maxItems: 2
4040
41+ resets:
42+ maxItems: 1
43+
4144 ports:
4245 $ref: /schemas/graph.yaml#/properties/ports
4346
@@ -67,6 +70,7 @@ required: · 23 unmodified lines
6770 - reg
6871 - clocks
6972 - clock-names
73+ - resets
7074 - interrupts
7175 - ports
7276
@@ -85,6 +89,7 @@ examples: · 12 unmodified lines
8589 clocks = <&cpg CPG_CORE R8A7795_CLK_S0D4>, <&cpg CPG_MOD 729>;
8690 clock-names = "iahb", "isfr";
8791 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
92+ resets = <&cpg 729>;
8893
8994 ports {
9095 #address-cells = <1>;
Documentation/devicetree/bindings/display/ingenic,lcd.yaml+2−0
@@ -17,6 +17,8 @@ properties: · 16 unmodified lines
1717 enum:
1818 - ingenic,jz4740-lcd
1919 - ingenic,jz4725b-lcd
20+ - ingenic,jz4760-lcd
21+ - ingenic,jz4760b-lcd
2022 - ingenic,jz4770-lcd
2123 - ingenic,jz4780-lcd
2224
Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml+116−0
@@ -0,0 +1,116 @@
1+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+%YAML 1.2
3+---
4+$id: http://devicetree.org/schemas/display/mediatek/mediatek,dp.yaml#
5+$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+title: MediaTek Display Port Controller
8+
9+maintainers:
10+ - Chun-Kuang Hu <chunkuang.hu@kernel.org>
11+ - Jitao shi <jitao.shi@mediatek.com>
12+
13+description: |
14+ MediaTek DP and eDP are different hardwares and there are some features
15+ which are not supported for eDP. For example, audio is not supported for
16+ eDP. Therefore, we need to use two different compatibles to describe them.
17+ In addition, We just need to enable the power domain of DP, so the clock
18+ of DP is generated by itself and we are not using other PLL to generate
19+ clocks.
20+
21+properties:
22+ compatible:
23+ enum:
24+ - mediatek,mt8195-dp-tx
25+ - mediatek,mt8195-edp-tx
26+
27+ reg:
28+ maxItems: 1
29+
30+ nvmem-cells:
31+ maxItems: 1
32+ description: efuse data for display port calibration
33+
34+ nvmem-cell-names:
35+ const: dp_calibration_data
36+
37+ power-domains:
38+ maxItems: 1
39+
40+ interrupts:
41+ maxItems: 1
42+
43+ ports:
44+ $ref: /schemas/graph.yaml#/properties/ports
45+ properties:
46+ port@0:
47+ $ref: /schemas/graph.yaml#/properties/port
48+ description: Input endpoint of the controller, usually dp_intf
49+
50+ port@1:
51+ $ref: /schemas/graph.yaml#/$defs/port-base
52+ unevaluatedProperties: false
53+ description: Output endpoint of the controller
54+ properties:
55+ endpoint:
56+ $ref: /schemas/media/video-interfaces.yaml#
57+ unevaluatedProperties: false
58+ properties:
59+ data-lanes:
60+ description: |
61+ number of lanes supported by the hardware.
62+ The possible values:
63+ 0 - For 1 lane enabled in IP.
64+ 0 1 - For 2 lanes enabled in IP.
65+ 0 1 2 3 - For 4 lanes enabled in IP.
66+ minItems: 1
67+ maxItems: 4
68+ required:
69+ - data-lanes
70+
71+ required:
72+ - port@0
73+ - port@1
74+
75+ max-linkrate-mhz:
76+ enum: [ 1620, 2700, 5400, 8100 ]
77+ description: maximum link rate supported by the hardware.
78+
79+required:
80+ - compatible
81+ - reg
82+ - interrupts
83+ - ports
84+ - max-linkrate-mhz
85+
86+additionalProperties: false
87+
88+examples:
89+ - |
90+ #include <dt-bindings/interrupt-controller/arm-gic.h>
91+ #include <dt-bindings/power/mt8195-power.h>
92+ dptx@1c600000 {
93+ compatible = "mediatek,mt8195-dp-tx";
94+ reg = <0x1c600000 0x8000>;
95+ power-domains = <&spm MT8195_POWER_DOMAIN_DP_TX>;
96+ interrupts = <GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH 0>;
97+ max-linkrate-mhz = <8100>;
98+
99+ ports {
100+ #address-cells = <1>;
101+ #size-cells = <0>;
102+
103+ port@0 {
104+ reg = <0>;
105+ dptx_in: endpoint {
106+ remote-endpoint = <&dp_intf0_out>;
107+ };
108+ };
109+ port@1 {
110+ reg = <1>;
111+ dptx_out: endpoint {
112+ data-lanes = <0 1 2 3>;
113+ };
114+ };
115+ };
116+ };
Documentation/devicetree/bindings/display/msm/dp-controller.yaml+41−6
@@ -24,6 +24,7 @@ properties: · 23 unmodified lines
2424 - qcom,sm8350-dp
2525
2626 reg:
27+ minItems: 4
2728 items:
2829 - description: ahb register block
2930 - description: aux register block
@@ -70,14 +71,28 @@ properties: · 40 unmodified lines
7071 operating-points-v2:
7172 maxItems: 1
7273
74+ opp-table: true
75+
7376 power-domains:
7477 maxItems: 1
7578
79+ aux-bus:
80+ $ref: /schemas/display/dp-aux-bus.yaml#
81+
82+ data-lanes:
83+ $ref: /schemas/types.yaml#/definitions/uint32-array
84+ minItems: 1
85+ maxItems: 4
86+ items:
87+ maximum: 3
88+
7689 "#sound-dai-cells":
7790 const: 0
7891
79− vdda-0p9-supply: true
80− vdda-1p2-supply: true
92+ vdda-0p9-supply:
93+ deprecated: true
94+ vdda-1p2-supply:
95+ deprecated: true
8196
8297 ports:
8398 $ref: /schemas/graph.yaml#/properties/ports
@@ -98,10 +113,33 @@ required: · 14 unmodified lines
98113 - clock-names
99114 - phys
100115 - phy-names
101− - "#sound-dai-cells"
102116 - power-domains
103117 - ports
104118
119+allOf:
120+ # AUX BUS does not exist on DP controllers
121+ # Audio output also is present only on DP output
122+ # p1 regions is present on DP, but not on eDP
123+ - if:
124+ properties:
125+ compatible:
126+ contains:
127+ enum:
128+ - qcom,sc7280-edp
129+ - qcom,sc8180x-edp
130+ then:
131+ properties:
132+ "#sound-dai-cells": false
133+ reg:
134+ maxItems: 4
135+ else:
136+ properties:
137+ aux-bus: false
138+ reg:
139+ minItems: 5
140+ required:
141+ - "#sound-dai-cells"
142+
105143 additionalProperties: false
106144
107145 examples:
@@ -140,9 +178,6 @@ examples: · 32 unmodified lines
140178
141179 power-domains = <&rpmhpd SC7180_CX>;
142180
143− vdda-0p9-supply = <&vdda_usb_ss_dp_core>;
144− vdda-1p2-supply = <&vdda_usb_ss_dp_1p2>;
145−
146181 ports {
147182 #address-cells = <1>;
148183 #size-cells = <0>;
Documentation/devicetree/bindings/display/msm/dpu-msm8998.yaml+4−0
@@ -62,6 +62,7 @@ patternProperties: · 61 unmodified lines
6262 "^display-controller@[0-9a-f]+$":
6363 type: object
6464 description: Node containing the properties of DPU.
65+ additionalProperties: false
6566
6667 properties:
6768 compatible:
@@ -105,6 +106,9 @@ patternProperties: · 37 unmodified lines
105106 maxItems: 1
106107
107108 operating-points-v2: true
109+ opp-table:
110+ type: object
111+
108112 ports:
109113 $ref: /schemas/graph.yaml#/properties/ports
110114 description: |
Documentation/devicetree/bindings/display/msm/dpu-qcm2290.yaml+3−0
@@ -74,6 +74,7 @@ patternProperties: · 73 unmodified lines
7474 "^display-controller@[0-9a-f]+$":
7575 type: object
7676 description: Node containing the properties of DPU.
77+ additionalProperties: false
7778
7879 properties:
7980 compatible:
@@ -113,6 +114,8 @@ patternProperties: · 33 unmodified lines
113114 maxItems: 1
114115
115116 operating-points-v2: true
117+ opp-table:
118+ type: object
116119
117120 ports:
118121 $ref: /schemas/graph.yaml#/properties/ports
Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml+3−0
@@ -73,6 +73,7 @@ patternProperties: · 72 unmodified lines
7373 "^display-controller@[0-9a-f]+$":
7474 type: object
7575 description: Node containing the properties of DPU.
76+ additionalProperties: false
7677
7778 properties:
7879 compatible:
@@ -114,6 +115,8 @@ patternProperties: · 35 unmodified lines
114115 maxItems: 1
115116
116117 operating-points-v2: true
118+ opp-table:
119+ type: object
117120
118121 ports:
119122 $ref: /schemas/graph.yaml#/properties/ports
Documentation/devicetree/bindings/display/msm/dpu-sc7280.yaml+3−0
@@ -72,6 +72,7 @@ patternProperties: · 71 unmodified lines
7272 "^display-controller@[0-9a-f]+$":
7373 type: object
7474 description: Node containing the properties of DPU.
75+ additionalProperties: false
7576
7677 properties:
7778 compatible:
@@ -112,6 +113,8 @@ patternProperties: · 34 unmodified lines
112113 maxItems: 1
113114
114115 operating-points-v2: true
116+ opp-table:
117+ type: object
115118
116119 ports:
117120 $ref: /schemas/graph.yaml#/properties/ports
Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml+4−0
@@ -65,6 +65,7 @@ patternProperties: · 64 unmodified lines
6565 "^display-controller@[0-9a-f]+$":
6666 type: object
6767 description: Node containing the properties of DPU.
68+ additionalProperties: false
6869
6970 properties:
7071 compatible:
@@ -102,6 +103,9 @@ patternProperties: · 31 unmodified lines
102103 maxItems: 1
103104
104105 operating-points-v2: true
106+ opp-table:
107+ type: object
108+
105109 ports:
106110 $ref: /schemas/graph.yaml#/properties/ports
107111 description: |
Documentation/devicetree/bindings/display/msm/gmu.yaml+146−20
@@ -20,35 +20,24 @@ description: | · 19 unmodified lines
2020 properties:
2121 compatible:
2222 items:
23− - enum:
24− - qcom,adreno-gmu-630.2
23+ - pattern: '^qcom,adreno-gmu-6[0-9][0-9]\.[0-9]$'
2524 - const: qcom,adreno-gmu
2625
2726 reg:
28− items:
29− - description: Core GMU registers
30− - description: GMU PDC registers
31− - description: GMU PDC sequence registers
27+ minItems: 3
28+ maxItems: 4
3229
3330 reg-names:
34− items:
35− - const: gmu
36− - const: gmu_pdc
37− - const: gmu_pdc_seq
31+ minItems: 3
32+ maxItems: 4
3833
3934 clocks:
40− items:
41− - description: GMU clock
42− - description: GPU CX clock
43− - description: GPU AXI clock
44− - description: GPU MEMNOC clock
35+ minItems: 4
36+ maxItems: 7
4537
4638 clock-names:
47− items:
48− - const: gmu
49− - const: cxo
50− - const: axi
51− - const: memnoc
39+ minItems: 4
40+ maxItems: 7
5241
5342 interrupts:
5443 items:
@@ -76,6 +65,9 @@ properties: · 21 unmodified lines
7665
7766 operating-points-v2: true
7867
68+ opp-table:
69+ type: object
70+
7971 required:
8072 - compatible
8173 - reg
@@ -91,6 +83,140 @@ required: · 9 unmodified lines
9183
9284 additionalProperties: false
9385
86+allOf:
87+ - if:
88+ properties:
89+ compatible:
90+ contains:
91+ enum:
92+ - qcom,adreno-gmu-618.0
93+ - qcom,adreno-gmu-630.2
94+ then:
95+ properties:
96+ reg:
97+ items:
98+ - description: Core GMU registers
99+ - description: GMU PDC registers
100+ - description: GMU PDC sequence registers
101+ reg-names:
102+ items:
103+ - const: gmu
104+ - const: gmu_pdc
105+ - const: gmu_pdc_seq
106+ clocks:
107+ items:
108+ - description: GMU clock
109+ - description: GPU CX clock
110+ - description: GPU AXI clock
111+ - description: GPU MEMNOC clock
112+ clock-names:
113+ items:
114+ - const: gmu
115+ - const: cxo
116+ - const: axi
117+ - const: memnoc
118+
119+ - if:
120+ properties:
121+ compatible:
122+ contains:
123+ enum:
124+ - qcom,adreno-gmu-635.0
125+ then:
126+ properties:
127+ reg:
128+ items:
129+ - description: Core GMU registers
130+ - description: Resource controller registers
131+ - description: GMU PDC registers
132+ reg-names:
133+ items:
134+ - const: gmu
135+ - const: rscc
136+ - const: gmu_pdc
137+ clocks:
138+ items:
139+ - description: GMU clock
140+ - description: GPU CX clock
141+ - description: GPU AXI clock
142+ - description: GPU MEMNOC clock
143+ - description: GPU AHB clock
144+ - description: GPU HUB CX clock
145+ - description: GPU SMMU vote clock
146+ clock-names:
147+ items:
148+ - const: gmu
149+ - const: cxo
150+ - const: axi
151+ - const: memnoc
152+ - const: ahb
153+ - const: hub
154+ - const: smmu_vote
155+
156+ - if:
157+ properties:
158+ compatible:
159+ contains:
160+ enum:
161+ - qcom,adreno-gmu-640.1
162+ then:
163+ properties:
164+ reg:
165+ items:
166+ - description: Core GMU registers
167+ - description: GMU PDC registers
168+ - description: GMU PDC sequence registers
169+ reg-names:
170+ items:
171+ - const: gmu
172+ - const: gmu_pdc
173+ - const: gmu_pdc_seq
174+
175+ - if:
176+ properties:
177+ compatible:
178+ contains:
179+ enum:
180+ - qcom,adreno-gmu-650.2
181+ then:
182+ properties:
183+ reg:
184+ items:
185+ - description: Core GMU registers
186+ - description: Resource controller registers
187+ - description: GMU PDC registers
188+ - description: GMU PDC sequence registers
189+ reg-names:
190+ items:
191+ - const: gmu
192+ - const: rscc
193+ - const: gmu_pdc
194+ - const: gmu_pdc_seq
195+
196+ - if:
197+ properties:
198+ compatible:
199+ contains:
200+ enum:
201+ - qcom,adreno-gmu-640.1
202+ - qcom,adreno-gmu-650.2
203+ then:
204+ properties:
205+ clocks:
206+ items:
207+ - description: GPU AHB clock
208+ - description: GMU clock
209+ - description: GPU CX clock
210+ - description: GPU AXI clock
211+ - description: GPU MEMNOC clock
212+ clock-names:
213+ items:
214+ - const: ahb
215+ - const: gmu
216+ - const: cxo
217+ - const: axi
218+ - const: memnoc
219+
94220 examples:
95221 - |
96222 #include <dt-bindings/clock/qcom,gpucc-sdm845.h>
Documentation/devicetree/bindings/display/msm/gpu.yaml+2−1
@@ -58,7 +58,8 @@ properties: · 57 unmodified lines
5858 - const: ocmem
5959
6060 iommus:
61− maxItems: 1
61+ minItems: 1
62+ maxItems: 64
6263
6364 sram:
6465 $ref: /schemas/types.yaml#/definitions/phandle-array
Documentation/devicetree/bindings/display/msm/mdp4.yaml+1−1
@@ -36,7 +36,7 @@ properties: · 35 unmodified lines
3636 maxItems: 1
3737
3838 iommus:
39− maxItems: 1
39+ maxItems: 4
4040
4141 ports:
4242 $ref: /schemas/graph.yaml#/properties/ports
Documentation/devicetree/bindings/display/panel/panel-simple.yaml+4−0
@@ -234,6 +234,8 @@ properties: · 233 unmodified lines
234234 - mitsubishi,aa070mc01-ca1
235235 # Multi-Inno Technology Co.,Ltd MI0700S4T-6 7" 800x480 TFT Resistive Touch Module
236236 - multi-inno,mi0700s4t-6
237+ # Multi-Inno Technology Co.,Ltd MI0800FT-9 8" 800x600 TFT Resistive Touch Module
238+ - multi-inno,mi0800ft-9
237239 # Multi-Inno Technology Co.,Ltd MI1010AIT-1CP 10.1" 1280x800 LVDS IPS Cap Touch Mod.
238240 - multi-inno,mi1010ait-1cp
239241 # NEC LCD Technologies, Ltd. 12.1" WXGA (1280x800) LVDS TFT LCD panel
@@ -280,6 +282,8 @@ properties: · 40 unmodified lines
280282 - samsung,atna33xc20
281283 # Samsung 12.2" (2560x1600 pixels) TFT LCD panel
282284 - samsung,lsn122dl01-c01
285+ # Samsung Electronics 10.1" WXGA (1280x800) TFT LCD panel
286+ - samsung,ltl101al01
283287 # Samsung Electronics 10.1" WSVGA TFT LCD panel
284288 - samsung,ltn101nt05
285289 # Samsung Electronics 14" WXGA (1366x768) TFT LCD panel
Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml+4−0
@@ -17,6 +17,9 @@ description: | · 16 unmodified lines
1717 Techstar TS8550B is 480x854, 2-lane MIPI DSI LCD panel which has
1818 inbuilt ST7701 chip.
1919
20+ Densitron DMT028VGHMCMI-1A is 480x640, 2-lane MIPI DSI LCD panel
21+ which has built-in ST7701 chip.
22+
2023 allOf:
2124 - $ref: panel-common.yaml#
2225
@@ -24,6 +27,7 @@ properties: · 1 unmodified line
2427 compatible:
2528 items:
2629 - enum:
30+ - densitron,dmt028vghmcmi-1a
2731 - techstar,ts8550b
2832 - const: sitronix,st7701
2933
Documentation/devicetree/bindings/display/rockchip/dw_mipi_dsi_rockchip.txt+1−0
@@ -8,6 +8,7 @@ Required properties: · 7 unmodified lines
88 "rockchip,px30-mipi-dsi", "snps,dw-mipi-dsi"
99 "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi"
1010 "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi"
11+ "rockchip,rk3568-mipi-dsi", "snps,dw-mipi-dsi"
1112 - reg: Represent the physical address range of the controller.
1213 - interrupts: Represent the controller's interrupt to the CPU(s).
1314 - clocks, clock-names: Phandles to the controller's pll reference
Documentation/devicetree/bindings/phy/qcom,hdmi-phy-qmp.yaml+12−3
@@ -28,12 +28,15 @@ properties: · 27 unmodified lines
2828 - const: hdmi_phy
2929
3030 clocks:
31− maxItems: 2
31+ minItems: 2
32+ maxItems: 3
3233
3334 clock-names:
35+ minItems: 2
3436 items:
3537 - const: iface
3638 - const: ref
39+ - const: xo
3740
3841 power-domains:
3942 maxItems: 1
@@ -44,6 +47,9 @@ properties: · 4 unmodified lines
4447 vddio-supply:
4548 description: phandle to VDD I/O supply regulator
4649
50+ '#clock-cells':
51+ const: 0
52+
4753 '#phy-cells':
4854 const: 0
4955
@@ -75,9 +81,12 @@ examples: · 25 unmodified lines
7581 "hdmi_phy";
7682
7783 clocks = <&mmcc 116>,
78− <&gcc 214>;
84+ <&gcc 214>,
85+ <&xo_board>;
7986 clock-names = "iface",
80− "ref";
87+ "ref",
88+ "xo";
89+ #clock-cells = <0>;
8190 #phy-cells = <0>;
8291
8392 vddio-supply = <&vreg_l12a_1p8>;
Documentation/gpu/amdgpu/apu-asic-info-table.csv+8−0
@@ -0,0 +1,8 @@
1+Product Name, Code Reference, DCN/DCE version, GC version, VCE/UVD/VCN version, SDMA version
2+Radeon R* Graphics, CARRIZO/STONEY, DCE 11, 8, VCE 3 / UVD 6, 3
3+Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN/PICASSO, DCN 1.0, 9.1.0, VCN 1.0, 4.1.0
4+Ryzen 4000 series, RENOIR, DCN 2.1, 9.3, VCN 2.2, 4.1.2
5+Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN2, DCN 1.0, 9.2.2, VCN 1.0.1, 4.1.1
6+SteamDeck, VANGOGH, DCN 3.0.1, 10.3.1, VCN 3.1.0, 5.2.1
7+Ryzen 5000 series, GREEN SARDINE, DCN 2.1, 9.3, VCN 2.2, 4.1.1
8+Ryzen 6000 Zen, YELLOW CARP, 3.1.2, 10.3.3, VCN 3.1.1, 5.2.3
Documentation/gpu/amdgpu/dgpu-asic-info-table.csv+24−0
@@ -0,0 +1,24 @@
1+Product Name, Code Reference, DCN/DCE version, GC version, VCN version, SDMA version
2+AMD Radeon (TM) HD 8500M/ 8600M /M200 /M320 /M330 /M335 Series, HAINAN, --, 6, --, --
3+AMD Radeon HD 7800 /7900 /FireGL Series, TAHITI, DCE 6, 6, VCE 1 / UVD 3, --
4+AMD Radeon R7 (TM|HD) M265 /M370 /8500M /8600 /8700 /8700M, OLAND, DCE 6, 6, VCE 1 / UVD 3, --
5+AMD Radeon (TM) (HD|R7) 7800 /7970 /8800 /8970 /370/ Series, PITCAIRN, DCE 6, 6, VCE 1 / UVD 3, --
6+AMD Radeon (TM|R7|R9|HD) E8860 /M360 /7700 /7800 /8800 /9000(M) /W4100 Series, VERDE, DCE 6, 6, VCE 1 / UVD 3, --
7+AMD Radeon HD M280X /M380 /7700 /8950 /W5100, BONAIRE, DCE 8, 7, VCE 2 / UVD 4.2, 1
8+AMD Radeon (R9|TM) 200 /390 /W8100 /W9100 Series, HAWAII, DCE 8, 7, VCE 2 / UVD 4.2, 1
9+AMD Radeon (TM) R(5|7) M315 /M340 /M360, TOPAZ, *, 8, --, 2
10+AMD Radeon (TM) R9 200 /380 /W7100 /S7150 /M390 /M395 Series, TONGA, DCE 10, 8, VCE 3 / UVD 5, 3
11+AMD Radeon (FirePro) (TM) R9 Fury Series, FIJI, DCE 10, 8, VCE 3 / UVD 6, 3
12+Radeon RX 470 /480 /570 /580 /590 Series - AMD Radeon (TM) (Pro WX) 5100 /E9390 /E9560 /E9565 /V7350 /7100 /P30PH, POLARIS10, DCE 11.2, 8, VCE 3.4 / UVD 6.3, 3
13+Radeon (TM) (RX|Pro WX) E9260 /460 /V5300X /550 /560(X) Series, POLARIS11, DCE 11.2, 8, VCE 3.4 / UVD 6.3, 3
14+Radeon (RX/Pro) 500 /540(X) /550 /640 /WX2100 /WX3100 /WX200 Series, POLARIS12, DCE 11.2, 8, VCE 3.4 / UVD 6.3, 3
15+Radeon (RX|TM) (PRO|WX) Vega /MI25 /V320 /V340L /8200 /9100 /SSG MxGPU, VEGA10, DCE 12, 9.0.1, VCE 4.0.0 / UVD 7.0.0, 4.0.0
16+AMD Radeon (Pro) VII /MI50 /MI60, VEGA20, DCE 12, 9.4.0, VCE 4.1.0 / UVD 7.2.0, 4.2.0
17+MI100, ARCTURUS, *, 9.4.1, VCN 2.5.0, 4.2.2
18+MI200, ALDEBARAN, *, 9.4.2, VCN 2.6.0, 4.4.0
19+AMD Radeon (RX|Pro) 5600(M|XT) /5700 (M|XT|XTB) /W5700, NAVI10, DCN 2.0.0, 10.1.10, VCN 2.0.0, 5.0.0
20+AMD Radeon (Pro) 5300 /5500XTB/5500(XT|M) /W5500M /W5500, NAVI14, DCN 2.0.0, 10.1.1, VCN 2.0.2, 5.0.2
21+AMD Radeon RX 6800(XT) /6900(XT) /W6800, SIENNA_CICHLID, DCN 3.0.0, 10.3.0, VCN 3.0.0, 5.2.0
22+AMD Radeon RX 6700 XT / 6800M / 6700M, NAVY_FLOUNDER, DCN 3.0.0, 10.3.2, VCN 3.0.0, 5.2.2
23+AMD Radeon RX 6600(XT) /6600M /W6600 /W6600M, DIMGREY_CAVEFISH, DCN 3.0.2, 10.3.4, VCN 3.0.16, 5.2.4
24+AMD Radeon RX 6500M /6300M /W6500M /W6300M, BEIGE_GOBY, DCN 3.0.3, 10.3.5, VCN 3.0.33, 5.2.5
Documentation/gpu/amdgpu/display/dc-glossary.rst+1−1
@@ -170,7 +170,7 @@ consider asking in the amdgfx and update this page. · 169 unmodified lines
170170 MC
171171 Memory Controller
172172
173− MPC
173+ MPC/MPCC
174174 Multiple pipes and plane combine
175175
176176 MPO
Documentation/gpu/amdgpu/display/dcn-overview.rst+59−0
@@ -124,6 +124,65 @@ depth format), bit-depth reduction/dithering would kick in. In OPP, we would · 123 unmodified lines
124124 also apply a regamma function to introduce the gamma removed earlier back.
125125 Eventually, we output data in integer format at DIO.
126126
127+AMD Hardware Pipeline
128+---------------------
129+
130+When discussing graphics on Linux, the **pipeline** term can sometimes be
131+overloaded with multiple meanings, so it is important to define what we mean
132+when we say **pipeline**. In the DCN driver, we use the term **hardware
133+pipeline** or **pipeline** or just **pipe** as an abstraction to indicate a
134+sequence of DCN blocks instantiated to address some specific configuration. DC
135+core treats DCN blocks as individual resources, meaning we can build a pipeline
136+by taking resources for all individual hardware blocks to compose one pipeline.
137+In actuality, we can't connect an arbitrary block from one pipe to a block from
138+another pipe; they are routed linearly, except for DSC, which can be
139+arbitrarily assigned as needed. We have this pipeline concept for trying to
140+optimize bandwidth utilization.
141+
142+.. kernel-figure:: pipeline_4k_no_split.svg
143+
144+Additionally, let's take a look at parts of the DTN log (see
145+'Documentation/gpu/amdgpu/display/dc-debug.rst' for more information) since
146+this log can help us to see part of this pipeline behavior in real-time::
147+
148+ HUBP: format addr_hi width height ...
149+ [ 0]: 8h 81h 3840 2160
150+ [ 1]: 0h 0h 0 0
151+ [ 2]: 0h 0h 0 0
152+ [ 3]: 0h 0h 0 0
153+ [ 4]: 0h 0h 0 0
154+ ...
155+ MPCC: OPP DPP ...
156+ [ 0]: 0h 0h ...
157+
158+The first thing to notice from the diagram and DTN log it is the fact that we
159+have different clock domains for each part of the DCN blocks. In this example,
160+we have just a single **pipeline** where the data flows from DCHUB to DIO, as
161+we intuitively expect. Nonetheless, DCN is flexible, as mentioned before, and
162+we can split this single pipe differently, as described in the below diagram:
163+
164+.. kernel-figure:: pipeline_4k_split.svg
165+
166+Now, if we inspect the DTN log again we can see some interesting changes::
167+
168+ HUBP: format addr_hi width height ...
169+ [ 0]: 8h 81h 1920 2160 ...
170+ ...
171+ [ 4]: 0h 0h 0 0 ...
172+ [ 5]: 8h 81h 1920 2160 ...
173+ ...
174+ MPCC: OPP DPP ...
175+ [ 0]: 0h 0h ...
176+ [ 5]: 0h 5h ...
177+
178+From the above example, we now split the display pipeline into two vertical
179+parts of 1920x2160 (i.e., 3440x2160), and as a result, we could reduce the
180+clock frequency in the DPP part. This is not only useful for saving power but
181+also to better handle the required throughput. The idea to keep in mind here is
182+that the pipe configuration can vary a lot according to the display
183+configuration, and it is the DML's responsibility to set up all required
184+configuration parameters for multiple scenarios supported by our hardware.
185+
127186 Global Sync
128187 -----------
129188
Documentation/gpu/amdgpu/display/dcn2_cm_drm_current.svg+1370−0
@@ -0,0 +1,1370 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ version="1.1"
6+ id="svg2019"
7+ width="1702"
8+ height="1845"
9+ viewBox="0 0 1702 1845"
10+ sodipodi:docname="dcn2_cm_drm_current.svg"
11+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
12+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14+ xmlns="http://www.w3.org/2000/svg"
15+ xmlns:svg="http://www.w3.org/2000/svg">
16+ <defs
17+ id="defs2023" />
18+ <sodipodi:namedview
19+ id="namedview2021"
20+ pagecolor="#ffffff"
21+ bordercolor="#666666"
22+ borderopacity="1.0"
23+ inkscape:pageshadow="2"
24+ inkscape:pageopacity="0.0"
25+ inkscape:pagecheckerboard="0"
26+ showgrid="false"
27+ inkscape:zoom="0.56413987"
28+ inkscape:cx="1003.2973"
29+ inkscape:cy="691.31792"
30+ inkscape:window-width="1920"
31+ inkscape:window-height="1011"
32+ inkscape:window-x="0"
33+ inkscape:window-y="0"
34+ inkscape:window-maximized="1"
35+ inkscape:current-layer="g2025" />
36+ <g
37+ inkscape:groupmode="layer"
38+ inkscape:label="Image"
39+ id="g2025">
40+ <rect
41+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
42+ id="rect34"
43+ width="208.83351"
44+ height="486.09872"
45+ x="0.90158081"
46+ y="132.77872" />
47+ <rect
48+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
49+ id="rect1019"
50+ width="126.38867"
51+ height="55.320732"
52+ x="25.960823"
53+ y="188.06937" />
54+ <rect
55+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
56+ id="rect1021"
57+ width="126.38867"
58+ height="55.320732"
59+ x="25.960823"
60+ y="346.06937" />
61+ <rect
62+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
63+ id="rect1103"
64+ width="126.38867"
65+ height="55.320732"
66+ x="25.960823"
67+ y="266.06937" />
68+ <rect
69+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
70+ id="rect1105"
71+ width="126.38867"
72+ height="55.320732"
73+ x="25.960823"
74+ y="426.06937" />
75+ <rect
76+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-opacity:1"
77+ id="rect1107"
78+ width="126.38867"
79+ height="55.320732"
80+ x="25.960823"
81+ y="506.06934" />
82+ <path
83+ d="m 402.61883,171.88069 c 0.025,10.97895 0.01,1001.03791 0.049,1012.01891 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-1000.84096 -0.031,-1011.72348 0.053,-0.30366 -0.2175,-0.50268 -0.3652,-0.72837 l 1.5347,0.39394 z"
84+ id="path381056"
85+ sodipodi:nodetypes="cccccccccc"
86+ style="stroke-width:0.205176"
87+ inkscape:transform-center-x="-325.50819"
88+ inkscape:transform-center-y="-121.97185" />
89+ <rect
90+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
91+ id="rect1131"
92+ width="239.47592"
93+ height="1015.9909"
94+ x="298.65631"
95+ y="82.399658" />
96+ <rect
97+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.27861;stroke-opacity:1"
98+ id="rect1133"
99+ width="340.44653"
100+ height="525.77448"
101+ x="298.79562"
102+ y="1142.5299" />
103+ <rect
104+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
105+ id="rect1237"
106+ width="284.00113"
107+ height="945.41412"
108+ x="827.75012"
109+ y="82.880798"
110+ inkscape:connector-avoid="true" />
111+ <rect
112+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
113+ id="rect1239"
114+ width="239.37569"
115+ height="179.03308"
116+ x="1356.9507"
117+ y="98.758331" />
118+ <rect
119+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.00744;stroke-opacity:1"
120+ id="rect1241"
121+ width="239.4184"
122+ height="713.64905"
123+ x="1356.9543"
124+ y="307.7951"
125+ inkscape:connector-avoid="true" />
126+ <rect
127+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
128+ id="rect1345"
129+ width="330.32059"
130+ height="409.44757"
131+ x="1363.8723"
132+ y="1147.7572" />
133+ <rect
134+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
135+ id="rect1347"
136+ width="369.8941"
137+ height="682.32245"
138+ x="825.72528"
139+ y="1146.6448"
140+ inkscape:connector-avoid="true" />
141+ <rect
142+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
143+ id="rect1349"
144+ width="163.95746"
145+ height="40.144867"
146+ x="1389.9988"
147+ y="190.80583" />
148+ <rect
149+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:0.964132;stroke-opacity:1"
150+ id="rect1619"
151+ width="271.99091"
152+ height="42.038273"
153+ x="1393.981"
154+ y="1197.161"
155+ inkscape:connector-avoid="true" />
156+ <path
157+ d="m 1469.3028,1238.8328 c 0.025,10.9789 0.01,175.0378 0.049,186.0188 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-174.8409 -0.031,-185.7234 0.053,-0.3037 -0.2175,-0.5027 -0.3652,-0.7284 l 1.5347,0.394 z"
158+ id="path106-1"
159+ sodipodi:nodetypes="cccccccccc"
160+ style="stroke-width:0.205176"
161+ inkscape:transform-center-x="-325.50819"
162+ inkscape:transform-center-y="-121.97185" />
163+ <path
164+ d="m 407.4759,1238.4728 c 0.025,10.9789 0.01,291.0378 0.049,302.0188 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-290.8409 -0.031,-301.7234 0.053,-0.3037 -0.2175,-0.5027 -0.3652,-0.7284 l 1.5347,0.394 z"
165+ id="path106-1-7"
166+ sodipodi:nodetypes="cccccccccc"
167+ style="stroke-width:0.205176"
168+ inkscape:transform-center-x="-325.50819"
169+ inkscape:transform-center-y="-121.97185" />
170+ <rect
171+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
172+ id="rect1623"
173+ width="137.32646"
174+ height="41.782684"
175+ x="1396.3848"
176+ y="1268.2837"
177+ inkscape:connector-avoid="true" />
178+ <rect
179+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
180+ id="rect1705"
181+ width="137.32646"
182+ height="41.782684"
183+ x="1396.3848"
184+ y="1348.2837" />
185+ <rect
186+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
187+ id="rect1707"
188+ width="137.32646"
189+ height="41.782684"
190+ x="1396.3848"
191+ y="1432.2837" />
192+ <rect
193+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
194+ id="rect1731"
195+ width="222.34483"
196+ height="44.64616"
197+ x="867.36292"
198+ y="190.42665"
199+ inkscape:connector-avoid="true" />
200+ <rect
201+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
202+ id="rect1813"
203+ width="222.34483"
204+ height="44.64616"
205+ x="867.36292"
206+ y="254.42664"
207+ inkscape:connector-avoid="true" />
208+ <rect
209+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
210+ id="rect1815"
211+ width="222.34483"
212+ height="44.64616"
213+ x="867.36292"
214+ y="318.42664"
215+ inkscape:connector-avoid="true" />
216+ <rect
217+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
218+ id="rect1817"
219+ width="222.34483"
220+ height="44.64616"
221+ x="867.36292"
222+ y="412.42664"
223+ inkscape:connector-avoid="true" />
224+ <rect
225+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
226+ id="rect1819"
227+ width="222.34483"
228+ height="44.64616"
229+ x="867.36292"
230+ y="560.42664" />
231+ <rect
232+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-opacity:1"
233+ id="rect1821"
234+ width="222.34483"
235+ height="44.64616"
236+ x="867.36292"
237+ y="674.42664"
238+ inkscape:connector-avoid="true" />
239+ <rect
240+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
241+ id="rect1823"
242+ width="222.34483"
243+ height="44.64616"
244+ x="867.36292"
245+ y="744.42664"
246+ inkscape:connector-avoid="true" />
247+ <rect
248+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
249+ id="rect1825"
250+ width="222.34483"
251+ height="44.64616"
252+ x="867.36292"
253+ y="820.42664"
254+ inkscape:connector-avoid="true" />
255+ <rect
256+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
257+ id="rect1827"
258+ width="222.34483"
259+ height="44.64616"
260+ x="867.36292"
261+ y="890.42664"
262+ inkscape:connector-avoid="true" />
263+ <rect
264+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
265+ id="rect1829"
266+ width="222.34483"
267+ height="44.64616"
268+ x="867.36292"
269+ y="956.42664"
270+ inkscape:connector-avoid="true" />
271+ <rect
272+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
273+ id="rect1831"
274+ width="222.34483"
275+ height="44.64616"
276+ x="867.36292"
277+ y="1256.4268" />
278+ <rect
279+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
280+ id="rect1833"
281+ width="222.34483"
282+ height="44.64616"
283+ x="867.36292"
284+ y="1402.4268" />
285+ <rect
286+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
287+ id="rect1915"
288+ width="222.34483"
289+ height="44.64616"
290+ x="867.36292"
291+ y="1330.4268"
292+ inkscape:connector-avoid="true" />
293+ <rect
294+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
295+ id="rect1917"
296+ width="222.34483"
297+ height="44.64616"
298+ x="867.36292"
299+ y="1478.4268" />
300+ <rect
301+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
302+ id="rect1919"
303+ width="222.34483"
304+ height="44.64616"
305+ x="867.36292"
306+ y="1548.4268" />
307+ <rect
308+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
309+ id="rect1921"
310+ width="222.34483"
311+ height="44.64616"
312+ x="867.36292"
313+ y="1614.4268" />
314+ <rect
315+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
316+ id="rect1923"
317+ width="222.34483"
318+ height="44.64616"
319+ x="867.36292"
320+ y="1686.4268" />
321+ <rect
322+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
323+ id="rect1925"
324+ width="222.34483"
325+ height="44.64616"
326+ x="867.36292"
327+ y="1754.4268" />
328+ <rect
329+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
330+ id="rect1925-3"
331+ width="169.23357"
332+ height="44.678963"
333+ x="325.21747"
334+ y="134.37756" />
335+ <rect
336+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
337+ id="rect1954"
338+ width="169.23357"
339+ height="44.678963"
340+ x="325.21747"
341+ y="276.37756"
342+ inkscape:connector-avoid="true" />
343+ <rect
344+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.87333333;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
345+ id="rect1956"
346+ width="168.66573"
347+ height="122.14091"
348+ x="325.50134"
349+ y="358.6615"
350+ inkscape:connector-avoid="true" />
351+ <rect
352+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
353+ id="rect1958"
354+ width="169.23357"
355+ height="44.678963"
356+ x="325.21747"
357+ y="672.37756" />
358+ <rect
359+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
360+ id="rect1960"
361+ width="169.23357"
362+ height="44.678963"
363+ x="325.21747"
364+ y="744.37756" />
365+ <rect
366+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
367+ id="rect1962"
368+ width="169.14041"
369+ height="54.756817"
370+ x="325.26404"
371+ y="814.42413"
372+ inkscape:connector-avoid="true" />
373+ <rect
374+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
375+ id="rect1964"
376+ width="169.14041"
377+ height="54.756817"
378+ x="325.26404"
379+ y="886.42413"
380+ inkscape:connector-avoid="true" />
381+ <rect
382+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
383+ id="rect1966"
384+ width="169.14041"
385+ height="54.756817"
386+ x="325.26404"
387+ y="952.42413"
388+ inkscape:connector-avoid="true" />
389+ <rect
390+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:1.02091;stroke-opacity:1"
391+ id="rect2428"
392+ width="169.0854"
393+ height="61.19017"
394+ x="325.29156"
395+ y="1468.4518" />
396+ <rect
397+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.839627;stroke-opacity:1"
398+ id="rect2430"
399+ width="169.26669"
400+ height="41.344128"
401+ x="325.20093"
402+ y="1550.3611" />
403+ <rect
404+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.13491;stroke-opacity:1"
405+ id="rect2432"
406+ width="287.86237"
407+ height="44.416805"
408+ x="325.34854"
409+ y="1194.5088" />
410+ <rect
411+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.13102;stroke-opacity:1"
412+ id="rect2434"
413+ width="285.86655"
414+ height="44.4207"
415+ x="867.34656"
416+ y="1194.5068" />
417+ <path
418+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
419+ d="m 867.36292,235.07281 v 0"
420+ id="path2509" />
421+ <path
422+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
423+ d="m 867.36292,235.07281 v 0"
424+ id="path2511" />
425+ <path
426+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
427+ d="m 867.36292,235.07281 v 0"
428+ id="path2513" />
429+ <path
430+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
431+ d="m 867.36292,235.07281 v 0"
432+ id="path2515" />
433+ <path
434+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
435+ d="m 867.36292,235.07281 v 0"
436+ id="path2517" />
437+ <path
438+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
439+ d="m 867.36292,235.07281 v 0"
440+ id="path2519" />
441+ <path
442+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
443+ d="m 867.36292,235.07281 v 0"
444+ id="path2521" />
445+ <path
446+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
447+ d="m 867.36292,235.07281 v 0"
448+ id="path2523" />
449+ <path
450+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
451+ d="m 867.36292,235.07281 v 0"
452+ id="path2525" />
453+ <path
454+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
455+ d="m 867.36292,235.07281 v 0"
456+ id="path2527" />
457+ <path
458+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
459+ d="m 867.36292,235.07281 v 0"
460+ id="path2529" />
461+ <path
462+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
463+ d="m 867.36292,235.07281 v 0"
464+ id="path2531" />
465+ <path
466+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
467+ d="m 442.80064,179.02883 0.91401,36.01283 423.64827,-2.29193"
468+ id="path6876"
469+ inkscape:connector-type="orthogonal"
470+ inkscape:connector-curvature="0"
471+ inkscape:connection-start="#rect1925-3"
472+ inkscape:connection-end="#rect1731"
473+ sodipodi:nodetypes="ccc" />
474+ <path
475+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
476+ d="m 494.45103,156.71704 205.18886,-0.43622 0.59548,162.1112 167.12755,0.0346"
477+ id="path6878"
478+ inkscape:connector-type="orthogonal"
479+ inkscape:connector-curvature="0"
480+ inkscape:connection-start="#rect1925-3"
481+ sodipodi:nodetypes="cccc" />
482+ <path
483+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
484+ d="m 447.83425,321.05653 v 19.69319 h 419.52867"
485+ id="path7294"
486+ inkscape:connector-type="orthogonal"
487+ inkscape:connector-curvature="0"
488+ inkscape:connection-start="#rect1954"
489+ inkscape:connection-end="#rect1815"
490+ sodipodi:nodetypes="ccc" />
491+ <path
492+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
493+ d="M 494.45103,298.71704 H 659.10058 V 434.74972 H 867.36292"
494+ id="path7296"
495+ inkscape:connector-type="orthogonal"
496+ inkscape:connector-curvature="0"
497+ inkscape:connection-end="#rect1817"
498+ inkscape:connection-start="#rect1954"
499+ sodipodi:nodetypes="cccc" />
500+ <path
501+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
502+ d="m 867.36292,560.42664 -422.77356,1.33638 0.45008,-79.26417"
503+ id="path7720"
504+ inkscape:connector-type="orthogonal"
505+ inkscape:connector-curvature="0"
506+ sodipodi:nodetypes="ccc" />
507+ <path
508+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
509+ d="M 494.45103,696.74972 H 867.36292"
510+ id="path7726"
511+ inkscape:connector-type="orthogonal"
512+ inkscape:connector-curvature="0"
513+ inkscape:connection-start="#rect1958"
514+ inkscape:connection-end="#rect1821" />
515+ <path
516+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
517+ d="M 867.36292,766.74972 H 494.45103"
518+ id="path7728"
519+ inkscape:connector-type="orthogonal"
520+ inkscape:connector-curvature="0"
521+ inkscape:connection-start="#rect1823"
522+ inkscape:connection-end="#rect1960" />
523+ <path
524+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
525+ d="M 494.45105,789.05652 H 657.82418 V 1278.7498 H 867.36292"
526+ id="path7730"
527+ inkscape:connector-type="orthogonal"
528+ inkscape:connector-curvature="0"
529+ inkscape:connection-end="#rect1831"
530+ sodipodi:nodetypes="cccc" />
531+ <path
532+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
533+ d="m 494.40445,841.80254 h 167.41973 v 0.94718 h 205.53874"
534+ id="path8140"
535+ inkscape:connector-type="orthogonal"
536+ inkscape:connector-curvature="0"
537+ inkscape:connection-start="#rect1962"
538+ inkscape:connection-end="#rect1825" />
539+ <path
540+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
541+ d="m 494.40445,913.80254 h 167.41973 v -1.05282 h 205.53874"
542+ id="path8142"
543+ inkscape:connector-type="orthogonal"
544+ inkscape:connector-curvature="0"
545+ inkscape:connection-start="#rect1964"
546+ inkscape:connection-end="#rect1827" />
547+ <path
548+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
549+ d="m 494.40445,979.80254 h 167.41973 v -1.05282 h 205.53874"
550+ id="path8144"
551+ inkscape:connector-type="orthogonal"
552+ inkscape:connector-curvature="0"
553+ inkscape:connection-start="#rect1966"
554+ inkscape:connection-end="#rect1829" />
555+ <path
556+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
557+ d="M 494.37697,1500.7498 H 867.36292"
558+ id="path8150"
559+ inkscape:connector-type="orthogonal"
560+ inkscape:connector-curvature="0"
561+ inkscape:connection-start="#rect2428"
562+ inkscape:connection-end="#rect1917" />
563+ <path
564+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
565+ d="m 494.46762,1570.7498 h 372.8953"
566+ id="path8152"
567+ inkscape:connector-type="orthogonal"
568+ inkscape:connector-curvature="0"
569+ inkscape:connection-start="#rect2430"
570+ inkscape:connection-end="#rect1919" />
571+ <path
572+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
573+ d="M 1396.3848,1289.175 H 1288.1445 V 582.74972 h -198.4368"
574+ id="path8154"
575+ inkscape:connector-type="orthogonal"
576+ inkscape:connector-curvature="0"
577+ inkscape:connection-start="#rect1623"
578+ inkscape:connection-end="#rect1819" />
579+ <path
580+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
581+ d="m 1396.3848,1369.175 -159.2837,-1.364 0.5816,-88.2579 -147.975,-0.8033"
582+ id="path8462"
583+ inkscape:connector-type="orthogonal"
584+ inkscape:connector-curvature="0"
585+ inkscape:connection-start="#rect1705"
586+ inkscape:connection-end="#rect1831"
587+ sodipodi:nodetypes="cccc" />
588+ <path
589+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
590+ d="m 1089.7077,1500.7498 h 375.3403 v -26.6834"
591+ id="path8668"
592+ inkscape:connector-type="orthogonal"
593+ inkscape:connector-curvature="0"
594+ inkscape:connection-start="#rect1917"
595+ inkscape:connection-end="#rect1707" />
596+ <path
597+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
598+ d="M 1389.9988,212.74973 H 1089.7077"
599+ id="path8672"
600+ inkscape:connector-type="orthogonal"
601+ inkscape:connector-curvature="0"
602+ inkscape:connection-start="#rect1349"
603+ inkscape:connection-end="#rect1731" />
604+ <path
605+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
606+ d="M 1389.9988,230.9507 H 1223.331 v 109.79902 h -133.6233"
607+ id="path8674"
608+ inkscape:connector-type="orthogonal"
609+ inkscape:connector-curvature="0"
610+ inkscape:connection-end="#rect1815"
611+ sodipodi:nodetypes="cccc" />
612+ <text
613+ xml:space="preserve"
614+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
615+ x="58.63356"
616+ y="69.574417"
617+ id="text28675"><tspan
618+ sodipodi:role="line"
619+ id="tspan28673"
620+ x="58.63356"
621+ y="69.574417" /></text>
622+ <text
623+ xml:space="preserve"
624+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
625+ x="56.388252"
626+ y="221.86568"
627+ id="text31913"><tspan
628+ sodipodi:role="line"
629+ id="tspan31911"
630+ x="56.388252"
631+ y="221.86568">Matrix</tspan></text>
632+ <text
633+ xml:space="preserve"
634+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
635+ x="53.441296"
636+ y="300.866"
637+ id="text38843"><tspan
638+ sodipodi:role="line"
639+ id="tspan38841"
640+ x="53.441296"
641+ y="300.866">1D LUT</tspan></text>
642+ <text
643+ xml:space="preserve"
644+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
645+ x="53.441296"
646+ y="378.866"
647+ id="text41049"><tspan
648+ sodipodi:role="line"
649+ id="tspan41047"
650+ x="53.441296"
651+ y="378.866">3D LUT</tspan></text>
652+ <text
653+ xml:space="preserve"
654+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
655+ x="40.831493"
656+ y="460.87411"
657+ id="text45037"><tspan
658+ sodipodi:role="line"
659+ id="tspan45035"
660+ x="40.831493"
661+ y="460.87411"
662+ style="font-size:18.6667px">Unpacking</tspan></text>
663+ <text
664+ xml:space="preserve"
665+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
666+ x="62.130371"
667+ y="540.68872"
668+ id="text49945"><tspan
669+ sodipodi:role="line"
670+ id="tspan49943"
671+ x="62.130371"
672+ y="540.68872"
673+ style="font-size:18.6667px">Other</tspan></text>
674+ <text
675+ xml:space="preserve"
676+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
677+ x="1423.2806"
678+ y="128.08769"
679+ id="text55719"><tspan
680+ sodipodi:role="line"
681+ id="tspan55717"
682+ x="1423.2806"
683+ y="128.08769"
684+ style="font-size:18.6667px">drm_framebuffer</tspan></text>
685+ <text
686+ xml:space="preserve"
687+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
688+ x="1439.9988"
689+ y="218.74973"
690+ id="text62479"><tspan
691+ sodipodi:role="line"
692+ id="tspan62477"
693+ x="1439.9988"
694+ y="218.74973"
695+ style="font-size:18.6667px">format</tspan></text>
696+ <text
697+ xml:space="preserve"
698+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
699+ x="1475.2806"
700+ y="340.08771"
701+ id="text64465"><tspan
702+ sodipodi:role="line"
703+ id="tspan64463"
704+ x="1475.2806"
705+ y="340.08771"
706+ style="font-size:18.6667px">drm_plane</tspan></text>
707+ <text
708+ xml:space="preserve"
709+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
710+ x="1589.2806"
711+ y="1178.0876"
712+ id="text64469"><tspan
713+ sodipodi:role="line"
714+ id="tspan64467"
715+ x="1589.2806"
716+ y="1178.0876"
717+ style="font-size:18.6667px">drm_crtc</tspan></text>
718+ <text
719+ xml:space="preserve"
720+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
721+ x="872.23993"
722+ y="1172.4491"
723+ id="text64469-9"><tspan
724+ sodipodi:role="line"
725+ id="tspan64467-2"
726+ x="872.23993"
727+ y="1172.4491"
728+ style="font-size:18.6667px">Stream</tspan></text>
729+ <text
730+ xml:space="preserve"
731+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
732+ x="328.26071"
733+ y="1175.6371"
734+ id="text64469-9-2"><tspan
735+ sodipodi:role="line"
736+ id="tspan64467-2-8"
737+ x="328.26071"
738+ y="1175.6371"
739+ style="font-size:18.6667px">MPC</tspan></text>
740+ <text
741+ xml:space="preserve"
742+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
743+ x="330.14737"
744+ y="114.41869"
745+ id="text64469-9-9"><tspan
746+ sodipodi:role="line"
747+ id="tspan64467-2-7"
748+ x="330.14737"
749+ y="114.41869"
750+ style="font-size:18.6667px">DPP</tspan></text>
751+ <path
752+ d="m 1488.3608,401.47792 c 0.025,10.97895 0.01,773.03788 0.049,784.01888 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-772.84093 -0.031,-783.72345 0.053,-0.30366 -0.2175,-0.50268 -0.3652,-0.72837 l 1.5347,0.39394 z"
753+ id="path106"
754+ sodipodi:nodetypes="cccccccccc"
755+ style="stroke-width:0.205176"
756+ inkscape:transform-center-x="-325.50819"
757+ inkscape:transform-center-y="-121.97185" />
758+ <text
759+ xml:space="preserve"
760+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
761+ x="1495.9988"
762+ y="1224.7498"
763+ id="text78849"><tspan
764+ sodipodi:role="line"
765+ id="tspan78847"
766+ x="1495.9988"
767+ y="1224.7498"
768+ style="font-size:18.6667px">Blender</tspan></text>
769+ <text
770+ xml:space="preserve"
771+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
772+ x="1417.9988"
773+ y="1294.7498"
774+ id="text78853"><tspan
775+ sodipodi:role="line"
776+ id="tspan78851"
777+ x="1417.9988"
778+ y="1294.7498"
779+ style="font-size:18.6667px">Degamma</tspan></text>
780+ <text
781+ xml:space="preserve"
782+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
783+ x="1451.9988"
784+ y="1376.7498"
785+ id="text78857"><tspan
786+ sodipodi:role="line"
787+ id="tspan78855"
788+ x="1451.9988"
789+ y="1376.7498"
790+ style="font-size:18.6667px">CTM</tspan></text>
791+ <text
792+ xml:space="preserve"
793+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
794+ x="1427.9988"
795+ y="1458.7498"
796+ id="text78861"><tspan
797+ sodipodi:role="line"
798+ id="tspan78859"
799+ x="1427.9988"
800+ y="1458.7498"
801+ style="font-size:18.6667px">Gamma</tspan></text>
802+ <text
803+ xml:space="preserve"
804+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
805+ x="949.99878"
806+ y="218.74973"
807+ id="text104653"><tspan
808+ sodipodi:role="line"
809+ id="tspan104651"
810+ x="949.99878"
811+ y="218.74973"
812+ style="font-size:18.6667px">format</tspan></text>
813+ <text
814+ xml:space="preserve"
815+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
816+ x="911.99878"
817+ y="284.74973"
818+ id="text104657"><tspan
819+ sodipodi:role="line"
820+ id="tspan104655"
821+ x="911.99878"
822+ y="284.74973"
823+ style="font-size:18.6667px">bias_and_scale</tspan></text>
824+ <text
825+ xml:space="preserve"
826+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
827+ x="887.99878"
828+ y="346.74973"
829+ id="text104661"><tspan
830+ sodipodi:role="line"
831+ id="tspan104659"
832+ x="887.99878"
833+ y="346.74973"
834+ style="font-size:18.6667px">color space matrix</tspan></text>
835+ <text
836+ xml:space="preserve"
837+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
838+ x="871.99878"
839+ y="442.74973"
840+ id="text104665"><tspan
841+ sodipodi:role="line"
842+ id="tspan104663"
843+ x="871.99878"
844+ y="442.74973"
845+ style="font-size:18.6667px">input_csc_color_matrix</tspan></text>
846+ <text
847+ xml:space="preserve"
848+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
849+ x="905.99878"
850+ y="586.74976"
851+ id="text125075"><tspan
852+ sodipodi:role="line"
853+ id="tspan125073"
854+ x="905.99878"
855+ y="586.74976"
856+ style="font-size:18.6667px">in_transfer_func</tspan></text>
857+ <text
858+ xml:space="preserve"
859+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
860+ x="945.0083"
861+ y="702.85938"
862+ id="text117309"><tspan
863+ sodipodi:role="line"
864+ id="tspan117307"
865+ x="945.0083"
866+ y="702.85938"
867+ style="font-size:18.6667px">hdr_mult</tspan></text>
868+ <text
869+ xml:space="preserve"
870+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
871+ x="874.5556"
872+ y="773.42615"
873+ id="text117309-6"><tspan
874+ sodipodi:role="line"
875+ id="tspan117307-7"
876+ x="874.5556"
877+ y="773.42615"
878+ style="font-size:18.6667px">gamut_remap_matrix</tspan></text>
879+ <text
880+ xml:space="preserve"
881+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
882+ x="913.72528"
883+ y="846.55896"
884+ id="text117309-5"><tspan
885+ sodipodi:role="line"
886+ id="tspan117307-3"
887+ x="913.72528"
888+ y="846.55896"
889+ style="font-size:18.6667px">in_shaper_func</tspan></text>
890+ <text
891+ xml:space="preserve"
892+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
893+ x="937.72528"
894+ y="918.25787"
895+ id="text117309-56"><tspan
896+ sodipodi:role="line"
897+ id="tspan117307-2"
898+ x="937.72528"
899+ y="918.25787"
900+ style="font-size:18.6667px">lut3d_func</tspan></text>
901+ <text
902+ xml:space="preserve"
903+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
904+ x="945.9895"
905+ y="986.10767"
906+ id="text117309-9"><tspan
907+ sodipodi:role="line"
908+ id="tspan117307-1"
909+ x="945.9895"
910+ y="986.10767"
911+ style="font-size:18.6667px">blend_tf</tspan></text>
912+ <text
913+ xml:space="preserve"
914+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
915+ x="975.91803"
916+ y="1224.5564"
917+ id="text137434"><tspan
918+ sodipodi:role="line"
919+ id="tspan137432"
920+ x="975.91803"
921+ y="1224.5564"
922+ style="font-size:18.6667px">Blender</tspan></text>
923+ <text
924+ xml:space="preserve"
925+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
926+ x="879.31372"
927+ y="1283.4249"
928+ id="text137434-2"><tspan
929+ sodipodi:role="line"
930+ id="tspan137432-7"
931+ x="879.31372"
932+ y="1283.4249"
933+ style="font-size:18.6667px">gamut_remap_matrix</tspan></text>
934+ <text
935+ xml:space="preserve"
936+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
937+ x="925.31372"
938+ y="1359.2747"
939+ id="text137434-0"><tspan
940+ sodipodi:role="line"
941+ id="tspan137432-9"
942+ x="925.31372"
943+ y="1359.2747"
944+ style="font-size:18.6667px">func_shaper</tspan></text>
945+ <text
946+ xml:space="preserve"
947+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
948+ x="930.33252"
949+ y="1430.2566"
950+ id="text137434-3"><tspan
951+ sodipodi:role="line"
952+ id="tspan137432-6"
953+ x="930.33252"
954+ y="1430.2566"
955+ style="font-size:18.6667px">lut3d_func</tspan></text>
956+ <text
957+ xml:space="preserve"
958+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
959+ x="900.18158"
960+ y="1504.6725"
961+ id="text137434-06"><tspan
962+ sodipodi:role="line"
963+ id="tspan137432-2"
964+ x="900.18158"
965+ y="1504.6725"
966+ style="font-size:18.6667px">out_transfer_func</tspan></text>
967+ <text
968+ xml:space="preserve"
969+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
970+ x="904.0307"
971+ y="1575.8053"
972+ id="text137434-6"><tspan
973+ sodipodi:role="line"
974+ id="tspan137432-1"
975+ x="904.0307"
976+ y="1575.8053"
977+ style="font-size:18.6667px">csc_color_matrix</tspan></text>
978+ <text
979+ xml:space="preserve"
980+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
981+ x="903.16278"
982+ y="1642.1078"
983+ id="text137434-8"><tspan
984+ sodipodi:role="line"
985+ id="tspan137432-79"
986+ x="903.16278"
987+ y="1642.1078"
988+ style="font-size:18.6667px">bit_depth_param</tspan></text>
989+ <text
990+ xml:space="preserve"
991+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
992+ x="939.31372"
993+ y="1713.8068"
994+ id="text137434-20"><tspan
995+ sodipodi:role="line"
996+ id="tspan137432-23"
997+ x="939.31372"
998+ y="1713.8068"
999+ style="font-size:18.6667px">clamping</tspan></text>
1000+ <text
1001+ xml:space="preserve"
1002+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1003+ x="894.0307"
1004+ y="1782.5244"
1005+ id="text137434-7"><tspan
1006+ sodipodi:role="line"
1007+ id="tspan137432-5"
1008+ x="894.0307"
1009+ y="1782.5244"
1010+ style="font-size:18.6667px">output_color_space</tspan></text>
1011+ <text
1012+ xml:space="preserve"
1013+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1014+ x="869.63062"
1015+ y="117.7968"
1016+ id="text176429"><tspan
1017+ sodipodi:role="line"
1018+ id="tspan176427"
1019+ x="869.63062"
1020+ y="117.7968"
1021+ style="font-size:18.6667px">Plane</tspan></text>
1022+ <text
1023+ xml:space="preserve"
1024+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1025+ x="27.605465"
1026+ y="162.20587"
1027+ id="text176429-2"><tspan
1028+ sodipodi:role="line"
1029+ id="tspan176427-0"
1030+ x="27.605465"
1031+ y="162.20587"
1032+ style="font-size:18.6667px">Legend</tspan></text>
1033+ <text
1034+ xml:space="preserve"
1035+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1036+ x="298.63959"
1037+ y="59.293999"
1038+ id="text176429-9"><tspan
1039+ sodipodi:role="line"
1040+ id="tspan176427-2"
1041+ x="298.63959"
1042+ y="59.293999"
1043+ style="font-size:18.6667px">DCN 2.0</tspan></text>
1044+ <text
1045+ xml:space="preserve"
1046+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1047+ x="826.65735"
1048+ y="59.458061"
1049+ id="text176429-66"><tspan
1050+ sodipodi:role="line"
1051+ id="tspan176427-4"
1052+ x="826.65735"
1053+ y="59.458061"
1054+ style="font-size:18.6667px">DC Interface</tspan></text>
1055+ <text
1056+ xml:space="preserve"
1057+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1058+ x="1362.9948"
1059+ y="59.458061"
1060+ id="text176429-95"><tspan
1061+ sodipodi:role="line"
1062+ id="tspan176427-04"
1063+ x="1362.9948"
1064+ y="59.458061"
1065+ style="font-size:18.6667px">DRM Interface</tspan></text>
1066+ <text
1067+ xml:space="preserve"
1068+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1069+ x="867.34656"
1070+ y="1194.5068"
1071+ id="text184728"><tspan
1072+ sodipodi:role="line"
1073+ id="tspan184726"
1074+ x="867.34656"
1075+ y="1194.5068" /></text>
1076+ <text
1077+ xml:space="preserve"
1078+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1079+ x="389.01593"
1080+ y="159.8909"
1081+ id="text64469-9-3"><tspan
1082+ sodipodi:role="line"
1083+ id="tspan64467-2-6"
1084+ x="389.01593"
1085+ y="159.8909"
1086+ style="font-size:18.6667px">CNVC</tspan></text>
1087+ <text
1088+ xml:space="preserve"
1089+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1090+ x="365.88379"
1091+ y="303.59048"
1092+ id="text64469-9-1"><tspan
1093+ sodipodi:role="line"
1094+ id="tspan64467-2-2"
1095+ x="365.88379"
1096+ y="303.59048"
1097+ style="font-size:18.6667px">Input CSC</tspan></text>
1098+ <text
1099+ xml:space="preserve"
1100+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1101+ x="409.06488"
1102+ y="404.95001"
1103+ id="text64469-9-93"><tspan
1104+ sodipodi:role="line"
1105+ id="tspan64467-2-1"
1106+ x="409.06488"
1107+ y="404.95001"
1108+ style="font-size:18.6667px;text-align:center;text-anchor:middle">DeGamma</tspan><tspan
1109+ sodipodi:role="line"
1110+ x="409.06488"
1111+ y="428.28339"
1112+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1113+ id="tspan233797">RAM and ROM</tspan><tspan
1114+ sodipodi:role="line"
1115+ x="409.06488"
1116+ y="451.61676"
1117+ style="font-size:10.6667px;text-align:center;text-anchor:middle"
1118+ id="tspan242597">(sRGB, BT2020</tspan></text>
1119+ <text
1120+ xml:space="preserve"
1121+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1122+ x="351.16684"
1123+ y="700.34918"
1124+ id="text64469-9-0"><tspan
1125+ sodipodi:role="line"
1126+ id="tspan64467-2-3"
1127+ x="351.16684"
1128+ y="700.34918"
1129+ style="font-size:18.6667px">HDR Multiply</tspan></text>
1130+ <text
1131+ xml:space="preserve"
1132+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1133+ x="345.16684"
1134+ y="771.33112"
1135+ id="text64469-9-6"><tspan
1136+ sodipodi:role="line"
1137+ id="tspan64467-2-10"
1138+ x="345.16684"
1139+ y="771.33112"
1140+ style="font-size:18.6667px">Gamut Remap</tspan></text>
1141+ <text
1142+ xml:space="preserve"
1143+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1144+ x="412.5184"
1145+ y="836.04877"
1146+ id="text64469-9-63"><tspan
1147+ sodipodi:role="line"
1148+ id="tspan64467-2-20"
1149+ x="412.5184"
1150+ y="836.04877"
1151+ style="font-size:18.6667px;text-align:center;text-anchor:middle">Shaper LUT</tspan><tspan
1152+ sodipodi:role="line"
1153+ x="412.5184"
1154+ y="859.38214"
1155+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1156+ id="tspan222533">RAM</tspan></text>
1157+ <text
1158+ xml:space="preserve"
1159+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1160+ x="413.54086"
1161+ y="908.61554"
1162+ id="text64469-9-61"><tspan
1163+ sodipodi:role="line"
1164+ id="tspan64467-2-55"
1165+ x="413.54086"
1166+ y="908.61554"
1167+ style="font-size:18.6667px;text-align:center;text-anchor:middle">3D LUT</tspan><tspan
1168+ sodipodi:role="line"
1169+ x="413.54086"
1170+ y="931.94891"
1171+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1172+ id="tspan221121">RAM</tspan></text>
1173+ <text
1174+ xml:space="preserve"
1175+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1176+ x="344.0347"
1177+ y="985.33319"
1178+ id="text64469-9-47"><tspan
1179+ sodipodi:role="line"
1180+ id="tspan64467-2-65"
1181+ x="344.0347"
1182+ y="985.33319"
1183+ style="font-size:18.6667px">Blend Gamma</tspan></text>
1184+ <text
1185+ xml:space="preserve"
1186+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1187+ x="433.84625"
1188+ y="1223.411"
1189+ id="text64469-9-69"><tspan
1190+ sodipodi:role="line"
1191+ id="tspan64467-2-37"
1192+ x="433.84625"
1193+ y="1223.411"
1194+ style="font-size:18.6667px">Blender</tspan></text>
1195+ <text
1196+ xml:space="preserve"
1197+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1198+ x="408.64996"
1199+ y="1492.8102"
1200+ id="text64469-9-8"><tspan
1201+ sodipodi:role="line"
1202+ id="tspan64467-2-84"
1203+ x="408.64996"
1204+ y="1492.8102"
1205+ style="font-size:18.6667px;text-align:center;text-anchor:middle">Gamma</tspan><tspan
1206+ sodipodi:role="line"
1207+ x="408.64996"
1208+ y="1516.1436"
1209+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1210+ id="tspan197733">RAM</tspan></text>
1211+ <text
1212+ xml:space="preserve"
1213+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1214+ x="385.46863"
1215+ y="1575.2261"
1216+ id="text64469-9-31"><tspan
1217+ sodipodi:role="line"
1218+ id="tspan64467-2-49"
1219+ x="385.46863"
1220+ y="1575.2261"
1221+ style="font-size:18.6667px">OCSC</tspan></text>
1222+ <text
1223+ xml:space="preserve"
1224+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1225+ x="1356.5106"
1226+ y="53.140579"
1227+ id="text273287"><tspan
1228+ sodipodi:role="line"
1229+ id="tspan273285"
1230+ x="1356.5106"
1231+ y="53.140579" /></text>
1232+ <rect
1233+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1234+ id="rect1411"
1235+ width="177.28049"
1236+ height="38.940468"
1237+ x="1392.2576"
1238+ y="459.24118" />
1239+ <text
1240+ xml:space="preserve"
1241+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1242+ x="1411.7203"
1243+ y="485.93231"
1244+ id="text78841"><tspan
1245+ sodipodi:role="line"
1246+ id="tspan78839"
1247+ x="1411.7203"
1248+ y="485.93231"
1249+ style="font-size:18.6667px">color_encoding</tspan></text>
1250+ <rect
1251+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1252+ id="rect1515"
1253+ width="175.11876"
1254+ height="43.239407"
1255+ x="1393.7493"
1256+ y="525.6983" />
1257+ <text
1258+ xml:space="preserve"
1259+ style="font-style:normal;font-weight:normal;font-size:17.3333px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1260+ x="1399.212"
1261+ y="553.44904"
1262+ id="text78845"><tspan
1263+ sodipodi:role="line"
1264+ id="tspan78843"
1265+ x="1399.212"
1266+ y="553.44904">pixel_blend_mode</tspan></text>
1267+ <rect
1268+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1269+ id="rect371322"
1270+ width="177.28049"
1271+ height="38.940468"
1272+ x="1391.6781"
1273+ y="385.61713" />
1274+ <text
1275+ xml:space="preserve"
1276+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1277+ x="1427.5771"
1278+ y="409.29523"
1279+ id="text78837"><tspan
1280+ sodipodi:role="line"
1281+ id="tspan78835"
1282+ x="1427.5771"
1283+ y="409.29523"
1284+ style="font-size:18.6667px">color_range</tspan></text>
1285+ <path
1286+ d="m 1469.6815,1334.9145 c 3.2597,-1.4841 6.4827,-3.0444 9.7556,-4.5049 -3.5093,6.1834 -7.0396,12.3483 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3481 -10.7354,-18.5314 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1287+ id="path371636-7"
1288+ sodipodi:nodetypes="cccccc"
1289+ style="stroke-width:0.262672"
1290+ inkscape:transform-center-x="-416.72543"
1291+ inkscape:transform-center-y="-156.15191" />
1292+ <path
1293+ d="m 1467.8882,1256.0056 c 3.2597,-1.4841 6.4827,-3.0443 9.7556,-4.5048 -3.5093,6.1833 -7.0396,12.3482 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3482 -10.7354,-18.5315 3.3569,1.5025 6.685,3.0628 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1294+ id="path371636-7-2"
1295+ sodipodi:nodetypes="cccccc"
1296+ style="stroke-width:0.262672"
1297+ inkscape:transform-center-x="-416.72543"
1298+ inkscape:transform-center-y="-156.15191" />
1299+ <path
1300+ d="m 1487.6154,441.80981 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1301+ id="path371636-7-7"
1302+ sodipodi:nodetypes="cccccc"
1303+ style="stroke-width:0.262672"
1304+ inkscape:transform-center-x="-416.72543"
1305+ inkscape:transform-center-y="-156.15191" />
1306+ <path
1307+ d="m 1489.4088,515.3385 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1308+ id="path371636-7-22"
1309+ sodipodi:nodetypes="cccccc"
1310+ style="stroke-width:0.262672"
1311+ inkscape:transform-center-x="-416.72543"
1312+ inkscape:transform-center-y="-156.15191" />
1313+ <path
1314+ d="m 400.8254,264.26491 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1315+ id="path371636-7-6"
1316+ sodipodi:nodetypes="cccccc"
1317+ style="stroke-width:0.262672"
1318+ inkscape:transform-center-x="-416.72543"
1319+ inkscape:transform-center-y="-156.15191" />
1320+ <path
1321+ d="m 402.6188,346.76052 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1322+ id="path371636-7-1"
1323+ sodipodi:nodetypes="cccccc"
1324+ style="stroke-width:0.262672"
1325+ inkscape:transform-center-x="-416.72543"
1326+ inkscape:transform-center-y="-156.15191" />
1327+ <path
1328+ d="m 402.6188,658.80913 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1329+ id="path371636-7-5"
1330+ sodipodi:nodetypes="cccccc"
1331+ style="stroke-width:0.262672"
1332+ inkscape:transform-center-x="-416.72543"
1333+ inkscape:transform-center-y="-156.15191" />
1334+ <path
1335+ d="m 402.6188,732.33782 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1336+ id="path371636-7-9"
1337+ sodipodi:nodetypes="cccccc"
1338+ style="stroke-width:0.262672"
1339+ inkscape:transform-center-x="-416.72543"
1340+ inkscape:transform-center-y="-156.15191" />
1341+ <path
1342+ d="m 402.4121,800.48637 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1343+ id="path371636-7-4"
1344+ sodipodi:nodetypes="cccccc"
1345+ style="stroke-width:0.262672"
1346+ inkscape:transform-center-x="-416.72543"
1347+ inkscape:transform-center-y="-156.15191" />
1348+ <path
1349+ d="m 402.2055,875.80845 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1350+ id="path371636-7-90"
1351+ sodipodi:nodetypes="cccccc"
1352+ style="stroke-width:0.262672"
1353+ inkscape:transform-center-x="-416.72543"
1354+ inkscape:transform-center-y="-156.15191" />
1355+ <path
1356+ d="m 400.4121,942.16362 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1357+ id="path371636-7-91"
1358+ sodipodi:nodetypes="cccccc"
1359+ style="stroke-width:0.262672"
1360+ inkscape:transform-center-x="-416.72543"
1361+ inkscape:transform-center-y="-156.15191" />
1362+ <path
1363+ d="m 407.9989,1458.6579 c 3.2597,-1.4841 6.4827,-3.0444 9.7556,-4.5049 -3.5093,6.1834 -7.0396,12.3483 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3481 -10.7354,-18.5314 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1364+ id="path371636-7-59"
1365+ sodipodi:nodetypes="cccccc"
1366+ style="stroke-width:0.262672"
1367+ inkscape:transform-center-x="-416.72543"
1368+ inkscape:transform-center-y="-156.15191" />
1369+ </g>
1370+</svg>
Documentation/gpu/amdgpu/display/dcn3_cm_drm_current.svg+1529−0
@@ -0,0 +1,1529 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ version="1.1"
6+ id="svg2019"
7+ width="1702"
8+ height="1845"
9+ viewBox="0 0 1702 1845"
10+ sodipodi:docname="dcn3_cm_drm_current.svg"
11+ inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
12+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14+ xmlns="http://www.w3.org/2000/svg"
15+ xmlns:svg="http://www.w3.org/2000/svg">
16+ <defs
17+ id="defs2023" />
18+ <sodipodi:namedview
19+ id="namedview2021"
20+ pagecolor="#ffffff"
21+ bordercolor="#666666"
22+ borderopacity="1.0"
23+ inkscape:pageshadow="2"
24+ inkscape:pageopacity="0.0"
25+ inkscape:pagecheckerboard="0"
26+ showgrid="false"
27+ inkscape:zoom="0.55760543"
28+ inkscape:cx="1011.4679"
29+ inkscape:cy="249.28021"
30+ inkscape:window-width="1920"
31+ inkscape:window-height="1011"
32+ inkscape:window-x="0"
33+ inkscape:window-y="0"
34+ inkscape:window-maximized="1"
35+ inkscape:current-layer="g2025" />
36+ <g
37+ inkscape:groupmode="layer"
38+ inkscape:label="Image"
39+ id="g2025">
40+ <rect
41+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
42+ id="rect34"
43+ width="208.83351"
44+ height="486.09872"
45+ x="0.90158081"
46+ y="132.77872" />
47+ <rect
48+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
49+ id="rect1019"
50+ width="126.38867"
51+ height="55.320732"
52+ x="25.960823"
53+ y="188.06937" />
54+ <rect
55+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
56+ id="rect1021"
57+ width="126.38867"
58+ height="55.320732"
59+ x="25.960823"
60+ y="346.06937" />
61+ <rect
62+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
63+ id="rect1103"
64+ width="126.38867"
65+ height="55.320732"
66+ x="25.960823"
67+ y="266.06937" />
68+ <rect
69+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
70+ id="rect1105"
71+ width="126.38867"
72+ height="55.320732"
73+ x="25.960823"
74+ y="426.06937" />
75+ <rect
76+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-opacity:1"
77+ id="rect1107"
78+ width="126.38867"
79+ height="55.320732"
80+ x="25.960823"
81+ y="506.06934" />
82+ <path
83+ d="m 402.61883,171.88069 c 0.025,10.97895 0.01,1001.03791 0.049,1012.01891 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-1000.84096 -0.031,-1011.72348 0.053,-0.30366 -0.2175,-0.50268 -0.3652,-0.72837 l 1.5347,0.39394 z"
84+ id="path381056"
85+ sodipodi:nodetypes="cccccccccc"
86+ style="stroke-width:0.205176"
87+ inkscape:transform-center-x="-325.50819"
88+ inkscape:transform-center-y="-121.97185" />
89+ <rect
90+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
91+ id="rect1131"
92+ width="239.47592"
93+ height="1015.9909"
94+ x="298.65631"
95+ y="82.399658" />
96+ <rect
97+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.27861;stroke-opacity:1"
98+ id="rect1133"
99+ width="340.44653"
100+ height="525.77448"
101+ x="298.79562"
102+ y="1142.5299" />
103+ <rect
104+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
105+ id="rect1237"
106+ width="284.00113"
107+ height="945.41412"
108+ x="827.75012"
109+ y="82.880798"
110+ inkscape:connector-avoid="true" />
111+ <rect
112+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
113+ id="rect1239"
114+ width="239.37569"
115+ height="179.03308"
116+ x="1356.9507"
117+ y="98.758331" />
118+ <rect
119+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.00744;stroke-opacity:1"
120+ id="rect1241"
121+ width="239.4184"
122+ height="713.64905"
123+ x="1356.9543"
124+ y="307.7951"
125+ inkscape:connector-avoid="true" />
126+ <rect
127+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
128+ id="rect1345"
129+ width="330.32059"
130+ height="409.44757"
131+ x="1363.8723"
132+ y="1147.7572" />
133+ <rect
134+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-opacity:1"
135+ id="rect1347"
136+ width="369.8941"
137+ height="682.32245"
138+ x="825.72528"
139+ y="1146.6448"
140+ inkscape:connector-avoid="true" />
141+ <rect
142+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
143+ id="rect1349"
144+ width="163.95746"
145+ height="40.144867"
146+ x="1389.9988"
147+ y="190.80583" />
148+ <rect
149+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:0.964132;stroke-opacity:1"
150+ id="rect1619"
151+ width="271.99091"
152+ height="42.038273"
153+ x="1393.981"
154+ y="1197.161"
155+ inkscape:connector-avoid="true" />
156+ <path
157+ d="m 1469.3028,1238.8328 c 0.025,10.9789 0.01,175.0378 0.049,186.0188 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-174.8409 -0.031,-185.7234 0.053,-0.3037 -0.2175,-0.5027 -0.3652,-0.7284 l 1.5347,0.394 z"
158+ id="path106-1"
159+ sodipodi:nodetypes="cccccccccc"
160+ style="stroke-width:0.205176"
161+ inkscape:transform-center-x="-325.50819"
162+ inkscape:transform-center-y="-121.97185" />
163+ <path
164+ d="m 407.4759,1238.4728 c 0.025,10.9789 0.01,291.0378 0.049,302.0188 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-290.8409 -0.031,-301.7234 0.053,-0.3037 -0.2175,-0.5027 -0.3652,-0.7284 l 1.5347,0.394 z"
165+ id="path106-1-7"
166+ sodipodi:nodetypes="cccccccccc"
167+ style="stroke-width:0.205176"
168+ inkscape:transform-center-x="-325.50819"
169+ inkscape:transform-center-y="-121.97185" />
170+ <rect
171+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
172+ id="rect1623"
173+ width="137.32646"
174+ height="41.782684"
175+ x="1396.3848"
176+ y="1268.2837"
177+ inkscape:connector-avoid="true" />
178+ <rect
179+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
180+ id="rect1705"
181+ width="137.32646"
182+ height="41.782684"
183+ x="1396.3848"
184+ y="1348.2837" />
185+ <rect
186+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
187+ id="rect1707"
188+ width="137.32646"
189+ height="41.782684"
190+ x="1396.3848"
191+ y="1432.2837" />
192+ <rect
193+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
194+ id="rect1731"
195+ width="222.34483"
196+ height="44.64616"
197+ x="867.36292"
198+ y="190.42665"
199+ inkscape:connector-avoid="true" />
200+ <rect
201+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
202+ id="rect1813"
203+ width="222.34483"
204+ height="44.64616"
205+ x="867.36292"
206+ y="254.42664"
207+ inkscape:connector-avoid="true" />
208+ <rect
209+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
210+ id="rect1815"
211+ width="222.34483"
212+ height="44.64616"
213+ x="867.36292"
214+ y="318.42664"
215+ inkscape:connector-avoid="true" />
216+ <rect
217+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
218+ id="rect1817"
219+ width="222.34483"
220+ height="44.64616"
221+ x="867.36292"
222+ y="412.42664"
223+ inkscape:connector-avoid="true" />
224+ <rect
225+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
226+ id="rect1819"
227+ width="222.34483"
228+ height="44.64616"
229+ x="867.36292"
230+ y="560.42664" />
231+ <rect
232+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-opacity:1"
233+ id="rect1821"
234+ width="222.34483"
235+ height="44.64616"
236+ x="867.36292"
237+ y="674.42664"
238+ inkscape:connector-avoid="true" />
239+ <rect
240+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
241+ id="rect1823"
242+ width="222.34483"
243+ height="44.64616"
244+ x="867.36292"
245+ y="744.42664"
246+ inkscape:connector-avoid="true" />
247+ <rect
248+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
249+ id="rect1825"
250+ width="222.34483"
251+ height="44.64616"
252+ x="867.36292"
253+ y="820.42664"
254+ inkscape:connector-avoid="true" />
255+ <rect
256+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
257+ id="rect1827"
258+ width="222.34483"
259+ height="44.64616"
260+ x="867.36292"
261+ y="890.42664"
262+ inkscape:connector-avoid="true" />
263+ <rect
264+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
265+ id="rect1829"
266+ width="222.34483"
267+ height="44.64616"
268+ x="867.36292"
269+ y="956.42664"
270+ inkscape:connector-avoid="true" />
271+ <rect
272+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
273+ id="rect1831"
274+ width="222.34483"
275+ height="44.64616"
276+ x="867.36292"
277+ y="1256.4268" />
278+ <rect
279+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-opacity:1"
280+ id="rect1833"
281+ width="222.34483"
282+ height="44.64616"
283+ x="867.36292"
284+ y="1402.4268" />
285+ <rect
286+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
287+ id="rect1915"
288+ width="222.34483"
289+ height="44.64616"
290+ x="867.36292"
291+ y="1330.4268"
292+ inkscape:connector-avoid="true" />
293+ <rect
294+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-opacity:1"
295+ id="rect1917"
296+ width="222.34483"
297+ height="44.64616"
298+ x="867.36292"
299+ y="1478.4268" />
300+ <rect
301+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-opacity:1"
302+ id="rect1919"
303+ width="222.34483"
304+ height="44.64616"
305+ x="867.36292"
306+ y="1548.4268" />
307+ <rect
308+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
309+ id="rect1921"
310+ width="222.34483"
311+ height="44.64616"
312+ x="867.36292"
313+ y="1614.4268" />
314+ <rect
315+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
316+ id="rect1923"
317+ width="222.34483"
318+ height="44.64616"
319+ x="867.36292"
320+ y="1686.4268" />
321+ <rect
322+ style="fill:#eeeeee;fill-opacity:1;stroke:#000000;stroke-opacity:1"
323+ id="rect1925"
324+ width="222.34483"
325+ height="44.64616"
326+ x="867.36292"
327+ y="1754.4268" />
328+ <rect
329+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
330+ id="rect1925-3"
331+ width="169.23357"
332+ height="44.678963"
333+ x="325.21747"
334+ y="134.37756" />
335+ <rect
336+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
337+ id="rect1954"
338+ width="169.23357"
339+ height="44.678963"
340+ x="325.21747"
341+ y="276.37756"
342+ inkscape:connector-avoid="true" />
343+ <rect
344+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.87333333;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
345+ id="rect1956"
346+ width="168.66573"
347+ height="122.14091"
348+ x="325.50134"
349+ y="358.6615"
350+ inkscape:connector-avoid="true" />
351+ <rect
352+ style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
353+ id="rect1958"
354+ width="169.23357"
355+ height="44.678963"
356+ x="325.21747"
357+ y="672.37756" />
358+ <rect
359+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
360+ id="rect1960"
361+ width="169.23357"
362+ height="44.678963"
363+ x="325.21747"
364+ y="744.37756" />
365+ <rect
366+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
367+ id="rect1962"
368+ width="169.14041"
369+ height="54.756817"
370+ x="325.26404"
371+ y="814.42413"
372+ inkscape:connector-avoid="true" />
373+ <rect
374+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
375+ id="rect1964"
376+ width="169.14041"
377+ height="54.756817"
378+ x="325.26404"
379+ y="886.42413"
380+ inkscape:connector-avoid="true" />
381+ <rect
382+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.965912;stroke-opacity:1"
383+ id="rect1966"
384+ width="169.14041"
385+ height="54.756817"
386+ x="325.26404"
387+ y="952.42413"
388+ inkscape:connector-avoid="true" />
389+ <rect
390+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
391+ id="rect2418"
392+ width="169.23357"
393+ height="44.678963"
394+ x="325.21747"
395+ y="510.37756"
396+ inkscape:connector-avoid="true" />
397+ <rect
398+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
399+ id="rect2422"
400+ width="169.23357"
401+ height="44.678963"
402+ x="325.21747"
403+ y="1262.3777" />
404+ <rect
405+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.981369;stroke-opacity:1"
406+ id="rect2424"
407+ width="169.12494"
408+ height="56.528603"
409+ x="325.27179"
410+ y="1322.432" />
411+ <rect
412+ style="fill:#d0cee2;fill-opacity:1;stroke:#000000;stroke-width:0.981369;stroke-opacity:1"
413+ id="rect2426"
414+ width="169.12494"
415+ height="56.528603"
416+ x="325.27179"
417+ y="1396.432" />
418+ <rect
419+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:1.02091;stroke-opacity:1"
420+ id="rect2428"
421+ width="169.0854"
422+ height="61.19017"
423+ x="325.29156"
424+ y="1468.4518" />
425+ <rect
426+ style="fill:#fad7ac;fill-opacity:1;stroke:#000000;stroke-width:0.839627;stroke-opacity:1"
427+ id="rect2430"
428+ width="169.26669"
429+ height="41.344128"
430+ x="325.20093"
431+ y="1550.3611" />
432+ <rect
433+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.13491;stroke-opacity:1"
434+ id="rect2432"
435+ width="287.86237"
436+ height="44.416805"
437+ x="325.34854"
438+ y="1194.5088" />
439+ <rect
440+ style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1.13102;stroke-opacity:1"
441+ id="rect2434"
442+ width="285.86655"
443+ height="44.4207"
444+ x="867.34656"
445+ y="1194.5068" />
446+ <path
447+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
448+ d="m 867.36292,235.07281 v 0"
449+ id="path2509" />
450+ <path
451+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
452+ d="m 867.36292,235.07281 v 0"
453+ id="path2511" />
454+ <path
455+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
456+ d="m 867.36292,235.07281 v 0"
457+ id="path2513" />
458+ <path
459+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
460+ d="m 867.36292,235.07281 v 0"
461+ id="path2515" />
462+ <path
463+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
464+ d="m 867.36292,235.07281 v 0"
465+ id="path2517" />
466+ <path
467+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
468+ d="m 867.36292,235.07281 v 0"
469+ id="path2519" />
470+ <path
471+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
472+ d="m 867.36292,235.07281 v 0"
473+ id="path2521" />
474+ <path
475+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
476+ d="m 867.36292,235.07281 v 0"
477+ id="path2523" />
478+ <path
479+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
480+ d="m 867.36292,235.07281 v 0"
481+ id="path2525" />
482+ <path
483+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
484+ d="m 867.36292,235.07281 v 0"
485+ id="path2527" />
486+ <path
487+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
488+ d="m 867.36292,235.07281 v 0"
489+ id="path2529" />
490+ <path
491+ style="fill:none;stroke:#000000;stroke-width:2.66666675;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8.00000024, 8.00000024;stroke-dashoffset:0"
492+ d="m 867.36292,235.07281 v 0"
493+ id="path2531" />
494+ <path
495+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
496+ d="m 449.83425,179.05653 v 33.6932 h 417.52867"
497+ id="path6876"
498+ inkscape:connector-type="orthogonal"
499+ inkscape:connector-curvature="0"
500+ inkscape:connection-start="#rect1925-3"
501+ inkscape:connection-end="#rect1731"
502+ sodipodi:nodetypes="ccc" />
503+ <path
504+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
505+ d="m 494.45103,156.71704 h 216.64955 v 161.7096 h 156.26234"
506+ id="path6878"
507+ inkscape:connector-type="orthogonal"
508+ inkscape:connector-curvature="0"
509+ inkscape:connection-start="#rect1925-3"
510+ sodipodi:nodetypes="cccc" />
511+ <path
512+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
513+ d="m 451.83425,321.05653 v 19.69319 h 415.52867"
514+ id="path7294"
515+ inkscape:connector-type="orthogonal"
516+ inkscape:connector-curvature="0"
517+ inkscape:connection-start="#rect1954"
518+ inkscape:connection-end="#rect1815"
519+ sodipodi:nodetypes="ccc" />
520+ <path
521+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
522+ d="M 494.45103,298.71704 H 659.10058 V 434.74972 H 867.36292"
523+ id="path7296"
524+ inkscape:connector-type="orthogonal"
525+ inkscape:connector-curvature="0"
526+ inkscape:connection-end="#rect1817"
527+ inkscape:connection-start="#rect1954"
528+ sodipodi:nodetypes="cccc" />
529+ <path
530+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
531+ d="M 867.36292,560.42664 H 661.10058 V 480.8024 H 494.16705"
532+ id="path7720"
533+ inkscape:connector-type="orthogonal"
534+ inkscape:connector-curvature="0"
535+ sodipodi:nodetypes="cccc" />
536+ <path
537+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
538+ d="M 455.83425,594.37756 V 582.74972 H 867.36292"
539+ id="path7724"
540+ inkscape:connector-type="orthogonal"
541+ inkscape:connector-curvature="0"
542+ inkscape:connection-start="#rect2420"
543+ inkscape:connection-end="#rect1819"
544+ sodipodi:nodetypes="ccc" />
545+ <rect
546+ style="fill:#afdde9;fill-opacity:1;stroke:#000000;stroke-width:0.872749;stroke-opacity:1"
547+ id="rect2420"
548+ width="169.23357"
549+ height="44.678963"
550+ x="325.21747"
551+ y="594.37756" />
552+ <path
553+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
554+ d="M 494.45103,696.74972 H 867.36292"
555+ id="path7726"
556+ inkscape:connector-type="orthogonal"
557+ inkscape:connector-curvature="0"
558+ inkscape:connection-start="#rect1958"
559+ inkscape:connection-end="#rect1821" />
560+ <path
561+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
562+ d="M 867.36292,766.74972 H 494.45103"
563+ id="path7728"
564+ inkscape:connector-type="orthogonal"
565+ inkscape:connector-curvature="0"
566+ inkscape:connection-start="#rect1823"
567+ inkscape:connection-end="#rect1960" />
568+ <path
569+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
570+ d="M 494.45105,789.05652 H 657.82418 V 1278.7498 H 867.36292"
571+ id="path7730"
572+ inkscape:connector-type="orthogonal"
573+ inkscape:connector-curvature="0"
574+ inkscape:connection-end="#rect1831"
575+ sodipodi:nodetypes="cccc" />
576+ <path
577+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
578+ d="m 494.40445,841.80254 h 167.41973 v 0.94718 h 205.53874"
579+ id="path8140"
580+ inkscape:connector-type="orthogonal"
581+ inkscape:connector-curvature="0"
582+ inkscape:connection-start="#rect1962"
583+ inkscape:connection-end="#rect1825" />
584+ <path
585+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
586+ d="m 494.40445,913.80254 h 167.41973 v -1.05282 h 205.53874"
587+ id="path8142"
588+ inkscape:connector-type="orthogonal"
589+ inkscape:connector-curvature="0"
590+ inkscape:connection-start="#rect1964"
591+ inkscape:connection-end="#rect1827" />
592+ <path
593+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
594+ d="m 494.40445,979.80254 h 167.41973 v -1.05282 h 205.53874"
595+ id="path8144"
596+ inkscape:connector-type="orthogonal"
597+ inkscape:connector-curvature="0"
598+ inkscape:connection-start="#rect1966"
599+ inkscape:connection-end="#rect1829" />
600+ <path
601+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
602+ d="M 494.39673,1352.7498 H 867.36292"
603+ id="path8146"
604+ inkscape:connector-type="orthogonal"
605+ inkscape:connector-curvature="0"
606+ inkscape:connection-start="#rect2424"
607+ inkscape:connection-end="#rect1915" />
608+ <path
609+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
610+ d="M 494.39673,1424.7498 H 867.36292"
611+ id="path8148"
612+ inkscape:connector-type="orthogonal"
613+ inkscape:connector-curvature="0"
614+ inkscape:connection-start="#rect2426"
615+ inkscape:connection-end="#rect1833" />
616+ <path
617+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
618+ d="M 494.37697,1500.7498 H 867.36292"
619+ id="path8150"
620+ inkscape:connector-type="orthogonal"
621+ inkscape:connector-curvature="0"
622+ inkscape:connection-start="#rect2428"
623+ inkscape:connection-end="#rect1917" />
624+ <path
625+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
626+ d="m 494.46762,1570.7498 h 372.8953"
627+ id="path8152"
628+ inkscape:connector-type="orthogonal"
629+ inkscape:connector-curvature="0"
630+ inkscape:connection-start="#rect2430"
631+ inkscape:connection-end="#rect1919" />
632+ <path
633+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
634+ d="M 1396.3848,1289.175 H 1288.1445 V 582.74972 h -198.4368"
635+ id="path8154"
636+ inkscape:connector-type="orthogonal"
637+ inkscape:connector-curvature="0"
638+ inkscape:connection-start="#rect1623"
639+ inkscape:connection-end="#rect1819" />
640+ <path
641+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
642+ d="m 1396.3848,1369.175 h -156.2403 v -90.4252 h -150.4368"
643+ id="path8462"
644+ inkscape:connector-type="orthogonal"
645+ inkscape:connector-curvature="0"
646+ inkscape:connection-start="#rect1705"
647+ inkscape:connection-end="#rect1831"
648+ sodipodi:nodetypes="cccc" />
649+ <path
650+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
651+ d="m 1089.7077,1500.7498 h 375.3403 v -26.6834"
652+ id="path8668"
653+ inkscape:connector-type="orthogonal"
654+ inkscape:connector-curvature="0"
655+ inkscape:connection-start="#rect1917"
656+ inkscape:connection-end="#rect1707" />
657+ <path
658+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
659+ d="M 1389.9988,212.74973 H 1089.7077"
660+ id="path8672"
661+ inkscape:connector-type="orthogonal"
662+ inkscape:connector-curvature="0"
663+ inkscape:connection-start="#rect1349"
664+ inkscape:connection-end="#rect1731" />
665+ <path
666+ style="display:inline;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
667+ d="M 1389.9988,230.9507 H 1223.331 v 109.79902 h -133.6233"
668+ id="path8674"
669+ inkscape:connector-type="orthogonal"
670+ inkscape:connector-curvature="0"
671+ inkscape:connection-end="#rect1815"
672+ sodipodi:nodetypes="cccc" />
673+ <text
674+ xml:space="preserve"
675+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
676+ x="58.63356"
677+ y="69.574417"
678+ id="text28675"><tspan
679+ sodipodi:role="line"
680+ id="tspan28673"
681+ x="58.63356"
682+ y="69.574417" /></text>
683+ <text
684+ xml:space="preserve"
685+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
686+ x="56.388252"
687+ y="221.86568"
688+ id="text31913"><tspan
689+ sodipodi:role="line"
690+ id="tspan31911"
691+ x="56.388252"
692+ y="221.86568">Matrix</tspan></text>
693+ <text
694+ xml:space="preserve"
695+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
696+ x="53.441296"
697+ y="300.866"
698+ id="text38843"><tspan
699+ sodipodi:role="line"
700+ id="tspan38841"
701+ x="53.441296"
702+ y="300.866">1D LUT</tspan></text>
703+ <text
704+ xml:space="preserve"
705+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
706+ x="53.441296"
707+ y="378.866"
708+ id="text41049"><tspan
709+ sodipodi:role="line"
710+ id="tspan41047"
711+ x="53.441296"
712+ y="378.866">3D LUT</tspan></text>
713+ <text
714+ xml:space="preserve"
715+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
716+ x="40.831493"
717+ y="460.87411"
718+ id="text45037"><tspan
719+ sodipodi:role="line"
720+ id="tspan45035"
721+ x="40.831493"
722+ y="460.87411"
723+ style="font-size:18.6667px">Unpacking</tspan></text>
724+ <text
725+ xml:space="preserve"
726+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
727+ x="62.130371"
728+ y="540.68872"
729+ id="text49945"><tspan
730+ sodipodi:role="line"
731+ id="tspan49943"
732+ x="62.130371"
733+ y="540.68872"
734+ style="font-size:18.6667px">Other</tspan></text>
735+ <text
736+ xml:space="preserve"
737+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
738+ x="1423.2806"
739+ y="128.08769"
740+ id="text55719"><tspan
741+ sodipodi:role="line"
742+ id="tspan55717"
743+ x="1423.2806"
744+ y="128.08769"
745+ style="font-size:18.6667px">drm_framebuffer</tspan></text>
746+ <text
747+ xml:space="preserve"
748+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
749+ x="1439.9988"
750+ y="218.74973"
751+ id="text62479"><tspan
752+ sodipodi:role="line"
753+ id="tspan62477"
754+ x="1439.9988"
755+ y="218.74973"
756+ style="font-size:18.6667px">format</tspan></text>
757+ <text
758+ xml:space="preserve"
759+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
760+ x="1475.2806"
761+ y="340.08771"
762+ id="text64465"><tspan
763+ sodipodi:role="line"
764+ id="tspan64463"
765+ x="1475.2806"
766+ y="340.08771"
767+ style="font-size:18.6667px">drm_plane</tspan></text>
768+ <text
769+ xml:space="preserve"
770+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
771+ x="1589.2806"
772+ y="1178.0876"
773+ id="text64469"><tspan
774+ sodipodi:role="line"
775+ id="tspan64467"
776+ x="1589.2806"
777+ y="1178.0876"
778+ style="font-size:18.6667px">drm_crtc</tspan></text>
779+ <text
780+ xml:space="preserve"
781+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
782+ x="872.23993"
783+ y="1172.4491"
784+ id="text64469-9"><tspan
785+ sodipodi:role="line"
786+ id="tspan64467-2"
787+ x="872.23993"
788+ y="1172.4491"
789+ style="font-size:18.6667px">Stream</tspan></text>
790+ <text
791+ xml:space="preserve"
792+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
793+ x="328.26071"
794+ y="1175.6371"
795+ id="text64469-9-2"><tspan
796+ sodipodi:role="line"
797+ id="tspan64467-2-8"
798+ x="328.26071"
799+ y="1175.6371"
800+ style="font-size:18.6667px">MPC</tspan></text>
801+ <text
802+ xml:space="preserve"
803+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
804+ x="330.14737"
805+ y="114.41869"
806+ id="text64469-9-9"><tspan
807+ sodipodi:role="line"
808+ id="tspan64467-2-7"
809+ x="330.14737"
810+ y="114.41869"
811+ style="font-size:18.6667px">DPP</tspan></text>
812+ <path
813+ d="m 1488.3608,401.47792 c 0.025,10.97895 0.01,773.03788 0.049,784.01888 2.5462,-1.1592 5.0637,-2.3779 7.6202,-3.5187 -2.7411,4.8298 -5.4987,9.6453 -8.2624,14.4607 -2.7925,-4.8257 -5.5993,-9.6453 -8.3856,-14.4751 2.6221,1.1736 5.2217,2.3923 7.8398,3.5721 0,-10.8825 -0.035,-772.84093 -0.031,-783.72345 0.053,-0.30366 -0.2175,-0.50268 -0.3652,-0.72837 l 1.5347,0.39394 z"
814+ id="path106"
815+ sodipodi:nodetypes="cccccccccc"
816+ style="stroke-width:0.205176"
817+ inkscape:transform-center-x="-325.50819"
818+ inkscape:transform-center-y="-121.97185" />
819+ <text
820+ xml:space="preserve"
821+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
822+ x="1495.9988"
823+ y="1224.7498"
824+ id="text78849"><tspan
825+ sodipodi:role="line"
826+ id="tspan78847"
827+ x="1495.9988"
828+ y="1224.7498"
829+ style="font-size:18.6667px">Blender</tspan></text>
830+ <text
831+ xml:space="preserve"
832+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
833+ x="1417.9988"
834+ y="1294.7498"
835+ id="text78853"><tspan
836+ sodipodi:role="line"
837+ id="tspan78851"
838+ x="1417.9988"
839+ y="1294.7498"
840+ style="font-size:18.6667px">Degamma</tspan></text>
841+ <text
842+ xml:space="preserve"
843+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
844+ x="1451.9988"
845+ y="1376.7498"
846+ id="text78857"><tspan
847+ sodipodi:role="line"
848+ id="tspan78855"
849+ x="1451.9988"
850+ y="1376.7498"
851+ style="font-size:18.6667px">CTM</tspan></text>
852+ <text
853+ xml:space="preserve"
854+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
855+ x="1427.9988"
856+ y="1458.7498"
857+ id="text78861"><tspan
858+ sodipodi:role="line"
859+ id="tspan78859"
860+ x="1427.9988"
861+ y="1458.7498"
862+ style="font-size:18.6667px">Gamma</tspan></text>
863+ <text
864+ xml:space="preserve"
865+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
866+ x="949.99878"
867+ y="218.74973"
868+ id="text104653"><tspan
869+ sodipodi:role="line"
870+ id="tspan104651"
871+ x="949.99878"
872+ y="218.74973"
873+ style="font-size:18.6667px">format</tspan></text>
874+ <text
875+ xml:space="preserve"
876+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
877+ x="911.99878"
878+ y="284.74973"
879+ id="text104657"><tspan
880+ sodipodi:role="line"
881+ id="tspan104655"
882+ x="911.99878"
883+ y="284.74973"
884+ style="font-size:18.6667px">bias_and_scale</tspan></text>
885+ <text
886+ xml:space="preserve"
887+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
888+ x="887.99878"
889+ y="346.74973"
890+ id="text104661"><tspan
891+ sodipodi:role="line"
892+ id="tspan104659"
893+ x="887.99878"
894+ y="346.74973"
895+ style="font-size:18.6667px">color space matrix</tspan></text>
896+ <text
897+ xml:space="preserve"
898+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
899+ x="871.99878"
900+ y="442.74973"
901+ id="text104665"><tspan
902+ sodipodi:role="line"
903+ id="tspan104663"
904+ x="871.99878"
905+ y="442.74973"
906+ style="font-size:18.6667px">input_csc_color_matrix</tspan></text>
907+ <text
908+ xml:space="preserve"
909+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
910+ x="905.99878"
911+ y="586.74976"
912+ id="text125075"><tspan
913+ sodipodi:role="line"
914+ id="tspan125073"
915+ x="905.99878"
916+ y="586.74976"
917+ style="font-size:18.6667px">in_transfer_func</tspan></text>
918+ <text
919+ xml:space="preserve"
920+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
921+ x="945.0083"
922+ y="702.85938"
923+ id="text117309"><tspan
924+ sodipodi:role="line"
925+ id="tspan117307"
926+ x="945.0083"
927+ y="702.85938"
928+ style="font-size:18.6667px">hdr_mult</tspan></text>
929+ <text
930+ xml:space="preserve"
931+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
932+ x="874.5556"
933+ y="773.42615"
934+ id="text117309-6"><tspan
935+ sodipodi:role="line"
936+ id="tspan117307-7"
937+ x="874.5556"
938+ y="773.42615"
939+ style="font-size:18.6667px">gamut_remap_matrix</tspan></text>
940+ <text
941+ xml:space="preserve"
942+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
943+ x="913.72528"
944+ y="846.55896"
945+ id="text117309-5"><tspan
946+ sodipodi:role="line"
947+ id="tspan117307-3"
948+ x="913.72528"
949+ y="846.55896"
950+ style="font-size:18.6667px">in_shaper_func</tspan></text>
951+ <text
952+ xml:space="preserve"
953+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
954+ x="937.72528"
955+ y="918.25787"
956+ id="text117309-56"><tspan
957+ sodipodi:role="line"
958+ id="tspan117307-2"
959+ x="937.72528"
960+ y="918.25787"
961+ style="font-size:18.6667px">lut3d_func</tspan></text>
962+ <text
963+ xml:space="preserve"
964+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
965+ x="945.9895"
966+ y="986.10767"
967+ id="text117309-9"><tspan
968+ sodipodi:role="line"
969+ id="tspan117307-1"
970+ x="945.9895"
971+ y="986.10767"
972+ style="font-size:18.6667px">blend_tf</tspan></text>
973+ <text
974+ xml:space="preserve"
975+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
976+ x="975.91803"
977+ y="1224.5564"
978+ id="text137434"><tspan
979+ sodipodi:role="line"
980+ id="tspan137432"
981+ x="975.91803"
982+ y="1224.5564"
983+ style="font-size:18.6667px">Blender</tspan></text>
984+ <text
985+ xml:space="preserve"
986+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
987+ x="879.31372"
988+ y="1283.4249"
989+ id="text137434-2"><tspan
990+ sodipodi:role="line"
991+ id="tspan137432-7"
992+ x="879.31372"
993+ y="1283.4249"
994+ style="font-size:18.6667px">gamut_remap_matrix</tspan></text>
995+ <text
996+ xml:space="preserve"
997+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
998+ x="925.31372"
999+ y="1359.2747"
1000+ id="text137434-0"><tspan
1001+ sodipodi:role="line"
1002+ id="tspan137432-9"
1003+ x="925.31372"
1004+ y="1359.2747"
1005+ style="font-size:18.6667px">func_shaper</tspan></text>
1006+ <text
1007+ xml:space="preserve"
1008+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1009+ x="930.33252"
1010+ y="1430.2566"
1011+ id="text137434-3"><tspan
1012+ sodipodi:role="line"
1013+ id="tspan137432-6"
1014+ x="930.33252"
1015+ y="1430.2566"
1016+ style="font-size:18.6667px">lut3d_func</tspan></text>
1017+ <text
1018+ xml:space="preserve"
1019+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1020+ x="900.18158"
1021+ y="1504.6725"
1022+ id="text137434-06"><tspan
1023+ sodipodi:role="line"
1024+ id="tspan137432-2"
1025+ x="900.18158"
1026+ y="1504.6725"
1027+ style="font-size:18.6667px">out_transfer_func</tspan></text>
1028+ <text
1029+ xml:space="preserve"
1030+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1031+ x="904.0307"
1032+ y="1575.8053"
1033+ id="text137434-6"><tspan
1034+ sodipodi:role="line"
1035+ id="tspan137432-1"
1036+ x="904.0307"
1037+ y="1575.8053"
1038+ style="font-size:18.6667px">csc_color_matrix</tspan></text>
1039+ <text
1040+ xml:space="preserve"
1041+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1042+ x="903.16278"
1043+ y="1642.1078"
1044+ id="text137434-8"><tspan
1045+ sodipodi:role="line"
1046+ id="tspan137432-79"
1047+ x="903.16278"
1048+ y="1642.1078"
1049+ style="font-size:18.6667px">bit_depth_param</tspan></text>
1050+ <text
1051+ xml:space="preserve"
1052+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1053+ x="939.31372"
1054+ y="1713.8068"
1055+ id="text137434-20"><tspan
1056+ sodipodi:role="line"
1057+ id="tspan137432-23"
1058+ x="939.31372"
1059+ y="1713.8068"
1060+ style="font-size:18.6667px">clamping</tspan></text>
1061+ <text
1062+ xml:space="preserve"
1063+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1064+ x="894.0307"
1065+ y="1782.5244"
1066+ id="text137434-7"><tspan
1067+ sodipodi:role="line"
1068+ id="tspan137432-5"
1069+ x="894.0307"
1070+ y="1782.5244"
1071+ style="font-size:18.6667px">output_color_space</tspan></text>
1072+ <text
1073+ xml:space="preserve"
1074+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1075+ x="869.63062"
1076+ y="117.7968"
1077+ id="text176429"><tspan
1078+ sodipodi:role="line"
1079+ id="tspan176427"
1080+ x="869.63062"
1081+ y="117.7968"
1082+ style="font-size:18.6667px">Plane</tspan></text>
1083+ <text
1084+ xml:space="preserve"
1085+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1086+ x="27.605465"
1087+ y="162.20587"
1088+ id="text176429-2"><tspan
1089+ sodipodi:role="line"
1090+ id="tspan176427-0"
1091+ x="27.605465"
1092+ y="162.20587"
1093+ style="font-size:18.6667px">Legend</tspan></text>
1094+ <text
1095+ xml:space="preserve"
1096+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1097+ x="298.63959"
1098+ y="59.293999"
1099+ id="text176429-9"><tspan
1100+ sodipodi:role="line"
1101+ id="tspan176427-2"
1102+ x="298.63959"
1103+ y="59.293999"
1104+ style="font-size:18.6667px">DCN 3.0</tspan></text>
1105+ <text
1106+ xml:space="preserve"
1107+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1108+ x="826.65735"
1109+ y="59.458061"
1110+ id="text176429-66"><tspan
1111+ sodipodi:role="line"
1112+ id="tspan176427-4"
1113+ x="826.65735"
1114+ y="59.458061"
1115+ style="font-size:18.6667px">DC Interface</tspan></text>
1116+ <text
1117+ xml:space="preserve"
1118+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1119+ x="1362.9948"
1120+ y="59.458061"
1121+ id="text176429-95"><tspan
1122+ sodipodi:role="line"
1123+ id="tspan176427-04"
1124+ x="1362.9948"
1125+ y="59.458061"
1126+ style="font-size:18.6667px">DRM Interface</tspan></text>
1127+ <text
1128+ xml:space="preserve"
1129+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1130+ x="867.34656"
1131+ y="1194.5068"
1132+ id="text184728"><tspan
1133+ sodipodi:role="line"
1134+ id="tspan184726"
1135+ x="867.34656"
1136+ y="1194.5068" /></text>
1137+ <text
1138+ xml:space="preserve"
1139+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1140+ x="389.01593"
1141+ y="159.8909"
1142+ id="text64469-9-3"><tspan
1143+ sodipodi:role="line"
1144+ id="tspan64467-2-6"
1145+ x="389.01593"
1146+ y="159.8909"
1147+ style="font-size:18.6667px">CNVC</tspan></text>
1148+ <text
1149+ xml:space="preserve"
1150+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1151+ x="365.88379"
1152+ y="303.59048"
1153+ id="text64469-9-1"><tspan
1154+ sodipodi:role="line"
1155+ id="tspan64467-2-2"
1156+ x="365.88379"
1157+ y="303.59048"
1158+ style="font-size:18.6667px">Input CSC</tspan></text>
1159+ <text
1160+ xml:space="preserve"
1161+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1162+ x="413.06488"
1163+ y="390.95001"
1164+ id="text64469-9-93"><tspan
1165+ sodipodi:role="line"
1166+ id="tspan64467-2-1"
1167+ x="413.06488"
1168+ y="390.95001"
1169+ style="font-size:18.6667px;text-align:center;text-anchor:middle">DeGamma</tspan><tspan
1170+ sodipodi:role="line"
1171+ x="413.06488"
1172+ y="414.28339"
1173+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1174+ id="tspan233797">ROM</tspan><tspan
1175+ sodipodi:role="line"
1176+ x="413.06488"
1177+ y="437.61676"
1178+ style="font-size:10.6667px;text-align:center;text-anchor:middle"
1179+ id="tspan233799">(sRGB, BT2020, Gamma 2.2,</tspan><tspan
1180+ sodipodi:role="line"
1181+ x="413.06488"
1182+ y="460.95013"
1183+ style="font-size:10.6667px;text-align:center;text-anchor:middle"
1184+ id="tspan242597">PQ, HLG)</tspan></text>
1185+ <text
1186+ xml:space="preserve"
1187+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1188+ x="372.44986"
1189+ y="538.83807"
1190+ id="text64469-9-94"><tspan
1191+ sodipodi:role="line"
1192+ id="tspan64467-2-78"
1193+ x="372.44986"
1194+ y="538.83807"
1195+ style="font-size:18.6667px">Post CSC</tspan></text>
1196+ <text
1197+ xml:space="preserve"
1198+ style="font-style:normal;font-weight:normal;font-size:16px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1199+ x="335.31775"
1200+ y="622.23511"
1201+ id="text64469-9-4"><tspan
1202+ sodipodi:role="line"
1203+ id="tspan64467-2-5"
1204+ x="335.31775"
1205+ y="622.23511"
1206+ style="font-size:16px">Gamma Correction</tspan></text>
1207+ <text
1208+ xml:space="preserve"
1209+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1210+ x="351.16684"
1211+ y="700.34918"
1212+ id="text64469-9-0"><tspan
1213+ sodipodi:role="line"
1214+ id="tspan64467-2-3"
1215+ x="351.16684"
1216+ y="700.34918"
1217+ style="font-size:18.6667px">HDR Multiply</tspan></text>
1218+ <text
1219+ xml:space="preserve"
1220+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1221+ x="345.16684"
1222+ y="771.33112"
1223+ id="text64469-9-6"><tspan
1224+ sodipodi:role="line"
1225+ id="tspan64467-2-10"
1226+ x="345.16684"
1227+ y="771.33112"
1228+ style="font-size:18.6667px">Gamut Remap</tspan></text>
1229+ <text
1230+ xml:space="preserve"
1231+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1232+ x="412.5184"
1233+ y="836.04877"
1234+ id="text64469-9-63"><tspan
1235+ sodipodi:role="line"
1236+ id="tspan64467-2-20"
1237+ x="412.5184"
1238+ y="836.04877"
1239+ style="font-size:18.6667px;text-align:center;text-anchor:middle">Shaper LUT</tspan><tspan
1240+ sodipodi:role="line"
1241+ x="412.5184"
1242+ y="859.38214"
1243+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1244+ id="tspan222533">RAM</tspan></text>
1245+ <text
1246+ xml:space="preserve"
1247+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1248+ x="413.54086"
1249+ y="908.61554"
1250+ id="text64469-9-61"><tspan
1251+ sodipodi:role="line"
1252+ id="tspan64467-2-55"
1253+ x="413.54086"
1254+ y="908.61554"
1255+ style="font-size:18.6667px;text-align:center;text-anchor:middle">3D LUT</tspan><tspan
1256+ sodipodi:role="line"
1257+ x="413.54086"
1258+ y="931.94891"
1259+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1260+ id="tspan221121">RAM</tspan></text>
1261+ <text
1262+ xml:space="preserve"
1263+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1264+ x="344.0347"
1265+ y="985.33319"
1266+ id="text64469-9-47"><tspan
1267+ sodipodi:role="line"
1268+ id="tspan64467-2-65"
1269+ x="344.0347"
1270+ y="985.33319"
1271+ style="font-size:18.6667px">Blend Gamma</tspan></text>
1272+ <text
1273+ xml:space="preserve"
1274+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1275+ x="433.84625"
1276+ y="1223.411"
1277+ id="text64469-9-69"><tspan
1278+ sodipodi:role="line"
1279+ id="tspan64467-2-37"
1280+ x="433.84625"
1281+ y="1223.411"
1282+ style="font-size:18.6667px">Blender</tspan></text>
1283+ <text
1284+ xml:space="preserve"
1285+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1286+ x="343.73291"
1287+ y="1290.2421"
1288+ id="text64469-9-45"><tspan
1289+ sodipodi:role="line"
1290+ id="tspan64467-2-25"
1291+ x="343.73291"
1292+ y="1290.2421"
1293+ style="font-size:18.6667px">Gamut Remap</tspan></text>
1294+ <text
1295+ xml:space="preserve"
1296+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1297+ x="408.74442"
1298+ y="1344.2428"
1299+ id="text64469-9-474"><tspan
1300+ sodipodi:role="line"
1301+ id="tspan64467-2-4"
1302+ x="408.74442"
1303+ y="1344.2428"
1304+ style="font-size:18.6667px;text-align:center;text-anchor:middle">Shaper LUT</tspan><tspan
1305+ sodipodi:role="line"
1306+ x="408.74442"
1307+ y="1367.5762"
1308+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1309+ id="tspan208303">RAM</tspan></text>
1310+ <text
1311+ xml:space="preserve"
1312+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1313+ x="407.1257"
1314+ y="1420.2435"
1315+ id="text64469-9-30"><tspan
1316+ sodipodi:role="line"
1317+ id="tspan64467-2-786"
1318+ x="407.1257"
1319+ y="1420.2435"
1320+ style="font-size:18.6667px;text-align:center;text-anchor:middle">3D LUT</tspan><tspan
1321+ sodipodi:role="line"
1322+ x="407.1257"
1323+ y="1443.5769"
1324+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1325+ id="tspan204749">RAM</tspan></text>
1326+ <text
1327+ xml:space="preserve"
1328+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1329+ x="408.64996"
1330+ y="1492.8102"
1331+ id="text64469-9-8"><tspan
1332+ sodipodi:role="line"
1333+ id="tspan64467-2-84"
1334+ x="408.64996"
1335+ y="1492.8102"
1336+ style="font-size:18.6667px;text-align:center;text-anchor:middle">Gamma</tspan><tspan
1337+ sodipodi:role="line"
1338+ x="408.64996"
1339+ y="1516.1436"
1340+ style="font-size:18.6667px;text-align:center;text-anchor:middle"
1341+ id="tspan197733">RAM</tspan></text>
1342+ <text
1343+ xml:space="preserve"
1344+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1345+ x="385.46863"
1346+ y="1575.2261"
1347+ id="text64469-9-31"><tspan
1348+ sodipodi:role="line"
1349+ id="tspan64467-2-49"
1350+ x="385.46863"
1351+ y="1575.2261"
1352+ style="font-size:18.6667px">OCSC</tspan></text>
1353+ <text
1354+ xml:space="preserve"
1355+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1356+ x="1356.5106"
1357+ y="53.140579"
1358+ id="text273287"><tspan
1359+ sodipodi:role="line"
1360+ id="tspan273285"
1361+ x="1356.5106"
1362+ y="53.140579" /></text>
1363+ <rect
1364+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1365+ id="rect1411"
1366+ width="177.28049"
1367+ height="38.940468"
1368+ x="1392.2576"
1369+ y="459.24118" />
1370+ <text
1371+ xml:space="preserve"
1372+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1373+ x="1411.7203"
1374+ y="485.93231"
1375+ id="text78841"><tspan
1376+ sodipodi:role="line"
1377+ id="tspan78839"
1378+ x="1411.7203"
1379+ y="485.93231"
1380+ style="font-size:18.6667px">color_encoding</tspan></text>
1381+ <rect
1382+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1383+ id="rect1515"
1384+ width="175.11876"
1385+ height="43.239407"
1386+ x="1393.7493"
1387+ y="525.6983" />
1388+ <text
1389+ xml:space="preserve"
1390+ style="font-style:normal;font-weight:normal;font-size:17.3333px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1391+ x="1399.212"
1392+ y="553.44904"
1393+ id="text78845"><tspan
1394+ sodipodi:role="line"
1395+ id="tspan78843"
1396+ x="1399.212"
1397+ y="553.44904">pixel_blend_mode</tspan></text>
1398+ <rect
1399+ style="fill:#f9f7ed;fill-opacity:1;stroke:#000000;stroke-opacity:1"
1400+ id="rect371322"
1401+ width="177.28049"
1402+ height="38.940468"
1403+ x="1391.6781"
1404+ y="385.61713" />
1405+ <text
1406+ xml:space="preserve"
1407+ style="font-style:normal;font-weight:normal;font-size:18.6667px;line-height:1.25;font-family:sans-serif;fill:#000000;fill-opacity:1;stroke:none"
1408+ x="1427.5771"
1409+ y="409.29523"
1410+ id="text78837"><tspan
1411+ sodipodi:role="line"
1412+ id="tspan78835"
1413+ x="1427.5771"
1414+ y="409.29523"
1415+ style="font-size:18.6667px">color_range</tspan></text>
1416+ <path
1417+ d="m 1469.6815,1334.9145 c 3.2597,-1.4841 6.4827,-3.0444 9.7556,-4.5049 -3.5093,6.1834 -7.0396,12.3483 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3481 -10.7354,-18.5314 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1418+ id="path371636-7"
1419+ sodipodi:nodetypes="cccccc"
1420+ style="stroke-width:0.262672"
1421+ inkscape:transform-center-x="-416.72543"
1422+ inkscape:transform-center-y="-156.15191" />
1423+ <path
1424+ d="m 1467.8882,1256.0056 c 3.2597,-1.4841 6.4827,-3.0443 9.7556,-4.5048 -3.5093,6.1833 -7.0396,12.3482 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3482 -10.7354,-18.5315 3.3569,1.5025 6.685,3.0628 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1425+ id="path371636-7-2"
1426+ sodipodi:nodetypes="cccccc"
1427+ style="stroke-width:0.262672"
1428+ inkscape:transform-center-x="-416.72543"
1429+ inkscape:transform-center-y="-156.15191" />
1430+ <path
1431+ d="m 1487.6154,441.80981 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1432+ id="path371636-7-7"
1433+ sodipodi:nodetypes="cccccc"
1434+ style="stroke-width:0.262672"
1435+ inkscape:transform-center-x="-416.72543"
1436+ inkscape:transform-center-y="-156.15191" />
1437+ <path
1438+ d="m 1489.4088,515.3385 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1439+ id="path371636-7-22"
1440+ sodipodi:nodetypes="cccccc"
1441+ style="stroke-width:0.262672"
1442+ inkscape:transform-center-x="-416.72543"
1443+ inkscape:transform-center-y="-156.15191" />
1444+ <path
1445+ d="m 400.8254,264.26491 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1446+ id="path371636-7-6"
1447+ sodipodi:nodetypes="cccccc"
1448+ style="stroke-width:0.262672"
1449+ inkscape:transform-center-x="-416.72543"
1450+ inkscape:transform-center-y="-156.15191" />
1451+ <path
1452+ d="m 402.6188,346.76052 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1453+ id="path371636-7-1"
1454+ sodipodi:nodetypes="cccccc"
1455+ style="stroke-width:0.262672"
1456+ inkscape:transform-center-x="-416.72543"
1457+ inkscape:transform-center-y="-156.15191" />
1458+ <path
1459+ d="m 404.2055,500.78482 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1460+ id="path371636-7-0"
1461+ sodipodi:nodetypes="cccccc"
1462+ style="stroke-width:0.262672"
1463+ inkscape:transform-center-x="-416.72543"
1464+ inkscape:transform-center-y="-156.15191" />
1465+ <path
1466+ d="m 402.6188,581.69367 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1467+ id="path371636-7-61"
1468+ sodipodi:nodetypes="cccccc"
1469+ style="stroke-width:0.262672"
1470+ inkscape:transform-center-x="-416.72543"
1471+ inkscape:transform-center-y="-156.15191" />
1472+ <path
1473+ d="m 402.6188,658.80913 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1474+ id="path371636-7-5"
1475+ sodipodi:nodetypes="cccccc"
1476+ style="stroke-width:0.262672"
1477+ inkscape:transform-center-x="-416.72543"
1478+ inkscape:transform-center-y="-156.15191" />
1479+ <path
1480+ d="m 402.6188,732.33782 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1481+ id="path371636-7-9"
1482+ sodipodi:nodetypes="cccccc"
1483+ style="stroke-width:0.262672"
1484+ inkscape:transform-center-x="-416.72543"
1485+ inkscape:transform-center-y="-156.15191" />
1486+ <path
1487+ d="m 402.4121,800.48637 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1488+ id="path371636-7-4"
1489+ sodipodi:nodetypes="cccccc"
1490+ style="stroke-width:0.262672"
1491+ inkscape:transform-center-x="-416.72543"
1492+ inkscape:transform-center-y="-156.15191" />
1493+ <path
1494+ d="m 402.2055,875.80845 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1495+ id="path371636-7-90"
1496+ sodipodi:nodetypes="cccccc"
1497+ style="stroke-width:0.262672"
1498+ inkscape:transform-center-x="-416.72543"
1499+ inkscape:transform-center-y="-156.15191" />
1500+ <path
1501+ d="m 400.4121,942.16362 c 3.2597,-1.48411 6.4827,-3.04435 9.7556,-4.50482 -3.5093,6.18331 -7.0396,12.34823 -10.5778,18.51307 -3.575,-6.17798 -7.1683,-12.34815 -10.7354,-18.53146 3.3569,1.50251 6.685,3.06275 10.0367,4.57314 0,0 0,0 1.5209,-0.0499 z"
1502+ id="path371636-7-91"
1503+ sodipodi:nodetypes="cccccc"
1504+ style="stroke-width:0.262672"
1505+ inkscape:transform-center-x="-416.72543"
1506+ inkscape:transform-center-y="-156.15191" />
1507+ <path
1508+ d="m 407.9989,1311.6005 c 3.2597,-1.4841 6.4827,-3.0444 9.7556,-4.5048 -3.5093,6.1833 -7.0396,12.3482 -10.5778,18.513 -3.575,-6.1779 -7.1683,-12.3481 -10.7354,-18.5314 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1509+ id="path371636-7-77"
1510+ sodipodi:nodetypes="cccccc"
1511+ style="stroke-width:0.262672"
1512+ inkscape:transform-center-x="-416.72543"
1513+ inkscape:transform-center-y="-156.15191" />
1514+ <path
1515+ d="m 407.9989,1381.5424 c 3.2597,-1.4841 6.4827,-3.0443 9.7556,-4.5048 -3.5093,6.1833 -7.0396,12.3482 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3482 -10.7354,-18.5315 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1516+ id="path371636-7-11"
1517+ sodipodi:nodetypes="cccccc"
1518+ style="stroke-width:0.262672"
1519+ inkscape:transform-center-x="-416.72543"
1520+ inkscape:transform-center-y="-156.15191" />
1521+ <path
1522+ d="m 407.9989,1458.6579 c 3.2597,-1.4841 6.4827,-3.0444 9.7556,-4.5049 -3.5093,6.1834 -7.0396,12.3483 -10.5778,18.5131 -3.575,-6.178 -7.1683,-12.3481 -10.7354,-18.5314 3.3569,1.5025 6.685,3.0627 10.0367,4.5731 0,0 0,0 1.5209,-0.05 z"
1523+ id="path371636-7-59"
1524+ sodipodi:nodetypes="cccccc"
1525+ style="stroke-width:0.262672"
1526+ inkscape:transform-center-x="-416.72543"
1527+ inkscape:transform-center-y="-156.15191" />
1528+ </g>
1529+</svg>
Documentation/gpu/amdgpu/display/display-manager.rst+141−0
@@ -40,3 +40,144 @@ Atomic Implementation · 39 unmodified lines
4040
4141 .. kernel-doc:: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
4242 :functions: amdgpu_dm_atomic_check amdgpu_dm_atomic_commit_tail
43+
44+Color Management Properties
45+===========================
46+
47+.. kernel-doc:: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
48+ :doc: overview
49+
50+.. kernel-doc:: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
51+ :internal:
52+
53+
54+DC Color Capabilities between DCN generations
55+---------------------------------------------
56+
57+DRM/KMS framework defines three CRTC color correction properties: degamma,
58+color transformation matrix (CTM) and gamma, and two properties for degamma and
59+gamma LUT sizes. AMD DC programs some of the color correction features
60+pre-blending but DRM/KMS has not per-plane color correction properties.
61+
62+In general, the DRM CRTC color properties are programmed to DC, as follows:
63+CRTC gamma after blending, and CRTC degamma pre-blending. Although CTM is
64+programmed after blending, it is mapped to DPP hw blocks (pre-blending). Other
65+color caps available in the hw is not currently exposed by DRM interface and
66+are bypassed.
67+
68+.. kernel-doc:: drivers/gpu/drm/amd/display/dc/dc.h
69+ :doc: color-management-caps
70+
71+.. kernel-doc:: drivers/gpu/drm/amd/display/dc/dc.h
72+ :internal:
73+
74+The color pipeline has undergone major changes between DCN hardware
75+generations. What's possible to do before and after blending depends on
76+hardware capabilities, as illustrated below by the DCN 2.0 and DCN 3.0 families
77+schemas.
78+
79+**DCN 2.0 family color caps and mapping**
80+
81+.. kernel-figure:: dcn2_cm_drm_current.svg
82+
83+**DCN 3.0 family color caps and mapping**
84+
85+.. kernel-figure:: dcn3_cm_drm_current.svg
86+
87+Blend Mode Properties
88+=====================
89+
90+Pixel blend mode is a DRM plane composition property of :c:type:`drm_plane` used to
91+describes how pixels from a foreground plane (fg) are composited with the
92+background plane (bg). Here, we present main concepts of DRM blend mode to help
93+to understand how this property is mapped to AMD DC interface. See more about
94+this DRM property and the alpha blending equations in :ref:`DRM Plane
95+Composition Properties <plane_composition_properties>`.
96+
97+Basically, a blend mode sets the alpha blending equation for plane
98+composition that fits the mode in which the alpha channel affects the state of
99+pixel color values and, therefore, the resulted pixel color. For
100+example, consider the following elements of the alpha blending equation:
101+
102+- *fg.rgb*: Each of the RGB component values from the foreground's pixel.
103+- *fg.alpha*: Alpha component value from the foreground's pixel.
104+- *bg.rgb*: Each of the RGB component values from the background.
105+- *plane_alpha*: Plane alpha value set by the **plane "alpha" property**, see
106+ more in :ref:`DRM Plane Composition Properties <plane_composition_properties>`.
107+
108+in the basic alpha blending equation::
109+
110+ out.rgb = alpha * fg.rgb + (1 - alpha) * bg.rgb
111+
112+the alpha channel value of each pixel in a plane is ignored and only the plane
113+alpha affects the resulted pixel color values.
114+
115+DRM has three blend mode to define the blend formula in the plane composition:
116+
117+* **None**: Blend formula that ignores the pixel alpha.
118+
119+* **Pre-multiplied**: Blend formula that assumes the pixel color values in a
120+ plane was already pre-multiplied by its own alpha channel before storage.
121+
122+* **Coverage**: Blend formula that assumes the pixel color values were not
123+ pre-multiplied with the alpha channel values.
124+
125+and pre-multiplied is the default pixel blend mode, that means, when no blend
126+mode property is created or defined, DRM considers the plane's pixels has
127+pre-multiplied color values. On IGT GPU tools, the kms_plane_alpha_blend test
128+provides a set of subtests to verify plane alpha and blend mode properties.
129+
130+The DRM blend mode and its elements are then mapped by AMDGPU display manager
131+(DM) to program the blending configuration of the Multiple Pipe/Plane Combined
132+(MPC), as follows:
133+
134+.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
135+ :doc: mpc-overview
136+
137+.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
138+ :functions: mpcc_blnd_cfg
139+
140+Therefore, the blending configuration for a single MPCC instance on the MPC
141+tree is defined by :c:type:`mpcc_blnd_cfg`, where
142+:c:type:`pre_multiplied_alpha` is the alpha pre-multiplied mode flag used to
143+set :c:type:`MPCC_ALPHA_MULTIPLIED_MODE`. It controls whether alpha is
144+multiplied (true/false), being only true for DRM pre-multiplied blend mode.
145+:c:type:`mpcc_alpha_blend_mode` defines the alpha blend mode regarding pixel
146+alpha and plane alpha values. It sets one of the three modes for
147+:c:type:`MPCC_ALPHA_BLND_MODE`, as described below.
148+
149+.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
150+ :functions: mpcc_alpha_blend_mode
151+
152+DM then maps the elements of `enum mpcc_alpha_blend_mode` to those in the DRM
153+blend formula, as follows:
154+
155+* *MPC pixel alpha* matches *DRM fg.alpha* as the alpha component value
156+ from the plane's pixel
157+* *MPC global alpha* matches *DRM plane_alpha* when the pixel alpha should
158+ be ignored and, therefore, pixel values are not pre-multiplied
159+* *MPC global gain* assumes *MPC global alpha* value when both *DRM
160+ fg.alpha* and *DRM plane_alpha* participate in the blend equation
161+
162+In short, *fg.alpha* is ignored by selecting
163+:c:type:`MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA`. On the other hand, (plane_alpha *
164+fg.alpha) component becomes available by selecting
165+:c:type:`MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN`. And the
166+:c:type:`MPCC_ALPHA_MULTIPLIED_MODE` defines if the pixel color values are
167+pre-multiplied by alpha or not.
168+
169+Blend configuration flow
170+------------------------
171+
172+The alpha blending equation is configured from DRM to DC interface by the
173+following path:
174+
175+1. When updating a :c:type:`drm_plane_state <drm_plane_state>`, DM calls
176+ :c:type:`fill_blending_from_plane_state()` that maps
177+ :c:type:`drm_plane_state <drm_plane_state>` attributes to
178+ :c:type:`dc_plane_info <dc_plane_info>` struct to be handled in the
179+ OS-agnostic component (DC).
180+
181+2. On DC interface, :c:type:`struct mpcc_blnd_cfg <mpcc_blnd_cfg>` programs the
182+ MPCC blend configuration considering the :c:type:`dc_plane_info
183+ <dc_plane_info>` input from DPP.
Documentation/gpu/amdgpu/display/index.rst+1−0
@@ -28,4 +28,5 @@ table of content: · 27 unmodified lines
2828 display-manager.rst
2929 dc-debug.rst
3030 dcn-overview.rst
31+ mpo-overview.rst
3132 dc-glossary.rst
Documentation/gpu/amdgpu/display/mpo-cursor.svg+435−0
@@ -0,0 +1,435 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="160.5318mm"
13+ height="65.443306mm"
14+ viewBox="0 0 160.5318 65.443308"
15+ version="1.1"
16+ id="svg843"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="mpo-cursor.svg">
19+ <defs
20+ id="defs837">
21+ <marker
22+ inkscape:stockid="Arrow1Send"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="Arrow1Send"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path1568"
31+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
32+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
33+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="Arrow1Mend"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="Arrow1Mend"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ id="path1562"
46+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
47+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
48+ transform="matrix(-0.4,0,0,-0.4,-4,0)"
49+ inkscape:connector-curvature="0" />
50+ </marker>
51+ <marker
52+ inkscape:stockid="Arrow2Mend"
53+ orient="auto"
54+ refY="0"
55+ refX="0"
56+ id="marker1837"
57+ style="overflow:visible"
58+ inkscape:isstock="true">
59+ <path
60+ id="path1835"
61+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
62+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
63+ transform="scale(-0.6)"
64+ inkscape:connector-curvature="0" />
65+ </marker>
66+ <marker
67+ inkscape:stockid="Arrow2Mend"
68+ orient="auto"
69+ refY="0"
70+ refX="0"
71+ id="Arrow2Mend"
72+ style="overflow:visible"
73+ inkscape:isstock="true">
74+ <path
75+ id="path1580"
76+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
77+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
78+ transform="scale(-0.6)"
79+ inkscape:connector-curvature="0" />
80+ </marker>
81+ <marker
82+ inkscape:stockid="Arrow1Send"
83+ orient="auto"
84+ refY="0"
85+ refX="0"
86+ id="Arrow1Send-7"
87+ style="overflow:visible"
88+ inkscape:isstock="true">
89+ <path
90+ inkscape:connector-curvature="0"
91+ id="path1568-5"
92+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
93+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
94+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
95+ </marker>
96+ <marker
97+ inkscape:stockid="Arrow1Send"
98+ orient="auto"
99+ refY="0"
100+ refX="0"
101+ id="Arrow1Send-7-2"
102+ style="overflow:visible"
103+ inkscape:isstock="true">
104+ <path
105+ inkscape:connector-curvature="0"
106+ id="path1568-5-2"
107+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
108+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
109+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
110+ </marker>
111+ <marker
112+ inkscape:stockid="Arrow1Send"
113+ orient="auto"
114+ refY="0"
115+ refX="0"
116+ id="Arrow1Send-9"
117+ style="overflow:visible"
118+ inkscape:isstock="true">
119+ <path
120+ inkscape:connector-curvature="0"
121+ id="path1568-7"
122+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
123+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
124+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
125+ </marker>
126+ <marker
127+ inkscape:stockid="Arrow1Send"
128+ orient="auto"
129+ refY="0"
130+ refX="0"
131+ id="Arrow1Send-9-6"
132+ style="overflow:visible"
133+ inkscape:isstock="true">
134+ <path
135+ inkscape:connector-curvature="0"
136+ id="path1568-7-1"
137+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
138+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
139+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
140+ </marker>
141+ <marker
142+ inkscape:stockid="Arrow1Send"
143+ orient="auto"
144+ refY="0"
145+ refX="0"
146+ id="Arrow1Send-9-6-9"
147+ style="overflow:visible"
148+ inkscape:isstock="true">
149+ <path
150+ inkscape:connector-curvature="0"
151+ id="path1568-7-1-3"
152+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
153+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
154+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
155+ </marker>
156+ </defs>
157+ <sodipodi:namedview
158+ id="base"
159+ pagecolor="#ffffff"
160+ bordercolor="#666666"
161+ borderopacity="1.0"
162+ inkscape:pageopacity="0.0"
163+ inkscape:pageshadow="2"
164+ inkscape:zoom="0.35"
165+ inkscape:cx="895.68984"
166+ inkscape:cy="-284.87808"
167+ inkscape:document-units="mm"
168+ inkscape:current-layer="g1433-6"
169+ showgrid="false"
170+ inkscape:window-width="2560"
171+ inkscape:window-height="1376"
172+ inkscape:window-x="0"
173+ inkscape:window-y="27"
174+ inkscape:window-maximized="1"
175+ fit-margin-top="0"
176+ fit-margin-left="0"
177+ fit-margin-right="0"
178+ fit-margin-bottom="0" />
179+ <metadata
180+ id="metadata840">
181+ <rdf:RDF>
182+ <cc:Work
183+ rdf:about="">
184+ <dc:format>image/svg+xml</dc:format>
185+ <dc:type
186+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
187+ <dc:title></dc:title>
188+ </cc:Work>
189+ </rdf:RDF>
190+ </metadata>
191+ <g
192+ inkscape:label="Layer 1"
193+ inkscape:groupmode="layer"
194+ id="layer1"
195+ transform="translate(70.035531,-11.72001)">
196+ <g
197+ id="g1438"
198+ transform="matrix(0.33108827,0,0,0.33108827,-46.847588,7.8396545)">
199+ <rect
200+ y="51.228218"
201+ x="-69.09626"
202+ height="34.773811"
203+ width="66.523811"
204+ id="rect1388"
205+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
206+ <text
207+ id="text1392"
208+ y="73.238098"
209+ x="-59.718166"
210+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
211+ xml:space="preserve"><tspan
212+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
213+ y="73.238098"
214+ x="-59.718166"
215+ id="tspan1390"
216+ sodipodi:role="line">Cursor</tspan></text>
217+ </g>
218+ <g
219+ id="g1433"
220+ transform="matrix(0.33108827,0,0,0.33108827,-49.701591,6.5552955)">
221+ <rect
222+ y="116.32738"
223+ x="-60.476192"
224+ height="34.773811"
225+ width="66.523811"
226+ id="rect1388-3"
227+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
228+ <text
229+ id="text1392-6"
230+ y="138.44888"
231+ x="-53.932037"
232+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
233+ xml:space="preserve"><tspan
234+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
235+ y="138.44888"
236+ x="-53.932037"
237+ id="tspan1390-7"
238+ sodipodi:role="line">Plane 1</tspan></text>
239+ </g>
240+ <g
241+ id="g1428"
242+ transform="matrix(0.33108827,0,0,0.33108827,-46.847588,7.8396518)">
243+ <rect
244+ y="173.66814"
245+ x="-69.09626"
246+ height="34.773811"
247+ width="66.523811"
248+ id="rect1388-5"
249+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
250+ <text
251+ id="text1392-3"
252+ y="195.78964"
253+ x="-62.437382"
254+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
255+ xml:space="preserve"><tspan
256+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
257+ y="195.78964"
258+ x="-62.437382"
259+ id="tspan1390-5"
260+ sodipodi:role="line">Plane 2</tspan></text>
261+ </g>
262+ <g
263+ id="g1433-6"
264+ transform="translate(116.41667,-9.0714256)">
265+ <g
266+ id="g1467"
267+ transform="matrix(0.33108827,0,0,0.33108827,-132.72925,15.626721)">
268+ <rect
269+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
270+ id="rect1388-3-2"
271+ width="66.523811"
272+ height="34.773811"
273+ x="-60.476192"
274+ y="116.32738" />
275+ <text
276+ xml:space="preserve"
277+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
278+ x="-45.380619"
279+ y="138.33725"
280+ id="text1392-6-9"><tspan
281+ sodipodi:role="line"
282+ id="tspan1390-7-1"
283+ x="-45.380619"
284+ y="138.33725"
285+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332">CRTC</tspan></text>
286+ </g>
287+ <g
288+ id="g1438-2"
289+ transform="matrix(0.33108827,0,0,0.33108827,-92.282164,27.16881)">
290+ <rect
291+ y="51.228218"
292+ x="-69.09626"
293+ height="34.773811"
294+ width="66.523811"
295+ id="rect1388-7"
296+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
297+ <text
298+ id="text1392-0"
299+ y="73.238098"
300+ x="-59.718166"
301+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
302+ xml:space="preserve"><tspan
303+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
304+ y="73.238098"
305+ x="-59.718166"
306+ id="tspan1390-9"
307+ sodipodi:role="line">Cursor</tspan></text>
308+ </g>
309+ <g
310+ id="g1433-3"
311+ transform="matrix(0.33108827,0,0,0.33108827,-61.59731,5.6152398)">
312+ <rect
313+ y="116.32738"
314+ x="-60.476192"
315+ height="34.773811"
316+ width="66.523811"
317+ id="rect1388-3-6"
318+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
319+ <text
320+ id="text1392-6-0"
321+ y="138.44888"
322+ x="-53.932037"
323+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
324+ xml:space="preserve"><tspan
325+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
326+ y="138.44888"
327+ x="-53.932037"
328+ id="tspan1390-7-6"
329+ sodipodi:role="line">Plane 1</tspan></text>
330+ </g>
331+ <g
332+ id="g1428-2"
333+ transform="matrix(0.33108827,0,0,0.33108827,-58.743296,6.7994816)">
334+ <rect
335+ y="173.66814"
336+ x="-69.09626"
337+ height="34.773811"
338+ width="66.523811"
339+ id="rect1388-5-6"
340+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
341+ <text
342+ id="text1392-3-1"
343+ y="195.78964"
344+ x="-62.437382"
345+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
346+ xml:space="preserve"><tspan
347+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332"
348+ y="195.78964"
349+ x="-62.437382"
350+ id="tspan1390-5-8"
351+ sodipodi:role="line">Plane 2</tspan></text>
352+ </g>
353+ <g
354+ id="g1467-7"
355+ transform="matrix(0.33108827,0,0,0.33108827,-28.233674,5.6152398)">
356+ <rect
357+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.87854159;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
358+ id="rect1388-3-2-9"
359+ width="66.523811"
360+ height="34.773811"
361+ x="-60.476192"
362+ y="116.32738" />
363+ <text
364+ xml:space="preserve"
365+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
366+ x="-45.380619"
367+ y="138.33725"
368+ id="text1392-6-9-2"><tspan
369+ sodipodi:role="line"
370+ id="tspan1390-7-1-0"
371+ x="-45.380619"
372+ y="138.33725"
373+ style="font-weight:bold;font-size:12.69999981px;stroke-width:0.26458332">CRTC</tspan></text>
374+ </g>
375+ <text
376+ xml:space="preserve"
377+ style="font-style:normal;font-weight:normal;font-size:1.05120528px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.08760043"
378+ x="-164.26541"
379+ y="24.302296"
380+ id="text1531"><tspan
381+ sodipodi:role="line"
382+ id="tspan1529"
383+ x="-164.26541"
384+ y="24.302296"
385+ style="font-weight:bold;font-size:4.6720233px;stroke-width:0.08760043">DRM</tspan></text>
386+ <text
387+ xml:space="preserve"
388+ style="font-style:normal;font-weight:normal;font-size:1.05120528px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.08760043"
389+ x="-89.233742"
390+ y="24.341078"
391+ id="text1531-2"><tspan
392+ sodipodi:role="line"
393+ id="tspan1529-3"
394+ x="-89.233742"
395+ y="24.341078"
396+ style="font-weight:bold;font-size:4.6720233px;stroke-width:0.08760043">AMD Hardware</tspan></text>
397+ <path
398+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send)"
399+ d="m -164.26541,39.407343 h 20.27325 v 11.262913"
400+ id="path1551"
401+ inkscape:connector-curvature="0"
402+ sodipodi:nodetypes="ccc" />
403+ <path
404+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-7)"
405+ d="m -164.11597,80.385815 h 20.27325 v -11.26291"
406+ id="path1551-9"
407+ inkscape:connector-curvature="0"
408+ sodipodi:nodetypes="ccc" />
409+ <path
410+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-7-2)"
411+ d="m -59.24211,70.452123 h 20.273243 V 59.18921"
412+ id="path1551-9-8"
413+ inkscape:connector-curvature="0"
414+ sodipodi:nodetypes="ccc" />
415+ <path
416+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-9)"
417+ d="m -163.61178,59.821549 h 9.26062"
418+ id="path1551-3"
419+ inkscape:connector-curvature="0"
420+ sodipodi:nodetypes="cc" />
421+ <path
422+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-9-6)"
423+ d="m -93.426241,50.16968 h 9.260617"
424+ id="path1551-3-2"
425+ inkscape:connector-curvature="0"
426+ sodipodi:nodetypes="cc" />
427+ <path
428+ style="fill:none;stroke:#000000;stroke-width:1.53318286;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-9-6-9)"
429+ d="m -59.637503,50.169684 h 9.260618"
430+ id="path1551-3-2-1"
431+ inkscape:connector-curvature="0"
432+ sodipodi:nodetypes="cc" />
433+ </g>
434+ </g>
435+</svg>
Documentation/gpu/amdgpu/display/mpo-overview.rst+242−0
@@ -0,0 +1,242 @@
1+========================
2+Multiplane Overlay (MPO)
3+========================
4+
5+.. note:: You will get more from this page if you have already read the
6+ 'Documentation/gpu/amdgpu/display/dcn-overview.rst'.
7+
8+
9+Multiplane Overlay (MPO) allows for multiple framebuffers to be composited via
10+fixed-function hardware in the display controller rather than using graphics or
11+compute shaders for composition. This can yield some power savings if it means
12+the graphics/compute pipelines can be put into low-power states. In summary,
13+MPO can bring the following benefits:
14+
15+* Decreased GPU and CPU workload - no composition shaders needed, no extra
16+ buffer copy needed, GPU can remain idle.
17+* Plane independent page flips - No need to be tied to global compositor
18+ page-flip present rate, reduced latency, independent timing.
19+
20+.. note:: Keep in mind that MPO is all about power-saving; if you want to learn
21+ more about power-save in the display context, check the link:
22+ `Power <https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/power.rst>`__.
23+
24+Multiplane Overlay is only available using the DRM atomic model. The atomic
25+model only uses a single userspace IOCTL for configuring the display hardware
26+(modesetting, page-flipping, etc) - drmModeAtomicCommit. To query hardware
27+resources and limitations userspace also calls into drmModeGetResources which
28+reports back the number of planes, CRTCs, and connectors. There are three types
29+of DRM planes that the driver can register and work with:
30+
31+* ``DRM_PLANE_TYPE_PRIMARY``: Primary planes represent a "main" plane for a
32+ CRTC, primary planes are the planes operated upon by CRTC modesetting and
33+ flipping operations.
34+* ``DRM_PLANE_TYPE_CURSOR``: Cursor planes represent a "cursor" plane for a
35+ CRTC. Cursor planes are the planes operated upon by the cursor IOCTLs
36+* ``DRM_PLANE_TYPE_OVERLAY``: Overlay planes represent all non-primary,
37+ non-cursor planes. Some drivers refer to these types of planes as "sprites"
38+ internally.
39+
40+To illustrate how it works, let's take a look at a device that exposes the
41+following planes to userspace:
42+
43+* 4 Primary planes (1 per CRTC).
44+* 4 Cursor planes (1 per CRTC).
45+* 1 Overlay plane (shared among CRTCs).
46+
47+.. note:: Keep in mind that different ASICs might expose other numbers of
48+ planes.
49+
50+For this hardware example, we have 4 pipes (if you don't know what AMD pipe
51+means, look at 'Documentation/gpu/amdgpu/display/dcn-overview.rst', section
52+"AMD Hardware Pipeline"). Typically most AMD devices operate in a pipe-split
53+configuration for optimal single display output (e.g., 2 pipes per plane).
54+
55+A typical MPO configuration from userspace - 1 primary + 1 overlay on a single
56+display - will see 4 pipes in use, 2 per plane.
57+
58+At least 1 pipe must be used per plane (primary and overlay), so for this
59+hypothetical hardware that we are using as an example, we have an absolute
60+limit of 4 planes across all CRTCs. Atomic commits will be rejected for display
61+configurations using more than 4 planes. Again, it is important to stress that
62+every DCN has different restrictions; here, we are just trying to provide the
63+concept idea.
64+
65+Plane Restrictions
66+==================
67+
68+AMDGPU imposes restrictions on the use of DRM planes in the driver.
69+
70+Atomic commits will be rejected for commits which do not follow these
71+restrictions:
72+
73+* Overlay planes must be in ARGB8888 or XRGB8888 format
74+* Planes cannot be placed outside of the CRTC destination rectangle
75+* Planes cannot be downscaled more than 1/4x of their original size
76+* Planes cannot be upscaled more than 16x of their original size
77+
78+Not every property is available on every plane:
79+
80+* Only primary planes have color-space and non-RGB format support
81+* Only overlay planes have alpha blending support
82+
83+Cursor Restrictions
84+===================
85+
86+Before we start to describe some restrictions around cursor and MPO, see the
87+below image:
88+
89+.. kernel-figure:: mpo-cursor.svg
90+
91+The image on the left side represents how DRM expects the cursor and planes to
92+be blended. However, AMD hardware handles cursors differently, as you can see
93+on the right side; basically, our cursor cannot be drawn outside its associated
94+plane as it is being treated as part of the plane. Another consequence of that
95+is that cursors inherit the color and scale from the plane.
96+
97+As a result of the above behavior, do not use legacy API to set up the cursor
98+plane when working with MPO; otherwise, you might encounter unexpected
99+behavior.
100+
101+In short, AMD HW has no dedicated cursor planes. A cursor is attached to
102+another plane and therefore inherits any scaling or color processing from its
103+parent plane.
104+
105+Use Cases
106+=========
107+
108+Picture-in-Picture (PIP) playback - Underlay strategy
109+-----------------------------------------------------
110+
111+Video playback should be done using the "primary plane as underlay" MPO
112+strategy. This is a 2 planes configuration:
113+
114+* 1 YUV DRM Primary Plane (e.g. NV12 Video)
115+* 1 RGBA DRM Overlay Plane (e.g. ARGB8888 desktop). The compositor should
116+ prepare the framebuffers for the planes as follows:
117+ - The overlay plane contains general desktop UI, video player controls, and video subtitles
118+ - Primary plane contains one or more videos
119+
120+.. note:: Keep in mind that we could extend this configuration to more planes,
121+ but that is currently not supported by our driver yet (maybe if we have a
122+ userspace request in the future, we can change that).
123+
124+See below a single-video example:
125+
126+.. kernel-figure:: single-display-mpo.svg
127+
128+.. note:: We could extend this behavior to more planes, but that is currently
129+ not supported by our driver.
130+
131+The video buffer should be used directly for the primary plane. The video can
132+be scaled and positioned for the desktop using the properties: CRTC_X, CRTC_Y,
133+CRTC_W, and CRTC_H. The primary plane should also have the color encoding and
134+color range properties set based on the source content:
135+
136+* ``COLOR_RANGE``, ``COLOR_ENCODING``
137+
138+The overlay plane should be the native size of the CRTC. The compositor must
139+draw a transparent cutout for where the video should be placed on the desktop
140+(i.e., set the alpha to zero). The primary plane video will be visible through
141+the underlay. The overlay plane's buffer may remain static while the primary
142+plane's framebuffer is used for standard double-buffered playback.
143+
144+The compositor should create a YUV buffer matching the native size of the CRTC.
145+Each video buffer should be composited onto this YUV buffer for direct YUV
146+scanout. The primary plane should have the color encoding and color range
147+properties set based on the source content: ``COLOR_RANGE``,
148+``COLOR_ENCODING``. However, be mindful that the source color space and
149+encoding match for each video since it affect the entire plane.
150+
151+The overlay plane should be the native size of the CRTC. The compositor must
152+draw a transparent cutout for where each video should be placed on the desktop
153+(i.e., set the alpha to zero). The primary plane videos will be visible through
154+the underlay. The overlay plane's buffer may remain static while compositing
155+operations for video playback will be done on the video buffer.
156+
157+This kernel interface is validated using IGT GPU Tools. The following tests can
158+be run to validate positioning, blending, scaling under a variety of sequences
159+and interactions with operations such as DPMS and S3:
160+
161+- ``kms_plane@plane-panning-bottom-right-pipe-*-planes``
162+- ``kms_plane@plane-panning-bottom-right-suspend-pipe-*-``
163+- ``kms_plane@plane-panning-top-left-pipe-*-``
164+- ``kms_plane@plane-position-covered-pipe-*-``
165+- ``kms_plane@plane-position-hole-dpms-pipe-*-``
166+- ``kms_plane@plane-position-hole-pipe-*-``
167+- ``kms_plane_multiple@atomic-pipe-*-tiling-``
168+- ``kms_plane_scaling@pipe-*-plane-scaling``
169+- ``kms_plane_alpha_blend@pipe-*-alpha-basic``
170+- ``kms_plane_alpha_blend@pipe-*-alpha-transparant-fb``
171+- ``kms_plane_alpha_blend@pipe-*-alpha-opaque-fb``
172+- ``kms_plane_alpha_blend@pipe-*-constant-alpha-min``
173+- ``kms_plane_alpha_blend@pipe-*-constant-alpha-mid``
174+- ``kms_plane_alpha_blend@pipe-*-constant-alpha-max``
175+
176+Multiple Display MPO
177+--------------------
178+
179+AMDGPU supports display MPO when using multiple displays; however, this feature
180+behavior heavily relies on the compositor implementation. Keep in mind that
181+usespace can define different policies. For example, some OSes can use MPO to
182+protect the plane that handles the video playback; notice that we don't have
183+many limitations for a single display. Nonetheless, this manipulation can have
184+many more restrictions for a multi-display scenario. The below example shows a
185+video playback in the middle of two displays, and it is up to the compositor to
186+define a policy on how to handle it:
187+
188+.. kernel-figure:: multi-display-hdcp-mpo.svg
189+
190+Let's discuss some of the hardware limitations we have when dealing with
191+multi-display with MPO.
192+
193+Limitations
194+~~~~~~~~~~~
195+
196+For simplicity's sake, for discussing the hardware limitation, this
197+documentation supposes an example where we have two displays and video playback
198+that will be moved around different displays.
199+
200+* **Hardware limitations**
201+
202+From the DCN overview page, each display requires at least one pipe and each
203+MPO plane needs another pipe. As a result, when the video is in the middle of
204+the two displays, we need to use 2 pipes. See the example below where we avoid
205+pipe split:
206+
207+- 1 display (1 pipe) + MPO (1 pipe), we will use two pipes
208+- 2 displays (2 pipes) + MPO (1-2 pipes); we will use 4 pipes. MPO in the
209+ middle of both displays needs 2 pipes.
210+- 3 Displays (3 pipes) + MPO (1-2 pipes), we need 5 pipes.
211+
212+If we use MPO with multiple displays, the userspace has to decide to enable
213+multiple MPO by the price of limiting the number of external displays supported
214+or disable it in favor of multiple displays; it is a policy decision. For
215+example:
216+
217+* When ASIC has 3 pipes, AMD hardware can NOT support 2 displays with MPO
218+* When ASIC has 4 pipes, AMD hardware can NOT support 3 displays with MPO
219+
220+Let's briefly explore how userspace can handle these two display configurations
221+on an ASIC that only supports three pipes. We can have:
222+
223+.. kernel-figure:: multi-display-hdcp-mpo-less-pipe-ex.svg
224+
225+- Total pipes are 3
226+- User lights up 2 displays (2 out of 3 pipes are used)
227+- User launches video (1 pipe used for MPO)
228+- Now, if the user moves the video in the middle of 2 displays, one part of the
229+ video won't be MPO since we have used 3/3 pipes.
230+
231+* **Scaling limitation**
232+
233+MPO cannot handle scaling less than 0.25 and more than x16. For example:
234+
235+If 4k video (3840x2160) is playing in windowed mode, the physical size of the
236+window cannot be smaller than (960x540).
237+
238+.. note:: These scaling limitations might vary from ASIC to ASIC.
239+
240+* **Size Limitation**
241+
242+The minimum MPO size is 12px.
Documentation/gpu/amdgpu/display/multi-display-hdcp-mpo-less-pipe-ex.svg+220−0
@@ -0,0 +1,220 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="103.08798mm"
13+ height="30.335283mm"
14+ viewBox="0 0 103.08798 30.335284"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="multi-display-hdcp-mpo-less-pipe-ex.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="TriangleOutL"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="TriangleOutL"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path1133"
31+ d="M 5.77,0 -2.88,5 V -5 Z"
32+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
33+ transform="scale(0.8)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="TriangleOutL"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="TriangleOutL-6"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ inkscape:connector-curvature="0"
46+ id="path1133-0"
47+ d="M 5.77,0 -2.88,5 V -5 Z"
48+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
49+ transform="scale(0.8)" />
50+ </marker>
51+ </defs>
52+ <sodipodi:namedview
53+ id="base"
54+ pagecolor="#ffffff"
55+ bordercolor="#666666"
56+ borderopacity="1.0"
57+ inkscape:pageopacity="0.0"
58+ inkscape:pageshadow="2"
59+ inkscape:zoom="1.979899"
60+ inkscape:cx="205.69673"
61+ inkscape:cy="33.960031"
62+ inkscape:document-units="mm"
63+ inkscape:current-layer="layer1"
64+ showgrid="false"
65+ inkscape:window-width="1288"
66+ inkscape:window-height="1376"
67+ inkscape:window-x="1272"
68+ inkscape:window-y="27"
69+ inkscape:window-maximized="0"
70+ fit-margin-top="0"
71+ fit-margin-left="0"
72+ fit-margin-right="0"
73+ fit-margin-bottom="0" />
74+ <metadata
75+ id="metadata5">
76+ <rdf:RDF>
77+ <cc:Work
78+ rdf:about="">
79+ <dc:format>image/svg+xml</dc:format>
80+ <dc:type
81+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
82+ <dc:title></dc:title>
83+ </cc:Work>
84+ </rdf:RDF>
85+ </metadata>
86+ <g
87+ inkscape:label="Layer 1"
88+ inkscape:groupmode="layer"
89+ id="layer1"
90+ transform="translate(112.75816,51.721433)">
91+ <rect
92+ style="fill:#ffe680;fill-opacity:1;stroke:#000000;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
93+ id="rect836"
94+ width="48.988979"
95+ height="29.48851"
96+ x="-112.44358"
97+ y="-51.189243"
98+ ry="0" />
99+ <rect
100+ style="fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.38327959;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
101+ id="rect834"
102+ width="14.422765"
103+ height="15.872559"
104+ x="-78.227928"
105+ y="-44.469936" />
106+ <text
107+ xml:space="preserve"
108+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
109+ x="-71.189278"
110+ y="-48.114422"
111+ id="text844"><tspan
112+ sodipodi:role="line"
113+ x="-71.189278"
114+ y="-48.114422"
115+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
116+ id="tspan846">Protected</tspan><tspan
117+ sodipodi:role="line"
118+ x="-71.189278"
119+ y="-45.584015"
120+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
121+ id="tspan2288">MPO plane</tspan></text>
122+ <rect
123+ style="fill:#ffe680;fill-opacity:1;stroke:#000000;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
124+ id="rect836-3"
125+ width="48.988979"
126+ height="29.48851"
127+ x="-58.973743"
128+ y="-51.406849"
129+ ry="0" />
130+ <rect
131+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2500253;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
132+ id="rect834-6"
133+ width="6.1374092"
134+ height="15.872559"
135+ x="-58.632965"
136+ y="-44.469936" />
137+ <text
138+ xml:space="preserve"
139+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
140+ x="-107.96788"
141+ y="-47.033775"
142+ id="text844-7"><tspan
143+ sodipodi:role="line"
144+ x="-107.96788"
145+ y="-47.033775"
146+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
147+ id="tspan846-3">#1</tspan></text>
148+ <text
149+ xml:space="preserve"
150+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
151+ x="-15.20074"
152+ y="-46.715996"
153+ id="text844-7-2"><tspan
154+ sodipodi:role="line"
155+ x="-15.20074"
156+ y="-46.715996"
157+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
158+ id="tspan846-3-9">#2</tspan></text>
159+ <text
160+ xml:space="preserve"
161+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
162+ x="-88.926605"
163+ y="-23.173674"
164+ id="text844-1"><tspan
165+ sodipodi:role="line"
166+ x="-88.926605"
167+ y="-23.173674"
168+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
169+ id="tspan846-7">Desktop</tspan></text>
170+ <text
171+ xml:space="preserve"
172+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
173+ x="-33.770744"
174+ y="-23.819901"
175+ id="text844-1-0"><tspan
176+ sodipodi:role="line"
177+ x="-33.770744"
178+ y="-23.819901"
179+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
180+ id="tspan846-7-9">Desktop</tspan></text>
181+ <text
182+ xml:space="preserve"
183+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.06901112"
184+ x="-75.17498"
185+ y="-41.219398"
186+ id="text844-7-2-3"><tspan
187+ sodipodi:role="line"
188+ x="-75.17498"
189+ y="-41.219398"
190+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;fill:#ffffff;stroke-width:0.06901112"
191+ id="tspan846-3-9-6">#3</tspan></text>
192+ <text
193+ xml:space="preserve"
194+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
195+ x="-47.142235"
196+ y="-48.056866"
197+ id="text844-0"><tspan
198+ sodipodi:role="line"
199+ x="-47.142235"
200+ y="-48.056866"
201+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
202+ id="tspan2288-2">Software</tspan><tspan
203+ sodipodi:role="line"
204+ x="-47.142235"
205+ y="-45.526459"
206+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
207+ id="tspan2313">Composited Video</tspan></text>
208+ <text
209+ xml:space="preserve"
210+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
211+ x="-36.23288"
212+ y="-34.592064"
213+ id="text844-1-6"><tspan
214+ sodipodi:role="line"
215+ x="-36.23288"
216+ y="-34.592064"
217+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
218+ id="tspan846-7-1">Video will not be displayed</tspan></text>
219+ </g>
220+</svg>
Documentation/gpu/amdgpu/display/multi-display-hdcp-mpo.svg+171−0
@@ -0,0 +1,171 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="103.08798mm"
13+ height="30.335283mm"
14+ viewBox="0 0 103.08798 30.335284"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="multi-display-hdcp-mpo.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="TriangleOutL"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="TriangleOutL"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path1133"
31+ d="M 5.77,0 -2.88,5 V -5 Z"
32+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
33+ transform="scale(0.8)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="TriangleOutL"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="TriangleOutL-6"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ inkscape:connector-curvature="0"
46+ id="path1133-0"
47+ d="M 5.77,0 -2.88,5 V -5 Z"
48+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
49+ transform="scale(0.8)" />
50+ </marker>
51+ </defs>
52+ <sodipodi:namedview
53+ id="base"
54+ pagecolor="#ffffff"
55+ bordercolor="#666666"
56+ borderopacity="1.0"
57+ inkscape:pageopacity="0.0"
58+ inkscape:pageshadow="2"
59+ inkscape:zoom="1.979899"
60+ inkscape:cx="196.85789"
61+ inkscape:cy="33.960027"
62+ inkscape:document-units="mm"
63+ inkscape:current-layer="layer1"
64+ showgrid="false"
65+ inkscape:window-width="1288"
66+ inkscape:window-height="1376"
67+ inkscape:window-x="1272"
68+ inkscape:window-y="27"
69+ inkscape:window-maximized="0"
70+ fit-margin-top="0"
71+ fit-margin-left="0"
72+ fit-margin-right="0"
73+ fit-margin-bottom="0" />
74+ <metadata
75+ id="metadata5">
76+ <rdf:RDF>
77+ <cc:Work
78+ rdf:about="">
79+ <dc:format>image/svg+xml</dc:format>
80+ <dc:type
81+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
82+ <dc:title></dc:title>
83+ </cc:Work>
84+ </rdf:RDF>
85+ </metadata>
86+ <g
87+ inkscape:label="Layer 1"
88+ inkscape:groupmode="layer"
89+ id="layer1"
90+ transform="translate(112.75816,51.721433)">
91+ <rect
92+ style="fill:#ffe680;fill-opacity:1;stroke:#000000;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
93+ id="rect836"
94+ width="48.988979"
95+ height="29.48851"
96+ x="-112.44358"
97+ y="-51.189243"
98+ ry="0" />
99+ <rect
100+ style="fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.38327959;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
101+ id="rect834"
102+ width="14.422765"
103+ height="15.872559"
104+ x="-78.227928"
105+ y="-44.469936" />
106+ <text
107+ xml:space="preserve"
108+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
109+ x="-71.189278"
110+ y="-48.114422"
111+ id="text844"><tspan
112+ sodipodi:role="line"
113+ x="-71.189278"
114+ y="-48.114422"
115+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
116+ id="tspan846">Protected</tspan><tspan
117+ sodipodi:role="line"
118+ x="-71.189278"
119+ y="-45.584015"
120+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
121+ id="tspan2288">MPO plane</tspan></text>
122+ <rect
123+ style="fill:#ffe680;fill-opacity:1;stroke:#000000;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
124+ id="rect836-3"
125+ width="48.988979"
126+ height="29.48851"
127+ x="-58.973743"
128+ y="-51.406849"
129+ ry="0" />
130+ <rect
131+ style="fill:#008000;fill-opacity:1;stroke:none;stroke-width:0.2500253;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
132+ id="rect834-6"
133+ width="6.1374092"
134+ height="15.872559"
135+ x="-58.632965"
136+ y="-44.469936" />
137+ <text
138+ xml:space="preserve"
139+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
140+ x="-88.926605"
141+ y="-23.173674"
142+ id="text844-1"><tspan
143+ sodipodi:role="line"
144+ x="-88.926605"
145+ y="-23.173674"
146+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
147+ id="tspan846-7">Desktop</tspan></text>
148+ <text
149+ xml:space="preserve"
150+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
151+ x="-33.770744"
152+ y="-23.819901"
153+ id="text844-1-0"><tspan
154+ sodipodi:role="line"
155+ x="-33.770744"
156+ y="-23.819901"
157+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
158+ id="tspan846-7-9">Desktop</tspan></text>
159+ <text
160+ xml:space="preserve"
161+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.06901112"
162+ x="-70.364128"
163+ y="-35.740372"
164+ id="text844-7-2-3"><tspan
165+ sodipodi:role="line"
166+ x="-70.364128"
167+ y="-35.740372"
168+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.52777767px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;fill:#ffffff;stroke-width:0.06901112"
169+ id="tspan846-3-9-6">Video</tspan></text>
170+ </g>
171+</svg>
Documentation/gpu/amdgpu/display/pipeline_4k_no_split.svg+958−0
@@ -0,0 +1,958 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="1055.4928"
13+ height="404.60379"
14+ viewBox="0 0 279.26579 107.05142"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="pipeline_4k_no_split.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="Arrow2Mend"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="marker8858"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path8616"
31+ style="fill:#aa00d4;fill-opacity:1;fill-rule:evenodd;stroke:#aa00d4;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
32+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
33+ transform="scale(-0.6)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="Arrow2Send"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="Arrow2Send"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ id="path8622"
46+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
47+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
48+ transform="matrix(-0.3,0,0,-0.3,0.69,0)"
49+ inkscape:connector-curvature="0" />
50+ </marker>
51+ <marker
52+ inkscape:stockid="Arrow1Lend"
53+ orient="auto"
54+ refY="0"
55+ refX="0"
56+ id="Arrow1Lend"
57+ style="overflow:visible"
58+ inkscape:isstock="true">
59+ <path
60+ id="path8592"
61+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
62+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1"
63+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
64+ inkscape:connector-curvature="0" />
65+ </marker>
66+ <marker
67+ inkscape:stockid="Arrow2Lend"
68+ orient="auto"
69+ refY="0"
70+ refX="0"
71+ id="Arrow2Lend"
72+ style="overflow:visible"
73+ inkscape:isstock="true">
74+ <path
75+ id="path8610"
76+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
77+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
78+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
79+ inkscape:connector-curvature="0" />
80+ </marker>
81+ <marker
82+ inkscape:stockid="Arrow2Mend"
83+ orient="auto"
84+ refY="0"
85+ refX="0"
86+ id="Arrow2Mend"
87+ style="overflow:visible"
88+ inkscape:isstock="true">
89+ <path
90+ id="path1200"
91+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
92+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
93+ transform="scale(-0.6)"
94+ inkscape:connector-curvature="0" />
95+ </marker>
96+ <marker
97+ inkscape:stockid="Arrow2Mend"
98+ orient="auto"
99+ refY="0"
100+ refX="0"
101+ id="Arrow2Mend-8"
102+ style="overflow:visible"
103+ inkscape:isstock="true">
104+ <path
105+ inkscape:connector-curvature="0"
106+ id="path1200-9"
107+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
108+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
109+ transform="scale(-0.6)" />
110+ </marker>
111+ <marker
112+ inkscape:stockid="Arrow2Mend"
113+ orient="auto"
114+ refY="0"
115+ refX="0"
116+ id="Arrow2Mend-8-3"
117+ style="overflow:visible"
118+ inkscape:isstock="true">
119+ <path
120+ inkscape:connector-curvature="0"
121+ id="path1200-9-6"
122+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
123+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
124+ transform="scale(-0.6)" />
125+ </marker>
126+ <marker
127+ inkscape:stockid="Arrow2Mend"
128+ orient="auto"
129+ refY="0"
130+ refX="0"
131+ id="Arrow2Mend-8-3-2"
132+ style="overflow:visible"
133+ inkscape:isstock="true">
134+ <path
135+ inkscape:connector-curvature="0"
136+ id="path1200-9-6-9"
137+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
138+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
139+ transform="scale(-0.6)" />
140+ </marker>
141+ <marker
142+ inkscape:stockid="Arrow2Mend"
143+ orient="auto"
144+ refY="0"
145+ refX="0"
146+ id="Arrow2Mend-8-3-2-1"
147+ style="overflow:visible"
148+ inkscape:isstock="true">
149+ <path
150+ inkscape:connector-curvature="0"
151+ id="path1200-9-6-9-9"
152+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
153+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
154+ transform="scale(-0.6)" />
155+ </marker>
156+ <marker
157+ inkscape:stockid="Arrow2Mend"
158+ orient="auto"
159+ refY="0"
160+ refX="0"
161+ id="Arrow2Mend-8-3-2-7"
162+ style="overflow:visible"
163+ inkscape:isstock="true">
164+ <path
165+ inkscape:connector-curvature="0"
166+ id="path1200-9-6-9-8"
167+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
168+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
169+ transform="scale(-0.6)" />
170+ </marker>
171+ <marker
172+ inkscape:stockid="Arrow2Mend"
173+ orient="auto"
174+ refY="0"
175+ refX="0"
176+ id="Arrow2Mend-8-3-4"
177+ style="overflow:visible"
178+ inkscape:isstock="true">
179+ <path
180+ inkscape:connector-curvature="0"
181+ id="path1200-9-6-5"
182+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
183+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
184+ transform="scale(-0.6)" />
185+ </marker>
186+ <marker
187+ inkscape:stockid="Arrow2Mend"
188+ orient="auto"
189+ refY="0"
190+ refX="0"
191+ id="Arrow2Mend-8-0"
192+ style="overflow:visible"
193+ inkscape:isstock="true">
194+ <path
195+ inkscape:connector-curvature="0"
196+ id="path1200-9-3"
197+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
198+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
199+ transform="scale(-0.6)" />
200+ </marker>
201+ <marker
202+ inkscape:stockid="Arrow2Mend"
203+ orient="auto"
204+ refY="0"
205+ refX="0"
206+ id="Arrow2Mend-6"
207+ style="overflow:visible"
208+ inkscape:isstock="true">
209+ <path
210+ inkscape:connector-curvature="0"
211+ id="path1200-1"
212+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
213+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
214+ transform="scale(-0.6)" />
215+ </marker>
216+ <marker
217+ inkscape:stockid="Arrow2Mend"
218+ orient="auto"
219+ refY="0"
220+ refX="0"
221+ id="Arrow2Mend-8-3-2-6"
222+ style="overflow:visible"
223+ inkscape:isstock="true">
224+ <path
225+ inkscape:connector-curvature="0"
226+ id="path1200-9-6-9-1"
227+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
228+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
229+ transform="scale(-0.6)" />
230+ </marker>
231+ <marker
232+ inkscape:stockid="Arrow2Mend"
233+ orient="auto"
234+ refY="0"
235+ refX="0"
236+ id="Arrow2Mend-8-0-7"
237+ style="overflow:visible"
238+ inkscape:isstock="true">
239+ <path
240+ inkscape:connector-curvature="0"
241+ id="path1200-9-3-4"
242+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
243+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
244+ transform="scale(-0.6)" />
245+ </marker>
246+ <marker
247+ inkscape:stockid="Arrow2Mend"
248+ orient="auto"
249+ refY="0"
250+ refX="0"
251+ id="Arrow2Mend-6-3"
252+ style="overflow:visible"
253+ inkscape:isstock="true">
254+ <path
255+ inkscape:connector-curvature="0"
256+ id="path1200-1-0"
257+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
258+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
259+ transform="scale(-0.6)" />
260+ </marker>
261+ <marker
262+ inkscape:stockid="Arrow2Mend"
263+ orient="auto"
264+ refY="0"
265+ refX="0"
266+ id="Arrow2Mend-8-3-2-8"
267+ style="overflow:visible"
268+ inkscape:isstock="true">
269+ <path
270+ inkscape:connector-curvature="0"
271+ id="path1200-9-6-9-6"
272+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
273+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
274+ transform="scale(-0.6)" />
275+ </marker>
276+ <marker
277+ inkscape:stockid="Arrow2Mend"
278+ orient="auto"
279+ refY="0"
280+ refX="0"
281+ id="Arrow2Mend-3"
282+ style="overflow:visible"
283+ inkscape:isstock="true">
284+ <path
285+ id="path1200-6"
286+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
287+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
288+ transform="scale(-0.6)"
289+ inkscape:connector-curvature="0" />
290+ </marker>
291+ <marker
292+ inkscape:stockid="Arrow2Mend"
293+ orient="auto"
294+ refY="0"
295+ refX="0"
296+ id="marker8858-3"
297+ style="overflow:visible"
298+ inkscape:isstock="true">
299+ <path
300+ id="path8616-5"
301+ style="fill:#00ffcc;fill-opacity:1;fill-rule:evenodd;stroke:#00ffcc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
302+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
303+ transform="scale(-0.6)"
304+ inkscape:connector-curvature="0" />
305+ </marker>
306+ <marker
307+ inkscape:stockid="Arrow2Mend"
308+ orient="auto"
309+ refY="0"
310+ refX="0"
311+ id="Arrow2Mend-8-3-3"
312+ style="overflow:visible"
313+ inkscape:isstock="true">
314+ <path
315+ inkscape:connector-curvature="0"
316+ id="path1200-9-6-56"
317+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
318+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
319+ transform="scale(-0.6)" />
320+ </marker>
321+ <marker
322+ inkscape:stockid="Arrow2Mend"
323+ orient="auto"
324+ refY="0"
325+ refX="0"
326+ id="Arrow2Mend-8-0-2"
327+ style="overflow:visible"
328+ inkscape:isstock="true">
329+ <path
330+ inkscape:connector-curvature="0"
331+ id="path1200-9-3-9"
332+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
333+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
334+ transform="scale(-0.6)" />
335+ </marker>
336+ <marker
337+ inkscape:stockid="Arrow2Mend"
338+ orient="auto"
339+ refY="0"
340+ refX="0"
341+ id="Arrow2Mend-9"
342+ style="overflow:visible"
343+ inkscape:isstock="true">
344+ <path
345+ id="path1200-3"
346+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
347+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
348+ transform="scale(-0.6)"
349+ inkscape:connector-curvature="0" />
350+ </marker>
351+ <marker
352+ inkscape:stockid="Arrow2Mend"
353+ orient="auto"
354+ refY="0"
355+ refX="0"
356+ id="Arrow2Mend-94"
357+ style="overflow:visible"
358+ inkscape:isstock="true">
359+ <path
360+ id="path1200-7"
361+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
362+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
363+ transform="scale(-0.6)"
364+ inkscape:connector-curvature="0" />
365+ </marker>
366+ <marker
367+ inkscape:stockid="Arrow2Mend"
368+ orient="auto"
369+ refY="0"
370+ refX="0"
371+ id="Arrow2Mend-94-6"
372+ style="overflow:visible"
373+ inkscape:isstock="true">
374+ <path
375+ id="path1200-7-9"
376+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
377+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
378+ transform="scale(-0.6)"
379+ inkscape:connector-curvature="0" />
380+ </marker>
381+ <marker
382+ inkscape:stockid="Arrow2Mend"
383+ orient="auto"
384+ refY="0"
385+ refX="0"
386+ id="Arrow2Mend-94-6-7"
387+ style="overflow:visible"
388+ inkscape:isstock="true">
389+ <path
390+ id="path1200-7-9-4"
391+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
392+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
393+ transform="scale(-0.6)"
394+ inkscape:connector-curvature="0" />
395+ </marker>
396+ <marker
397+ inkscape:stockid="Arrow2Mend"
398+ orient="auto"
399+ refY="0"
400+ refX="0"
401+ id="Arrow2Mend-94-6-0"
402+ style="overflow:visible"
403+ inkscape:isstock="true">
404+ <path
405+ id="path1200-7-9-7"
406+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
407+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
408+ transform="scale(-0.6)"
409+ inkscape:connector-curvature="0" />
410+ </marker>
411+ <marker
412+ inkscape:stockid="Arrow2Mend"
413+ orient="auto"
414+ refY="0"
415+ refX="0"
416+ id="Arrow2Mend-94-6-0-1"
417+ style="overflow:visible"
418+ inkscape:isstock="true">
419+ <path
420+ id="path1200-7-9-7-4"
421+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
422+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
423+ transform="scale(-0.6)"
424+ inkscape:connector-curvature="0" />
425+ </marker>
426+ <marker
427+ inkscape:stockid="Arrow2Mend"
428+ orient="auto"
429+ refY="0"
430+ refX="0"
431+ id="Arrow2Mend-94-6-0-2"
432+ style="overflow:visible"
433+ inkscape:isstock="true">
434+ <path
435+ id="path1200-7-9-7-6"
436+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
437+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
438+ transform="scale(-0.6)"
439+ inkscape:connector-curvature="0" />
440+ </marker>
441+ <marker
442+ inkscape:stockid="Arrow2Mend"
443+ orient="auto"
444+ refY="0"
445+ refX="0"
446+ id="Arrow2Mend-94-6-0-2-4"
447+ style="overflow:visible"
448+ inkscape:isstock="true">
449+ <path
450+ id="path1200-7-9-7-6-9"
451+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
452+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
453+ transform="scale(-0.6)"
454+ inkscape:connector-curvature="0" />
455+ </marker>
456+ <marker
457+ inkscape:stockid="Arrow2Mend"
458+ orient="auto"
459+ refY="0"
460+ refX="0"
461+ id="Arrow2Mend-94-8"
462+ style="overflow:visible"
463+ inkscape:isstock="true">
464+ <path
465+ id="path1200-7-7"
466+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
467+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
468+ transform="scale(-0.6)"
469+ inkscape:connector-curvature="0" />
470+ </marker>
471+ <marker
472+ inkscape:stockid="Arrow2Mend"
473+ orient="auto"
474+ refY="0"
475+ refX="0"
476+ id="Arrow2Mend-94-6-0-2-7"
477+ style="overflow:visible"
478+ inkscape:isstock="true">
479+ <path
480+ id="path1200-7-9-7-6-6"
481+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
482+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
483+ transform="scale(-0.6)"
484+ inkscape:connector-curvature="0" />
485+ </marker>
486+ </defs>
487+ <sodipodi:namedview
488+ id="base"
489+ pagecolor="#ffffff"
490+ bordercolor="#666666"
491+ borderopacity="1.0"
492+ inkscape:pageopacity="0.0"
493+ inkscape:pageshadow="2"
494+ inkscape:zoom="1.4"
495+ inkscape:cx="213.41584"
496+ inkscape:cy="301.17934"
497+ inkscape:document-units="mm"
498+ inkscape:current-layer="layer1"
499+ showgrid="false"
500+ inkscape:window-width="2560"
501+ inkscape:window-height="1376"
502+ inkscape:window-x="0"
503+ inkscape:window-y="27"
504+ inkscape:window-maximized="1"
505+ showguides="false"
506+ fit-margin-top="0"
507+ fit-margin-left="0"
508+ fit-margin-right="0"
509+ fit-margin-bottom="0"
510+ units="px"
511+ inkscape:snap-global="false" />
512+ <metadata
513+ id="metadata5">
514+ <rdf:RDF>
515+ <cc:Work
516+ rdf:about="">
517+ <dc:format>image/svg+xml</dc:format>
518+ <dc:type
519+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
520+ <dc:title />
521+ </cc:Work>
522+ </rdf:RDF>
523+ </metadata>
524+ <g
525+ inkscape:label="Layer 1"
526+ inkscape:groupmode="layer"
527+ id="layer1"
528+ transform="translate(349.34521,-0.81564989)">
529+ <rect
530+ style="fill:none;stroke:#000000;stroke-width:1.00353587;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none"
531+ id="rect834"
532+ width="30.251244"
533+ height="88.477814"
534+ x="-317.81958"
535+ y="14.782127"
536+ ry="2.5590618e-06" />
537+ <text
538+ xml:space="preserve"
539+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
540+ x="-314.73792"
541+ y="21.83947"
542+ id="text838"><tspan
543+ sodipodi:role="line"
544+ id="tspan836"
545+ x="-314.73792"
546+ y="21.83947"
547+ style="stroke-width:0.16370411">DCHUB</tspan></text>
548+ <g
549+ id="g2025"
550+ transform="translate(-2.4916954,-1.2533369)">
551+ <text
552+ id="text838-5"
553+ y="31.969406"
554+ x="-254.53119"
555+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
556+ xml:space="preserve"><tspan
557+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
558+ y="31.969406"
559+ x="-254.53119"
560+ id="tspan836-3"
561+ sodipodi:role="line">DPP</tspan><tspan
562+ id="tspan936"
563+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
564+ y="40.15461"
565+ x="-254.53119"
566+ sodipodi:role="line">(0)</tspan></text>
567+ <rect
568+ ry="7.8154301e-07"
569+ y="20.596174"
570+ x="-269.66983"
571+ height="27.021315"
572+ width="30.696135"
573+ id="rect834-5"
574+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
575+ </g>
576+ <text
577+ xml:space="preserve"
578+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1637041"
579+ x="-297.75696"
580+ y="109.44505"
581+ id="text1063"><tspan
582+ sodipodi:role="line"
583+ id="tspan1061"
584+ x="-297.75696"
585+ y="115.23865"
586+ style="stroke-width:0.1637041" /></text>
587+ <g
588+ id="g1878"
589+ transform="translate(-0.62971878)">
590+ <text
591+ id="text846"
592+ y="30.716068"
593+ x="-302.27368"
594+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
595+ xml:space="preserve"><tspan
596+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
597+ y="30.716068"
598+ x="-302.27368"
599+ id="tspan844"
600+ sodipodi:role="line">HUBP</tspan><tspan
601+ id="tspan863"
602+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
603+ y="38.901276"
604+ x="-302.27368"
605+ sodipodi:role="line">(0)</tspan></text>
606+ <g
607+ id="g1853">
608+ <rect
609+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
610+ id="rect1850"
611+ width="24.708241"
612+ height="17.224693"
613+ x="-314.41837"
614+ y="24.241148" />
615+ </g>
616+ </g>
617+ <g
618+ transform="translate(-0.62971878,18.810271)"
619+ id="g1878-1">
620+ <text
621+ id="text846-2"
622+ y="30.716068"
623+ x="-302.27368"
624+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
625+ xml:space="preserve"><tspan
626+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
627+ y="30.716068"
628+ x="-302.27368"
629+ id="tspan844-7"
630+ sodipodi:role="line">HUBP</tspan><tspan
631+ id="tspan863-0"
632+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
633+ y="38.901276"
634+ x="-302.27368"
635+ sodipodi:role="line">(1)</tspan></text>
636+ <g
637+ id="g1853-9">
638+ <rect
639+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
640+ id="rect1850-3"
641+ width="24.708241"
642+ height="17.224693"
643+ x="-314.41837"
644+ y="24.241148" />
645+ </g>
646+ </g>
647+ <g
648+ transform="translate(-0.62971878,57.029814)"
649+ id="g1878-8">
650+ <text
651+ id="text846-7"
652+ y="30.716068"
653+ x="-302.27368"
654+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
655+ xml:space="preserve"><tspan
656+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
657+ y="30.716068"
658+ x="-302.27368"
659+ id="tspan844-9"
660+ sodipodi:role="line">HUBP</tspan><tspan
661+ id="tspan863-20"
662+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
663+ y="38.901276"
664+ x="-302.27368"
665+ sodipodi:role="line">(5)</tspan></text>
666+ <g
667+ id="g1853-2">
668+ <rect
669+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
670+ id="rect1850-37"
671+ width="24.708241"
672+ height="17.224693"
673+ x="-314.41837"
674+ y="24.241148" />
675+ </g>
676+ </g>
677+ <text
678+ xml:space="preserve"
679+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
680+ x="-310.7348"
681+ y="72.106789"
682+ id="text8862-5"><tspan
683+ sodipodi:role="line"
684+ id="tspan8860-9"
685+ x="-310.7348"
686+ y="72.106789"
687+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#44aa00;stroke-width:0.26458332">...</tspan></text>
688+ <path
689+ style="fill:none;stroke:#ff0000;stroke-width:0.96187615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94)"
690+ d="m -288.90777,32.862737 h 14.20296"
691+ id="path1171"
692+ inkscape:connector-curvature="0" />
693+ <text
694+ xml:space="preserve"
695+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
696+ x="-264.85431"
697+ y="62.072891"
698+ id="text8862-5-8"><tspan
699+ sodipodi:role="line"
700+ id="tspan8860-9-4"
701+ x="-264.85431"
702+ y="62.072891"
703+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
704+ <g
705+ id="g2025-5"
706+ transform="translate(40.522337,-1.1484419)" />
707+ <g
708+ id="g7343"
709+ transform="translate(40.522337,-1.2533369)">
710+ <text
711+ id="text838-5-6"
712+ y="31.969406"
713+ x="-254.53119"
714+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
715+ xml:space="preserve"><tspan
716+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
717+ y="31.969406"
718+ x="-254.53119"
719+ id="tspan836-3-3"
720+ sodipodi:role="line">MPC</tspan><tspan
721+ id="tspan936-2"
722+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
723+ y="40.15461"
724+ x="-254.53119"
725+ sodipodi:role="line">(0)</tspan></text>
726+ <rect
727+ ry="7.8154301e-07"
728+ y="20.596174"
729+ x="-269.66983"
730+ height="27.021315"
731+ width="30.696135"
732+ id="rect834-5-0"
733+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
734+ </g>
735+ <g
736+ id="g7343-2"
737+ transform="translate(84.178583,-1.2533369)">
738+ <text
739+ id="text838-5-6-54"
740+ y="31.969406"
741+ x="-254.53119"
742+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
743+ xml:space="preserve"><tspan
744+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
745+ y="31.969406"
746+ x="-254.53119"
747+ id="tspan836-3-3-7"
748+ sodipodi:role="line">OPP</tspan><tspan
749+ id="tspan936-2-44"
750+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
751+ y="40.15461"
752+ x="-254.53119"
753+ sodipodi:role="line">(0)</tspan></text>
754+ <rect
755+ ry="7.8154301e-07"
756+ y="20.596174"
757+ x="-269.66983"
758+ height="27.021315"
759+ width="30.696135"
760+ id="rect834-5-0-3"
761+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
762+ </g>
763+ <text
764+ xml:space="preserve"
765+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
766+ x="-221.84029"
767+ y="62.072891"
768+ id="text8862-5-8-6"><tspan
769+ sodipodi:role="line"
770+ id="tspan8860-9-4-5"
771+ x="-221.84029"
772+ y="62.072891"
773+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
774+ <path
775+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6)"
776+ d="m -240.90479,32.86192 h 10.61353"
777+ id="path1171-3"
778+ inkscape:connector-curvature="0" />
779+ <path
780+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0)"
781+ d="m -198.19009,32.86192 h 10.61353"
782+ id="path1171-3-8"
783+ inkscape:connector-curvature="0" />
784+ <g
785+ id="g7343-2-2"
786+ transform="translate(127.15447,-1.1484419)">
787+ <text
788+ id="text838-5-6-54-0"
789+ y="65.122154"
790+ x="-254.32814"
791+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
792+ xml:space="preserve"><tspan
793+ id="tspan936-2-44-8"
794+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
795+ y="65.122154"
796+ x="-254.32814"
797+ sodipodi:role="line">OPTC</tspan></text>
798+ <rect
799+ ry="2.4256708e-06"
800+ y="20.805576"
801+ x="-269.46042"
802+ height="83.865906"
803+ width="30.277332"
804+ id="rect834-5-0-3-9"
805+ style="fill:none;stroke:#000000;stroke-width:0.97745234;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
806+ </g>
807+ <path
808+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-2)"
809+ d="m -154.34485,32.86192 h 10.61353"
810+ id="path1171-3-8-6"
811+ inkscape:connector-curvature="0" />
812+ <text
813+ xml:space="preserve"
814+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
815+ x="-178.18404"
816+ y="62.072891"
817+ id="text8862-5-8-6-0"><tspan
818+ sodipodi:role="line"
819+ id="tspan8860-9-4-5-4"
820+ x="-178.18404"
821+ y="62.072891"
822+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
823+ <path
824+ style="fill:#000000;stroke:#000000;stroke-width:0.96187615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-8)"
825+ d="m -335.20986,59.030276 h 14.20296"
826+ id="path1171-17"
827+ inkscape:connector-curvature="0" />
828+ <text
829+ xml:space="preserve"
830+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
831+ x="-349.77686"
832+ y="61.404655"
833+ id="text838-2"><tspan
834+ sodipodi:role="line"
835+ id="tspan836-7"
836+ x="-349.77686"
837+ y="61.404655"
838+ style="stroke-width:0.16370411">SDP</tspan></text>
839+ <path
840+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291667, 1.32291667;stroke-dashoffset:0;stroke-opacity:1"
841+ d="M -279.04164,107.86706 V 0.89985833"
842+ id="path11907"
843+ inkscape:connector-curvature="0" />
844+ <path
845+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.3229167, 1.3229167;stroke-dashoffset:0;stroke-opacity:1"
846+ d="M -235.57438,107.86707 V 0.89985663"
847+ id="path11907-6-1"
848+ inkscape:connector-curvature="0" />
849+ <path
850+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291671, 1.32291671;stroke-dashoffset:0;stroke-opacity:1"
851+ d="M -149.96277,107.86707 V 0.89985223"
852+ id="path11907-6-1-0"
853+ inkscape:connector-curvature="0" />
854+ <text
855+ xml:space="preserve"
856+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
857+ x="-257.38275"
858+ y="5.003336"
859+ id="text838-6"><tspan
860+ sodipodi:role="line"
861+ id="tspan836-1"
862+ x="-257.38275"
863+ y="5.003336"
864+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411">DPPCLK</tspan><tspan
865+ sodipodi:role="line"
866+ x="-257.38275"
867+ y="13.188541"
868+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411"
869+ id="tspan12658">535.916Mhz</tspan></text>
870+ <text
871+ xml:space="preserve"
872+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
873+ x="-192.85298"
874+ y="5.003336"
875+ id="text838-6-5"><tspan
876+ sodipodi:role="line"
877+ id="tspan836-1-9"
878+ x="-192.85298"
879+ y="5.003336"
880+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411">DISPCLK</tspan><tspan
881+ sodipodi:role="line"
882+ x="-192.85298"
883+ y="13.188541"
884+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411"
885+ id="tspan12662">541.275 Mhz</tspan></text>
886+ <text
887+ xml:space="preserve"
888+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
889+ x="-302.03766"
890+ y="5.003336"
891+ id="text838-6-5-4"><tspan
892+ sodipodi:role="line"
893+ id="tspan836-1-9-9"
894+ x="-312.23135"
895+ y="5.003336"
896+ style="font-size:4.93888903px;stroke-width:0.16370411;text-anchor:middle;text-align:center">DCFCLK</tspan><tspan
897+ sodipodi:role="line"
898+ x="-312.23135"
899+ y="13.188541"
900+ style="font-size:4.93888903px;stroke-width:0.16370411;text-anchor:middle;text-align:center"
901+ id="tspan12660">506 Mhz</tspan></text>
902+ <text
903+ xml:space="preserve"
904+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
905+ x="-96.075348"
906+ y="4.568048"
907+ id="text838-6-5-0"><tspan
908+ sodipodi:role="line"
909+ id="tspan836-1-9-91"
910+ x="-96.075348"
911+ y="4.568048"
912+ style="font-size:4.93888903px;stroke-width:0.16370411">SymCLK</tspan></text>
913+ <g
914+ id="g7343-2-2-7"
915+ transform="translate(168.61494,-1.1484419)">
916+ <text
917+ id="text838-5-6-54-0-7"
918+ y="65.122154"
919+ x="-254.32814"
920+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
921+ xml:space="preserve"><tspan
922+ id="tspan936-2-44-8-1"
923+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
924+ y="65.122154"
925+ x="-254.32814"
926+ sodipodi:role="line">DIO</tspan></text>
927+ <rect
928+ ry="2.4256708e-06"
929+ y="20.805576"
930+ x="-269.46042"
931+ height="83.865906"
932+ width="30.277332"
933+ id="rect834-5-0-3-9-1"
934+ style="fill:none;stroke:#000000;stroke-width:0.97745234;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
935+ </g>
936+ <path
937+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291672, 1.32291672;stroke-dashoffset:0;stroke-opacity:1"
938+ d="M -108.38539,107.86707 V 0.89985092"
939+ id="path11907-6-1-0-5"
940+ inkscape:connector-curvature="0" />
941+ <text
942+ xml:space="preserve"
943+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
944+ x="-143.52292"
945+ y="5.0467439"
946+ id="text838-6-5-0-9"><tspan
947+ sodipodi:role="line"
948+ id="tspan836-1-9-91-7"
949+ x="-143.52292"
950+ y="5.0467439"
951+ style="font-size:4.93888903px;stroke-width:0.16370411">VirtualPCLK</tspan></text>
952+ <path
953+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-2-7)"
954+ d="m -112.24183,60.747629 h 10.61353"
955+ id="path1171-3-8-6-7"
956+ inkscape:connector-curvature="0" />
957+ </g>
958+</svg>
Documentation/gpu/amdgpu/display/pipeline_4k_split.svg+1062−0
@@ -0,0 +1,1062 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="1055.4928"
13+ height="404.60379"
14+ viewBox="0 0 279.26579 107.05142"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="pipeline_no_split_4k.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="Arrow2Mend"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="marker8858"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path8616"
31+ style="fill:#aa00d4;fill-opacity:1;fill-rule:evenodd;stroke:#aa00d4;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
32+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
33+ transform="scale(-0.6)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="Arrow2Send"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="Arrow2Send"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ id="path8622"
46+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
47+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
48+ transform="matrix(-0.3,0,0,-0.3,0.69,0)"
49+ inkscape:connector-curvature="0" />
50+ </marker>
51+ <marker
52+ inkscape:stockid="Arrow1Lend"
53+ orient="auto"
54+ refY="0"
55+ refX="0"
56+ id="Arrow1Lend"
57+ style="overflow:visible"
58+ inkscape:isstock="true">
59+ <path
60+ id="path8592"
61+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
62+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1"
63+ transform="matrix(-0.8,0,0,-0.8,-10,0)"
64+ inkscape:connector-curvature="0" />
65+ </marker>
66+ <marker
67+ inkscape:stockid="Arrow2Lend"
68+ orient="auto"
69+ refY="0"
70+ refX="0"
71+ id="Arrow2Lend"
72+ style="overflow:visible"
73+ inkscape:isstock="true">
74+ <path
75+ id="path8610"
76+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
77+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
78+ transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
79+ inkscape:connector-curvature="0" />
80+ </marker>
81+ <marker
82+ inkscape:stockid="Arrow2Mend"
83+ orient="auto"
84+ refY="0"
85+ refX="0"
86+ id="Arrow2Mend"
87+ style="overflow:visible"
88+ inkscape:isstock="true">
89+ <path
90+ id="path1200"
91+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
92+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
93+ transform="scale(-0.6)"
94+ inkscape:connector-curvature="0" />
95+ </marker>
96+ <marker
97+ inkscape:stockid="Arrow2Mend"
98+ orient="auto"
99+ refY="0"
100+ refX="0"
101+ id="Arrow2Mend-8"
102+ style="overflow:visible"
103+ inkscape:isstock="true">
104+ <path
105+ inkscape:connector-curvature="0"
106+ id="path1200-9"
107+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
108+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
109+ transform="scale(-0.6)" />
110+ </marker>
111+ <marker
112+ inkscape:stockid="Arrow2Mend"
113+ orient="auto"
114+ refY="0"
115+ refX="0"
116+ id="Arrow2Mend-8-3"
117+ style="overflow:visible"
118+ inkscape:isstock="true">
119+ <path
120+ inkscape:connector-curvature="0"
121+ id="path1200-9-6"
122+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
123+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
124+ transform="scale(-0.6)" />
125+ </marker>
126+ <marker
127+ inkscape:stockid="Arrow2Mend"
128+ orient="auto"
129+ refY="0"
130+ refX="0"
131+ id="Arrow2Mend-8-3-2"
132+ style="overflow:visible"
133+ inkscape:isstock="true">
134+ <path
135+ inkscape:connector-curvature="0"
136+ id="path1200-9-6-9"
137+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
138+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
139+ transform="scale(-0.6)" />
140+ </marker>
141+ <marker
142+ inkscape:stockid="Arrow2Mend"
143+ orient="auto"
144+ refY="0"
145+ refX="0"
146+ id="Arrow2Mend-8-3-2-1"
147+ style="overflow:visible"
148+ inkscape:isstock="true">
149+ <path
150+ inkscape:connector-curvature="0"
151+ id="path1200-9-6-9-9"
152+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
153+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
154+ transform="scale(-0.6)" />
155+ </marker>
156+ <marker
157+ inkscape:stockid="Arrow2Mend"
158+ orient="auto"
159+ refY="0"
160+ refX="0"
161+ id="Arrow2Mend-8-3-2-7"
162+ style="overflow:visible"
163+ inkscape:isstock="true">
164+ <path
165+ inkscape:connector-curvature="0"
166+ id="path1200-9-6-9-8"
167+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
168+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
169+ transform="scale(-0.6)" />
170+ </marker>
171+ <marker
172+ inkscape:stockid="Arrow2Mend"
173+ orient="auto"
174+ refY="0"
175+ refX="0"
176+ id="Arrow2Mend-8-3-4"
177+ style="overflow:visible"
178+ inkscape:isstock="true">
179+ <path
180+ inkscape:connector-curvature="0"
181+ id="path1200-9-6-5"
182+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
183+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
184+ transform="scale(-0.6)" />
185+ </marker>
186+ <marker
187+ inkscape:stockid="Arrow2Mend"
188+ orient="auto"
189+ refY="0"
190+ refX="0"
191+ id="Arrow2Mend-8-0"
192+ style="overflow:visible"
193+ inkscape:isstock="true">
194+ <path
195+ inkscape:connector-curvature="0"
196+ id="path1200-9-3"
197+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
198+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
199+ transform="scale(-0.6)" />
200+ </marker>
201+ <marker
202+ inkscape:stockid="Arrow2Mend"
203+ orient="auto"
204+ refY="0"
205+ refX="0"
206+ id="Arrow2Mend-6"
207+ style="overflow:visible"
208+ inkscape:isstock="true">
209+ <path
210+ inkscape:connector-curvature="0"
211+ id="path1200-1"
212+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
213+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
214+ transform="scale(-0.6)" />
215+ </marker>
216+ <marker
217+ inkscape:stockid="Arrow2Mend"
218+ orient="auto"
219+ refY="0"
220+ refX="0"
221+ id="Arrow2Mend-8-3-2-6"
222+ style="overflow:visible"
223+ inkscape:isstock="true">
224+ <path
225+ inkscape:connector-curvature="0"
226+ id="path1200-9-6-9-1"
227+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
228+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
229+ transform="scale(-0.6)" />
230+ </marker>
231+ <marker
232+ inkscape:stockid="Arrow2Mend"
233+ orient="auto"
234+ refY="0"
235+ refX="0"
236+ id="Arrow2Mend-8-0-7"
237+ style="overflow:visible"
238+ inkscape:isstock="true">
239+ <path
240+ inkscape:connector-curvature="0"
241+ id="path1200-9-3-4"
242+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
243+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
244+ transform="scale(-0.6)" />
245+ </marker>
246+ <marker
247+ inkscape:stockid="Arrow2Mend"
248+ orient="auto"
249+ refY="0"
250+ refX="0"
251+ id="Arrow2Mend-6-3"
252+ style="overflow:visible"
253+ inkscape:isstock="true">
254+ <path
255+ inkscape:connector-curvature="0"
256+ id="path1200-1-0"
257+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
258+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
259+ transform="scale(-0.6)" />
260+ </marker>
261+ <marker
262+ inkscape:stockid="Arrow2Mend"
263+ orient="auto"
264+ refY="0"
265+ refX="0"
266+ id="Arrow2Mend-8-3-2-8"
267+ style="overflow:visible"
268+ inkscape:isstock="true">
269+ <path
270+ inkscape:connector-curvature="0"
271+ id="path1200-9-6-9-6"
272+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
273+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
274+ transform="scale(-0.6)" />
275+ </marker>
276+ <marker
277+ inkscape:stockid="Arrow2Mend"
278+ orient="auto"
279+ refY="0"
280+ refX="0"
281+ id="Arrow2Mend-3"
282+ style="overflow:visible"
283+ inkscape:isstock="true">
284+ <path
285+ id="path1200-6"
286+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
287+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
288+ transform="scale(-0.6)"
289+ inkscape:connector-curvature="0" />
290+ </marker>
291+ <marker
292+ inkscape:stockid="Arrow2Mend"
293+ orient="auto"
294+ refY="0"
295+ refX="0"
296+ id="marker8858-3"
297+ style="overflow:visible"
298+ inkscape:isstock="true">
299+ <path
300+ id="path8616-5"
301+ style="fill:#00ffcc;fill-opacity:1;fill-rule:evenodd;stroke:#00ffcc;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
302+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
303+ transform="scale(-0.6)"
304+ inkscape:connector-curvature="0" />
305+ </marker>
306+ <marker
307+ inkscape:stockid="Arrow2Mend"
308+ orient="auto"
309+ refY="0"
310+ refX="0"
311+ id="Arrow2Mend-8-3-3"
312+ style="overflow:visible"
313+ inkscape:isstock="true">
314+ <path
315+ inkscape:connector-curvature="0"
316+ id="path1200-9-6-56"
317+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
318+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
319+ transform="scale(-0.6)" />
320+ </marker>
321+ <marker
322+ inkscape:stockid="Arrow2Mend"
323+ orient="auto"
324+ refY="0"
325+ refX="0"
326+ id="Arrow2Mend-8-0-2"
327+ style="overflow:visible"
328+ inkscape:isstock="true">
329+ <path
330+ inkscape:connector-curvature="0"
331+ id="path1200-9-3-9"
332+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
333+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
334+ transform="scale(-0.6)" />
335+ </marker>
336+ <marker
337+ inkscape:stockid="Arrow2Mend"
338+ orient="auto"
339+ refY="0"
340+ refX="0"
341+ id="Arrow2Mend-9"
342+ style="overflow:visible"
343+ inkscape:isstock="true">
344+ <path
345+ id="path1200-3"
346+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
347+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
348+ transform="scale(-0.6)"
349+ inkscape:connector-curvature="0" />
350+ </marker>
351+ <marker
352+ inkscape:stockid="Arrow2Mend"
353+ orient="auto"
354+ refY="0"
355+ refX="0"
356+ id="Arrow2Mend-94"
357+ style="overflow:visible"
358+ inkscape:isstock="true">
359+ <path
360+ id="path1200-7"
361+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
362+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
363+ transform="scale(-0.6)"
364+ inkscape:connector-curvature="0" />
365+ </marker>
366+ <marker
367+ inkscape:stockid="Arrow2Mend"
368+ orient="auto"
369+ refY="0"
370+ refX="0"
371+ id="Arrow2Mend-94-6"
372+ style="overflow:visible"
373+ inkscape:isstock="true">
374+ <path
375+ id="path1200-7-9"
376+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
377+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
378+ transform="scale(-0.6)"
379+ inkscape:connector-curvature="0" />
380+ </marker>
381+ <marker
382+ inkscape:stockid="Arrow2Mend"
383+ orient="auto"
384+ refY="0"
385+ refX="0"
386+ id="Arrow2Mend-94-6-7"
387+ style="overflow:visible"
388+ inkscape:isstock="true">
389+ <path
390+ id="path1200-7-9-4"
391+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
392+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
393+ transform="scale(-0.6)"
394+ inkscape:connector-curvature="0" />
395+ </marker>
396+ <marker
397+ inkscape:stockid="Arrow2Mend"
398+ orient="auto"
399+ refY="0"
400+ refX="0"
401+ id="Arrow2Mend-94-6-0"
402+ style="overflow:visible"
403+ inkscape:isstock="true">
404+ <path
405+ id="path1200-7-9-7"
406+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
407+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
408+ transform="scale(-0.6)"
409+ inkscape:connector-curvature="0" />
410+ </marker>
411+ <marker
412+ inkscape:stockid="Arrow2Mend"
413+ orient="auto"
414+ refY="0"
415+ refX="0"
416+ id="Arrow2Mend-94-6-0-1"
417+ style="overflow:visible"
418+ inkscape:isstock="true">
419+ <path
420+ id="path1200-7-9-7-4"
421+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
422+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
423+ transform="scale(-0.6)"
424+ inkscape:connector-curvature="0" />
425+ </marker>
426+ <marker
427+ inkscape:stockid="Arrow2Mend"
428+ orient="auto"
429+ refY="0"
430+ refX="0"
431+ id="Arrow2Mend-94-6-0-2"
432+ style="overflow:visible"
433+ inkscape:isstock="true">
434+ <path
435+ id="path1200-7-9-7-6"
436+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
437+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
438+ transform="scale(-0.6)"
439+ inkscape:connector-curvature="0" />
440+ </marker>
441+ <marker
442+ inkscape:stockid="Arrow2Mend"
443+ orient="auto"
444+ refY="0"
445+ refX="0"
446+ id="Arrow2Mend-94-6-0-2-4"
447+ style="overflow:visible"
448+ inkscape:isstock="true">
449+ <path
450+ id="path1200-7-9-7-6-9"
451+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
452+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
453+ transform="scale(-0.6)"
454+ inkscape:connector-curvature="0" />
455+ </marker>
456+ <marker
457+ inkscape:stockid="Arrow2Mend"
458+ orient="auto"
459+ refY="0"
460+ refX="0"
461+ id="Arrow2Mend-94-8"
462+ style="overflow:visible"
463+ inkscape:isstock="true">
464+ <path
465+ id="path1200-7-7"
466+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
467+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
468+ transform="scale(-0.6)"
469+ inkscape:connector-curvature="0" />
470+ </marker>
471+ <marker
472+ inkscape:stockid="Arrow2Mend"
473+ orient="auto"
474+ refY="0"
475+ refX="0"
476+ id="Arrow2Mend-94-6-0-2-7"
477+ style="overflow:visible"
478+ inkscape:isstock="true">
479+ <path
480+ id="path1200-7-9-7-6-6"
481+ style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
482+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
483+ transform="scale(-0.6)"
484+ inkscape:connector-curvature="0" />
485+ </marker>
486+ </defs>
487+ <sodipodi:namedview
488+ id="base"
489+ pagecolor="#ffffff"
490+ bordercolor="#666666"
491+ borderopacity="1.0"
492+ inkscape:pageopacity="0.0"
493+ inkscape:pageshadow="2"
494+ inkscape:zoom="1.4"
495+ inkscape:cx="491.27298"
496+ inkscape:cy="306.89362"
497+ inkscape:document-units="mm"
498+ inkscape:current-layer="layer1"
499+ showgrid="false"
500+ inkscape:window-width="2560"
501+ inkscape:window-height="1376"
502+ inkscape:window-x="0"
503+ inkscape:window-y="27"
504+ inkscape:window-maximized="1"
505+ showguides="false"
506+ fit-margin-top="0"
507+ fit-margin-left="0"
508+ fit-margin-right="0"
509+ fit-margin-bottom="0"
510+ units="px"
511+ inkscape:snap-global="false" />
512+ <metadata
513+ id="metadata5">
514+ <rdf:RDF>
515+ <cc:Work
516+ rdf:about="">
517+ <dc:format>image/svg+xml</dc:format>
518+ <dc:type
519+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
520+ <dc:title></dc:title>
521+ </cc:Work>
522+ </rdf:RDF>
523+ </metadata>
524+ <g
525+ inkscape:label="Layer 1"
526+ inkscape:groupmode="layer"
527+ id="layer1"
528+ transform="translate(349.34521,-0.81564989)">
529+ <rect
530+ style="fill:none;stroke:#000000;stroke-width:1.00353587;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none"
531+ id="rect834"
532+ width="30.251244"
533+ height="88.477814"
534+ x="-317.81958"
535+ y="14.782127"
536+ ry="2.5590618e-06" />
537+ <text
538+ xml:space="preserve"
539+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
540+ x="-314.73792"
541+ y="21.83947"
542+ id="text838"><tspan
543+ sodipodi:role="line"
544+ id="tspan836"
545+ x="-314.73792"
546+ y="21.83947"
547+ style="stroke-width:0.16370411">DCHUB</tspan></text>
548+ <g
549+ id="g2025"
550+ transform="translate(-2.4916954,-1.2533369)">
551+ <text
552+ id="text838-5"
553+ y="31.969406"
554+ x="-254.53119"
555+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
556+ xml:space="preserve"><tspan
557+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
558+ y="31.969406"
559+ x="-254.53119"
560+ id="tspan836-3"
561+ sodipodi:role="line">DPP</tspan><tspan
562+ id="tspan936"
563+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
564+ y="40.15461"
565+ x="-254.53119"
566+ sodipodi:role="line">(0)</tspan></text>
567+ <rect
568+ ry="7.8154301e-07"
569+ y="20.596174"
570+ x="-269.66983"
571+ height="27.021315"
572+ width="30.696135"
573+ id="rect834-5"
574+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
575+ </g>
576+ <text
577+ xml:space="preserve"
578+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.1637041"
579+ x="-297.75696"
580+ y="109.44505"
581+ id="text1063"><tspan
582+ sodipodi:role="line"
583+ id="tspan1061"
584+ x="-297.75696"
585+ y="115.23865"
586+ style="stroke-width:0.1637041" /></text>
587+ <g
588+ id="g1878"
589+ transform="translate(-0.62971878)">
590+ <text
591+ id="text846"
592+ y="30.716068"
593+ x="-302.27368"
594+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
595+ xml:space="preserve"><tspan
596+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
597+ y="30.716068"
598+ x="-302.27368"
599+ id="tspan844"
600+ sodipodi:role="line">HUBP</tspan><tspan
601+ id="tspan863"
602+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
603+ y="38.901276"
604+ x="-302.27368"
605+ sodipodi:role="line">(0)</tspan></text>
606+ <g
607+ id="g1853">
608+ <rect
609+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
610+ id="rect1850"
611+ width="24.708241"
612+ height="17.224693"
613+ x="-314.41837"
614+ y="24.241148" />
615+ </g>
616+ </g>
617+ <g
618+ transform="translate(-0.62971878,18.810271)"
619+ id="g1878-1">
620+ <text
621+ id="text846-2"
622+ y="30.716068"
623+ x="-302.27368"
624+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
625+ xml:space="preserve"><tspan
626+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
627+ y="30.716068"
628+ x="-302.27368"
629+ id="tspan844-7"
630+ sodipodi:role="line">HUBP</tspan><tspan
631+ id="tspan863-0"
632+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
633+ y="38.901276"
634+ x="-302.27368"
635+ sodipodi:role="line">(1)</tspan></text>
636+ <g
637+ id="g1853-9">
638+ <rect
639+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
640+ id="rect1850-3"
641+ width="24.708241"
642+ height="17.224693"
643+ x="-314.41837"
644+ y="24.241148" />
645+ </g>
646+ </g>
647+ <g
648+ transform="translate(-0.62971878,57.029814)"
649+ id="g1878-8">
650+ <text
651+ id="text846-7"
652+ y="30.716068"
653+ x="-302.27368"
654+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#44aa00;fill-opacity:1;stroke:none;stroke-width:0.16370411"
655+ xml:space="preserve"><tspan
656+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
657+ y="30.716068"
658+ x="-302.27368"
659+ id="tspan844-9"
660+ sodipodi:role="line">HUBP</tspan><tspan
661+ id="tspan863-20"
662+ style="text-align:center;text-anchor:middle;fill:#44aa00;stroke-width:0.16370411"
663+ y="38.901276"
664+ x="-302.27368"
665+ sodipodi:role="line">(5)</tspan></text>
666+ <g
667+ id="g1853-2">
668+ <rect
669+ style="fill:none;fill-opacity:1;stroke:#55d400;stroke-width:0.94157624;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
670+ id="rect1850-37"
671+ width="24.708241"
672+ height="17.224693"
673+ x="-314.41837"
674+ y="24.241148" />
675+ </g>
676+ </g>
677+ <text
678+ xml:space="preserve"
679+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
680+ x="-310.7348"
681+ y="72.106789"
682+ id="text8862-5"><tspan
683+ sodipodi:role="line"
684+ id="tspan8860-9"
685+ x="-310.7348"
686+ y="72.106789"
687+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#44aa00;stroke-width:0.26458332">...</tspan></text>
688+ <g
689+ id="g2031"
690+ transform="translate(-2.4568452,2.9399645)">
691+ <text
692+ id="text838-5-3"
693+ y="84.805916"
694+ x="-254.56604"
695+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
696+ xml:space="preserve"><tspan
697+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
698+ y="84.805916"
699+ x="-254.56604"
700+ id="tspan836-3-6"
701+ sodipodi:role="line">DPP</tspan><tspan
702+ id="tspan936-1"
703+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
704+ y="92.991119"
705+ x="-254.56604"
706+ sodipodi:role="line">(5)</tspan></text>
707+ <rect
708+ ry="7.8154301e-07"
709+ y="73.432686"
710+ x="-269.70468"
711+ height="27.021317"
712+ width="30.696136"
713+ id="rect834-5-2"
714+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
715+ </g>
716+ <path
717+ style="fill:none;stroke:#ff0000;stroke-width:0.96187615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-9)"
718+ d="m -289.17681,89.892551 h 14.20296"
719+ id="path1171-1"
720+ inkscape:connector-curvature="0" />
721+ <path
722+ style="fill:none;stroke:#ff0000;stroke-width:0.96187615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94)"
723+ d="m -288.90777,32.862737 h 14.20296"
724+ id="path1171"
725+ inkscape:connector-curvature="0" />
726+ <text
727+ xml:space="preserve"
728+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
729+ x="-264.85431"
730+ y="62.072891"
731+ id="text8862-5-8"><tspan
732+ sodipodi:role="line"
733+ id="tspan8860-9-4"
734+ x="-264.85431"
735+ y="62.072891"
736+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
737+ <g
738+ id="g2025-5"
739+ transform="translate(40.522337,-1.1484419)" />
740+ <g
741+ id="g7343"
742+ transform="translate(40.522337,-1.2533369)">
743+ <text
744+ id="text838-5-6"
745+ y="31.969406"
746+ x="-254.53119"
747+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
748+ xml:space="preserve"><tspan
749+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
750+ y="31.969406"
751+ x="-254.53119"
752+ id="tspan836-3-3"
753+ sodipodi:role="line">MPC</tspan><tspan
754+ id="tspan936-2"
755+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
756+ y="40.15461"
757+ x="-254.53119"
758+ sodipodi:role="line">(0)</tspan></text>
759+ <rect
760+ ry="7.8154301e-07"
761+ y="20.596174"
762+ x="-269.66983"
763+ height="27.021315"
764+ width="30.696135"
765+ id="rect834-5-0"
766+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
767+ </g>
768+ <g
769+ id="g7343-1"
770+ transform="translate(40.522337,56.303939)">
771+ <text
772+ id="text838-5-6-5"
773+ y="31.969406"
774+ x="-254.53119"
775+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
776+ xml:space="preserve"><tspan
777+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
778+ y="31.969406"
779+ x="-254.53119"
780+ id="tspan836-3-3-5"
781+ sodipodi:role="line">MPC</tspan><tspan
782+ id="tspan936-2-4"
783+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
784+ y="40.15461"
785+ x="-254.53119"
786+ sodipodi:role="line">(5)</tspan></text>
787+ <rect
788+ ry="7.8154301e-07"
789+ y="20.596174"
790+ x="-269.66983"
791+ height="27.021315"
792+ width="30.696135"
793+ id="rect834-5-0-7"
794+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
795+ </g>
796+ <g
797+ id="g7343-2"
798+ transform="translate(84.178583,-1.2533369)">
799+ <text
800+ id="text838-5-6-54"
801+ y="31.969406"
802+ x="-254.53119"
803+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
804+ xml:space="preserve"><tspan
805+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
806+ y="31.969406"
807+ x="-254.53119"
808+ id="tspan836-3-3-7"
809+ sodipodi:role="line">OPP</tspan><tspan
810+ id="tspan936-2-44"
811+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
812+ y="40.15461"
813+ x="-254.53119"
814+ sodipodi:role="line">(0)</tspan></text>
815+ <rect
816+ ry="7.8154301e-07"
817+ y="20.596174"
818+ x="-269.66983"
819+ height="27.021315"
820+ width="30.696135"
821+ id="rect834-5-0-3"
822+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
823+ </g>
824+ <text
825+ xml:space="preserve"
826+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
827+ x="-221.84029"
828+ y="62.072891"
829+ id="text8862-5-8-6"><tspan
830+ sodipodi:role="line"
831+ id="tspan8860-9-4-5"
832+ x="-221.84029"
833+ y="62.072891"
834+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
835+ <path
836+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6)"
837+ d="m -240.90479,32.86192 h 10.61353"
838+ id="path1171-3"
839+ inkscape:connector-curvature="0" />
840+ <path
841+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-7)"
842+ d="m -241.09039,89.891298 h 10.61353"
843+ id="path1171-3-5"
844+ inkscape:connector-curvature="0" />
845+ <path
846+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0)"
847+ d="m -198.19009,32.86192 h 10.61353"
848+ id="path1171-3-8"
849+ inkscape:connector-curvature="0" />
850+ <g
851+ id="g7343-2-6"
852+ transform="translate(84.178583,56.303939)">
853+ <text
854+ id="text838-5-6-54-8"
855+ y="31.969406"
856+ x="-254.53119"
857+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
858+ xml:space="preserve"><tspan
859+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
860+ y="31.969406"
861+ x="-254.53119"
862+ id="tspan836-3-3-7-8"
863+ sodipodi:role="line">OPP</tspan><tspan
864+ id="tspan936-2-44-4"
865+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
866+ y="40.15461"
867+ x="-254.53119"
868+ sodipodi:role="line">(0)</tspan></text>
869+ <rect
870+ ry="7.8154301e-07"
871+ y="20.596174"
872+ x="-269.66983"
873+ height="27.021315"
874+ width="30.696135"
875+ id="rect834-5-0-3-3"
876+ style="fill:none;stroke:#000000;stroke-width:0.55864918;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
877+ </g>
878+ <path
879+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-1)"
880+ d="m -198.00111,89.891298 h 10.61353"
881+ id="path1171-3-8-9"
882+ inkscape:connector-curvature="0" />
883+ <g
884+ id="g7343-2-2"
885+ transform="translate(127.15447,-1.1484419)">
886+ <text
887+ id="text838-5-6-54-0"
888+ y="65.122154"
889+ x="-254.32814"
890+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
891+ xml:space="preserve"><tspan
892+ id="tspan936-2-44-8"
893+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
894+ y="65.122154"
895+ x="-254.32814"
896+ sodipodi:role="line">OPTC</tspan></text>
897+ <rect
898+ ry="2.4256708e-06"
899+ y="20.805576"
900+ x="-269.46042"
901+ height="83.865906"
902+ width="30.277332"
903+ id="rect834-5-0-3-9"
904+ style="fill:none;stroke:#000000;stroke-width:0.97745234;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
905+ </g>
906+ <path
907+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-2)"
908+ d="m -154.34485,32.86192 h 10.61353"
909+ id="path1171-3-8-6"
910+ inkscape:connector-curvature="0" />
911+ <path
912+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-2-4)"
913+ d="m -154.34485,89.891298 h 10.61353"
914+ id="path1171-3-8-6-5"
915+ inkscape:connector-curvature="0" />
916+ <text
917+ xml:space="preserve"
918+ style="font-style:normal;font-weight:normal;font-size:3.17499995px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
919+ x="-178.18404"
920+ y="62.072891"
921+ id="text8862-5-8-6-0"><tspan
922+ sodipodi:role="line"
923+ id="tspan8860-9-4-5-4"
924+ x="-178.18404"
925+ y="62.072891"
926+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.11111069px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;stroke-width:0.26458332">...</tspan></text>
927+ <path
928+ style="fill:#000000;stroke:#000000;stroke-width:0.96187615;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-8)"
929+ d="m -335.20986,59.030276 h 14.20296"
930+ id="path1171-17"
931+ inkscape:connector-curvature="0" />
932+ <text
933+ xml:space="preserve"
934+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
935+ x="-349.77686"
936+ y="61.404655"
937+ id="text838-2"><tspan
938+ sodipodi:role="line"
939+ id="tspan836-7"
940+ x="-349.77686"
941+ y="61.404655"
942+ style="stroke-width:0.16370411">SDP</tspan></text>
943+ <path
944+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291667, 1.32291667;stroke-dashoffset:0;stroke-opacity:1"
945+ d="M -279.04164,107.86706 V 0.89985833"
946+ id="path11907"
947+ inkscape:connector-curvature="0" />
948+ <path
949+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.3229167, 1.3229167;stroke-dashoffset:0;stroke-opacity:1"
950+ d="M -235.57438,107.86707 V 0.89985663"
951+ id="path11907-6-1"
952+ inkscape:connector-curvature="0" />
953+ <path
954+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291671, 1.32291671;stroke-dashoffset:0;stroke-opacity:1"
955+ d="M -149.96277,107.86707 V 0.89985223"
956+ id="path11907-6-1-0"
957+ inkscape:connector-curvature="0" />
958+ <text
959+ xml:space="preserve"
960+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
961+ x="-257.38275"
962+ y="5.003336"
963+ id="text838-6"><tspan
964+ sodipodi:role="line"
965+ id="tspan836-1"
966+ x="-257.38275"
967+ y="5.003336"
968+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411">DPPCLK</tspan><tspan
969+ sodipodi:role="line"
970+ x="-257.38275"
971+ y="13.188541"
972+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411"
973+ id="tspan12658">267.958Mhz</tspan></text>
974+ <text
975+ xml:space="preserve"
976+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
977+ x="-192.85298"
978+ y="5.003336"
979+ id="text838-6-5"><tspan
980+ sodipodi:role="line"
981+ id="tspan836-1-9"
982+ x="-192.85298"
983+ y="5.003336"
984+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411">DISPCLK</tspan><tspan
985+ sodipodi:role="line"
986+ x="-192.85298"
987+ y="13.188541"
988+ style="font-size:4.93888903px;text-align:center;text-anchor:middle;stroke-width:0.16370411"
989+ id="tspan12662">541.275 Mhz</tspan></text>
990+ <text
991+ xml:space="preserve"
992+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
993+ x="-302.03766"
994+ y="5.003336"
995+ id="text838-6-5-4"><tspan
996+ sodipodi:role="line"
997+ id="tspan836-1-9-9"
998+ x="-312.23135"
999+ y="5.003336"
1000+ style="font-size:4.93888903px;stroke-width:0.16370411;text-anchor:middle;text-align:center">DCFCLK</tspan><tspan
1001+ sodipodi:role="line"
1002+ x="-312.23135"
1003+ y="13.188541"
1004+ style="font-size:4.93888903px;stroke-width:0.16370411;text-anchor:middle;text-align:center"
1005+ id="tspan12660">506 Mhz</tspan></text>
1006+ <text
1007+ xml:space="preserve"
1008+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
1009+ x="-96.075348"
1010+ y="4.568048"
1011+ id="text838-6-5-0"><tspan
1012+ sodipodi:role="line"
1013+ id="tspan836-1-9-91"
1014+ x="-96.075348"
1015+ y="4.568048"
1016+ style="font-size:4.93888903px;stroke-width:0.16370411">SymCLK</tspan></text>
1017+ <g
1018+ id="g7343-2-2-7"
1019+ transform="translate(168.61494,-1.1484419)">
1020+ <text
1021+ id="text838-5-6-54-0-7"
1022+ y="65.122154"
1023+ x="-254.32814"
1024+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
1025+ xml:space="preserve"><tspan
1026+ id="tspan936-2-44-8-1"
1027+ style="text-align:center;text-anchor:middle;stroke-width:0.16370411"
1028+ y="65.122154"
1029+ x="-254.32814"
1030+ sodipodi:role="line">DIO</tspan></text>
1031+ <rect
1032+ ry="2.4256708e-06"
1033+ y="20.805576"
1034+ x="-269.46042"
1035+ height="83.865906"
1036+ width="30.277332"
1037+ id="rect834-5-0-3-9-1"
1038+ style="fill:none;stroke:#000000;stroke-width:0.97745234;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none" />
1039+ </g>
1040+ <path
1041+ style="fill:none;stroke:#000000;stroke-width:1.32291663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.32291672, 1.32291672;stroke-dashoffset:0;stroke-opacity:1"
1042+ d="M -108.38539,107.86707 V 0.89985092"
1043+ id="path11907-6-1-0-5"
1044+ inkscape:connector-curvature="0" />
1045+ <text
1046+ xml:space="preserve"
1047+ style="font-style:normal;font-weight:normal;font-size:6.54816437px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.16370411"
1048+ x="-143.52292"
1049+ y="5.0467439"
1050+ id="text838-6-5-0-9"><tspan
1051+ sodipodi:role="line"
1052+ id="tspan836-1-9-91-7"
1053+ x="-143.52292"
1054+ y="5.0467439"
1055+ style="font-size:4.93888903px;stroke-width:0.16370411">VirtualPCLK</tspan></text>
1056+ <path
1057+ style="fill:none;stroke:#ff0000;stroke-width:0.83149505;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-94-6-0-2-7)"
1058+ d="m -112.24183,60.747629 h 10.61353"
1059+ id="path1171-3-8-6-7"
1060+ inkscape:connector-curvature="0" />
1061+ </g>
1062+</svg>
Documentation/gpu/amdgpu/display/single-display-mpo-multi-video.svg+339−0
@@ -0,0 +1,339 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="112.16296mm"
13+ height="93.314507mm"
14+ viewBox="0 0 112.16296 93.314508"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="single-display-mpo-multi-video.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="TriangleOutL"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="TriangleOutL"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path1133"
31+ d="M 5.77,0 -2.88,5 V -5 Z"
32+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
33+ transform="scale(0.8)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="Arrow1Send"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="Arrow1Send"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ id="path1006"
46+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
47+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
48+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
49+ inkscape:connector-curvature="0" />
50+ </marker>
51+ <marker
52+ inkscape:stockid="TriangleOutL"
53+ orient="auto"
54+ refY="0"
55+ refX="0"
56+ id="TriangleOutL-6"
57+ style="overflow:visible"
58+ inkscape:isstock="true">
59+ <path
60+ inkscape:connector-curvature="0"
61+ id="path1133-0"
62+ d="M 5.77,0 -2.88,5 V -5 Z"
63+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
64+ transform="scale(0.8)" />
65+ </marker>
66+ </defs>
67+ <sodipodi:namedview
68+ id="base"
69+ pagecolor="#ffffff"
70+ bordercolor="#666666"
71+ borderopacity="1.0"
72+ inkscape:pageopacity="0.0"
73+ inkscape:pageshadow="2"
74+ inkscape:zoom="1.979899"
75+ inkscape:cx="255.95284"
76+ inkscape:cy="222.25473"
77+ inkscape:document-units="mm"
78+ inkscape:current-layer="layer1"
79+ showgrid="false"
80+ inkscape:window-width="1514"
81+ inkscape:window-height="1376"
82+ inkscape:window-x="1046"
83+ inkscape:window-y="27"
84+ inkscape:window-maximized="0"
85+ fit-margin-top="0"
86+ fit-margin-left="0"
87+ fit-margin-right="0"
88+ fit-margin-bottom="0" />
89+ <metadata
90+ id="metadata5">
91+ <rdf:RDF>
92+ <cc:Work
93+ rdf:about="">
94+ <dc:format>image/svg+xml</dc:format>
95+ <dc:type
96+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
97+ <dc:title></dc:title>
98+ </cc:Work>
99+ </rdf:RDF>
100+ </metadata>
101+ <g
102+ inkscape:label="Layer 1"
103+ inkscape:groupmode="layer"
104+ id="layer1"
105+ transform="translate(26.189925,5.2546503)">
106+ <text
107+ xml:space="preserve"
108+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
109+ x="-2.2053311"
110+ y="32.839729"
111+ id="text844"><tspan
112+ sodipodi:role="line"
113+ x="-2.2053313"
114+ y="32.839729"
115+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
116+ id="tspan846">Video Buffer (YUV)</tspan></text>
117+ <text
118+ xml:space="preserve"
119+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
120+ x="30.867918"
121+ y="87.638779"
122+ id="text844-2"><tspan
123+ sodipodi:role="line"
124+ x="30.867918"
125+ y="87.638779"
126+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
127+ id="tspan846-0">CRTC Output</tspan></text>
128+ <rect
129+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.53249496;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:1.59748484, 0.53249495;stroke-dashoffset:0"
130+ id="rect969"
131+ width="111.63046"
132+ height="44.238331"
133+ x="-25.923677"
134+ y="-4.9884028" />
135+ <text
136+ xml:space="preserve"
137+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
138+ x="48.037342"
139+ y="45.781586"
140+ id="text844-2-9"><tspan
141+ sodipodi:role="line"
142+ x="48.037342"
143+ y="45.781586"
144+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
145+ id="tspan2868">Hardware Composition</tspan></text>
146+ <path
147+ style="fill:none;stroke:#000000;stroke-width:0.48997903;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#TriangleOutL)"
148+ d="m 32.66992,40.326865 v 9.760144"
149+ id="path989"
150+ inkscape:connector-curvature="0" />
151+ <g
152+ id="g4447"
153+ style="stroke:#000000">
154+ <rect
155+ ry="0"
156+ y="0.23764905"
157+ x="-23.784248"
158+ height="29.48851"
159+ width="48.988979"
160+ id="rect836"
161+ style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
162+ <rect
163+ ry="0"
164+ y="3.8184125"
165+ x="-20.589451"
166+ height="6.9794898"
167+ width="11.594959"
168+ id="rect836-2-6"
169+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891468;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
170+ <rect
171+ ry="0"
172+ y="3.8184123"
173+ x="-5.6613555"
174+ height="6.9794903"
175+ width="11.594959"
176+ id="rect836-2-6-1"
177+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
178+ <rect
179+ ry="0"
180+ y="3.8184121"
181+ x="10.374816"
182+ height="6.9794908"
183+ width="11.594959"
184+ id="rect836-2-6-1-8"
185+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
186+ <rect
187+ ry="0"
188+ y="18.386644"
189+ x="-20.341679"
190+ height="6.9794903"
191+ width="11.594959"
192+ id="rect836-2-6-7"
193+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
194+ <rect
195+ ry="0"
196+ y="18.386644"
197+ x="-5.4135842"
198+ height="6.9794908"
199+ width="11.594959"
200+ id="rect836-2-6-1-9"
201+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
202+ <rect
203+ ry="0"
204+ y="18.386644"
205+ x="10.622585"
206+ height="6.9794908"
207+ width="11.594959"
208+ id="rect836-2-6-1-8-2"
209+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
210+ </g>
211+ <rect
212+ style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
213+ id="rect836-2"
214+ width="48.988979"
215+ height="29.48851"
216+ x="31.367332"
217+ y="0.45039755"
218+ ry="0" />
219+ <rect
220+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891468;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
221+ id="rect836-2-6-3"
222+ width="11.594959"
223+ height="6.9794898"
224+ x="34.56213"
225+ y="4.0311608"
226+ ry="0" />
227+ <rect
228+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
229+ id="rect836-2-6-1-7"
230+ width="11.594959"
231+ height="6.9794903"
232+ x="49.490223"
233+ y="4.0311608"
234+ ry="0" />
235+ <rect
236+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
237+ id="rect836-2-6-1-8-5"
238+ width="11.594959"
239+ height="6.9794908"
240+ x="65.526398"
241+ y="4.0311604"
242+ ry="0" />
243+ <rect
244+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
245+ id="rect836-2-6-7-9"
246+ width="11.594959"
247+ height="6.9794903"
248+ x="34.809902"
249+ y="18.599392"
250+ ry="0" />
251+ <rect
252+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
253+ id="rect836-2-6-1-9-2"
254+ width="11.594959"
255+ height="6.9794908"
256+ x="49.737995"
257+ y="18.599392"
258+ ry="0" />
259+ <rect
260+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
261+ id="rect836-2-6-1-8-2-2"
262+ width="11.594959"
263+ height="6.9794908"
264+ x="65.774162"
265+ y="18.599392"
266+ ry="0" />
267+ <g
268+ id="g4562"
269+ transform="translate(0,11.22532)">
270+ <rect
271+ ry="0"
272+ y="43.21352"
273+ x="5.9767256"
274+ height="29.48851"
275+ width="48.988979"
276+ id="rect836-97"
277+ style="fill:#808080;fill-opacity:1;stroke:#808080;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
278+ <rect
279+ ry="0"
280+ y="46.794285"
281+ x="9.1715231"
282+ height="6.9794898"
283+ width="11.594959"
284+ id="rect836-2-6-36"
285+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891468;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
286+ <rect
287+ ry="0"
288+ y="46.794285"
289+ x="24.099619"
290+ height="6.9794903"
291+ width="11.594959"
292+ id="rect836-2-6-1-1"
293+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
294+ <rect
295+ ry="0"
296+ y="46.794285"
297+ x="40.135792"
298+ height="6.9794908"
299+ width="11.594959"
300+ id="rect836-2-6-1-8-29"
301+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
302+ <rect
303+ ry="0"
304+ y="61.362514"
305+ x="9.4192953"
306+ height="6.9794903"
307+ width="11.594959"
308+ id="rect836-2-6-7-3"
309+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
310+ <rect
311+ ry="0"
312+ y="61.362514"
313+ x="24.347389"
314+ height="6.9794908"
315+ width="11.594959"
316+ id="rect836-2-6-1-9-1"
317+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
318+ <rect
319+ ry="0"
320+ y="61.362514"
321+ x="40.38356"
322+ height="6.9794908"
323+ width="11.594959"
324+ id="rect836-2-6-1-8-2-9"
325+ style="fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.14891469;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
326+ </g>
327+ <text
328+ xml:space="preserve"
329+ style="font-style:normal;font-weight:normal;font-size:0.82813358px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
330+ x="57.012939"
331+ y="33.603645"
332+ id="text844-4"><tspan
333+ sodipodi:role="line"
334+ x="57.012939"
335+ y="33.603645"
336+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
337+ id="tspan846-7">Desktop Buffer (ARGB)</tspan></text>
338+ </g>
339+</svg>
Documentation/gpu/amdgpu/display/single-display-mpo.svg+266−0
@@ -0,0 +1,266 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+<!-- Created with Inkscape (http://www.inkscape.org/) -->
3+
4+<svg
5+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6+ xmlns:cc="http://creativecommons.org/ns#"
7+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8+ xmlns:svg="http://www.w3.org/2000/svg"
9+ xmlns="http://www.w3.org/2000/svg"
10+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12+ width="148.71147mm"
13+ height="38.356358mm"
14+ viewBox="0 0 148.71148 38.356358"
15+ version="1.1"
16+ id="svg8"
17+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18+ sodipodi:docname="single-display-mpo.svg">
19+ <defs
20+ id="defs2">
21+ <marker
22+ inkscape:stockid="TriangleOutL"
23+ orient="auto"
24+ refY="0"
25+ refX="0"
26+ id="TriangleOutL"
27+ style="overflow:visible"
28+ inkscape:isstock="true">
29+ <path
30+ id="path1133"
31+ d="M 5.77,0 -2.88,5 V -5 Z"
32+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
33+ transform="scale(0.8)"
34+ inkscape:connector-curvature="0" />
35+ </marker>
36+ <marker
37+ inkscape:stockid="Arrow1Send"
38+ orient="auto"
39+ refY="0"
40+ refX="0"
41+ id="Arrow1Send"
42+ style="overflow:visible"
43+ inkscape:isstock="true">
44+ <path
45+ id="path1006"
46+ d="M 0,0 5,-5 -12.5,0 5,5 Z"
47+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
48+ transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
49+ inkscape:connector-curvature="0" />
50+ </marker>
51+ <marker
52+ inkscape:stockid="TriangleOutL"
53+ orient="auto"
54+ refY="0"
55+ refX="0"
56+ id="TriangleOutL-6"
57+ style="overflow:visible"
58+ inkscape:isstock="true">
59+ <path
60+ inkscape:connector-curvature="0"
61+ id="path1133-0"
62+ d="M 5.77,0 -2.88,5 V -5 Z"
63+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
64+ transform="scale(0.8)" />
65+ </marker>
66+ </defs>
67+ <sodipodi:namedview
68+ id="base"
69+ pagecolor="#ffffff"
70+ bordercolor="#666666"
71+ borderopacity="1.0"
72+ inkscape:pageopacity="0.0"
73+ inkscape:pageshadow="2"
74+ inkscape:zoom="1.979899"
75+ inkscape:cx="266.07058"
76+ inkscape:cy="81.254796"
77+ inkscape:document-units="mm"
78+ inkscape:current-layer="layer1"
79+ showgrid="false"
80+ inkscape:window-width="1514"
81+ inkscape:window-height="1376"
82+ inkscape:window-x="1046"
83+ inkscape:window-y="27"
84+ inkscape:window-maximized="0"
85+ fit-margin-top="0"
86+ fit-margin-left="0"
87+ fit-margin-right="0"
88+ fit-margin-bottom="0" />
89+ <metadata
90+ id="metadata5">
91+ <rdf:RDF>
92+ <cc:Work
93+ rdf:about="">
94+ <dc:format>image/svg+xml</dc:format>
95+ <dc:type
96+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
97+ <dc:title></dc:title>
98+ </cc:Work>
99+ </rdf:RDF>
100+ </metadata>
101+ <g
102+ inkscape:label="Layer 1"
103+ inkscape:groupmode="layer"
104+ id="layer1"
105+ transform="translate(26.323559,-14.790568)">
106+ <rect
107+ style="fill:#999999;fill-opacity:1;stroke:#999999;stroke-width:0.62916809;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
108+ id="rect836"
109+ width="48.988979"
110+ height="29.48851"
111+ x="4.9472256"
112+ y="17.075632"
113+ ry="0" />
114+ <g
115+ id="g905"
116+ transform="matrix(0.26082945,0,0,0.26082945,-26.950235,-0.99631462)">
117+ <rect
118+ y="67.568451"
119+ x="12.473214"
120+ height="60.854164"
121+ width="102.43154"
122+ id="rect834"
123+ style="fill:#008000;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
124+ <path
125+ inkscape:transform-center-y="-3.581986e-06"
126+ inkscape:transform-center-x="-3.3106064"
127+ d="m 73.620805,97.995537 -9.931819,5.734143 -9.931819,5.73413 0,-11.468274 0,-11.468276 9.931819,5.734139 z"
128+ inkscape:randomized="0"
129+ inkscape:rounded="0"
130+ inkscape:flatsided="false"
131+ sodipodi:arg2="1.0471976"
132+ sodipodi:arg1="0"
133+ sodipodi:r2="6.6212125"
134+ sodipodi:r1="13.242425"
135+ sodipodi:cy="97.995537"
136+ sodipodi:cx="60.37838"
137+ sodipodi:sides="3"
138+ id="path840"
139+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.22854495;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
140+ sodipodi:type="star" />
141+ </g>
142+ <text
143+ xml:space="preserve"
144+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
145+ x="-10.357052"
146+ y="34.176075"
147+ id="text844"><tspan
148+ sodipodi:role="line"
149+ id="tspan842"
150+ x="-10.357052"
151+ y="34.176075"
152+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112">Video Buffer (YUV)</tspan><tspan
153+ sodipodi:role="line"
154+ x="-10.357052"
155+ y="36.706482"
156+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
157+ id="tspan846">DRM PRIMARY PLANE</tspan></text>
158+ <rect
159+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.5216589;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
160+ id="rect834-3"
161+ width="26.717165"
162+ height="15.872559"
163+ x="16.083126"
164+ y="23.883608" />
165+ <text
166+ xml:space="preserve"
167+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
168+ x="28.437061"
169+ y="49.158085"
170+ id="text844-6"><tspan
171+ sodipodi:role="line"
172+ x="28.437061"
173+ y="49.158085"
174+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
175+ id="tspan846-5">Desktop Buffer (ARGB)</tspan><tspan
176+ sodipodi:role="line"
177+ x="28.437061"
178+ y="51.688492"
179+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
180+ id="tspan886">DRM OVERLAY PLANE</tspan></text>
181+ <g
182+ id="g2874"
183+ transform="matrix(1.0858687,0,0,1.0858687,-4.5597909,-2.06277)">
184+ <rect
185+ ry="0"
186+ y="17.624969"
187+ x="71.504173"
188+ height="27.156607"
189+ width="45.115009"
190+ id="rect836-9"
191+ style="fill:#999999;fill-opacity:1;stroke:#999999;stroke-width:0.57941455;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0" />
192+ <g
193+ id="g905-5"
194+ transform="matrix(0.24020349,0,0,0.24020349,78.763353,7.664402)">
195+ <rect
196+ style="fill:#008000;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
197+ id="rect834-6"
198+ width="102.43154"
199+ height="60.854164"
200+ x="12.473214"
201+ y="67.568451" />
202+ <path
203+ sodipodi:type="star"
204+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.22854495;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0"
205+ id="path840-2"
206+ sodipodi:sides="3"
207+ sodipodi:cx="60.37838"
208+ sodipodi:cy="97.995537"
209+ sodipodi:r1="13.242425"
210+ sodipodi:r2="6.6212125"
211+ sodipodi:arg1="0"
212+ sodipodi:arg2="1.0471976"
213+ inkscape:flatsided="false"
214+ inkscape:rounded="0"
215+ inkscape:randomized="0"
216+ d="m 73.620805,97.995537 -9.931819,5.734143 -9.931819,5.73413 0,-11.468274 0,-11.468276 9.931819,5.734139 z"
217+ inkscape:transform-center-x="-3.3106064"
218+ inkscape:transform-center-y="-3.581986e-06" />
219+ </g>
220+ </g>
221+ <text
222+ xml:space="preserve"
223+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
224+ x="97.551666"
225+ y="50.221046"
226+ id="text844-2"><tspan
227+ sodipodi:role="line"
228+ x="97.551666"
229+ y="50.221046"
230+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
231+ id="tspan846-0">CRTC Output</tspan></text>
232+ <rect
233+ style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.42211887;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:1.26635657, 0.42211886;stroke-dashoffset:0"
234+ id="rect969"
235+ width="81.806648"
236+ height="37.934238"
237+ x="-26.112499"
238+ y="15.001627" />
239+ <text
240+ xml:space="preserve"
241+ style="font-style:normal;font-weight:normal;font-size:0.82813352px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.06901112"
242+ x="64.474419"
243+ y="31.883568"
244+ id="text844-2-9"><tspan
245+ sodipodi:role="line"
246+ x="64.474419"
247+ y="31.883568"
248+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
249+ id="tspan846-0-3">Hardware</tspan><tspan
250+ sodipodi:role="line"
251+ x="64.474419"
252+ y="34.413975"
253+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.02432632px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.06901112"
254+ id="tspan2868">Composition</tspan></text>
255+ <path
256+ style="fill:none;stroke:#000000;stroke-width:0.48997903;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#TriangleOutL)"
257+ d="m 57.401149,24.81643 h 9.760144"
258+ id="path989"
259+ inkscape:connector-curvature="0" />
260+ <path
261+ style="fill:none;stroke:#000000;stroke-width:0.48997903;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#TriangleOutL-6)"
262+ d="m 57.401149,41.794278 h 9.760144"
263+ id="path989-6"
264+ inkscape:connector-curvature="0" />
265+ </g>
266+</svg>
Documentation/gpu/amdgpu/driver-misc.rst+17−0
@@ -32,6 +32,23 @@ unique_id · 31 unmodified lines
3232 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
3333 :doc: unique_id
3434
35+Accelerated Processing Units (APU) Info
36+---------------------------------------
37+
38+.. csv-table::
39+ :header-rows: 1
40+ :widths: 3, 2, 2, 1, 1, 1
41+ :file: ./apu-asic-info-table.csv
42+
43+Discrete GPU Info
44+-----------------
45+
46+.. csv-table::
47+ :header-rows: 1
48+ :widths: 3, 2, 2, 1, 1, 1
49+ :file: ./dgpu-asic-info-table.csv
50+
51+
3552 GPU Memory Usage Information
3653 ============================
3754
Documentation/gpu/amdgpu/thermal.rst+17−1
@@ -72,7 +72,8 @@ card's RLC (RunList Controller) firmware powers off the gfx engine · 71 unmodified lines
7272 dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
7373 default on supported GPUs.
7474
75−Userspace can interact with GFXOFF through a debugfs interface:
75+Userspace can interact with GFXOFF through a debugfs interface (all values in
76+`uint32_t`, unless otherwise noted):
7677
7778 ``amdgpu_gfxoff``
7879 -----------------
@@ -104,3 +105,18 @@ Read it to check current GFXOFF's status of a GPU:: · 25 unmodified lines
104105 If GFXOFF is enabled, the value will be transitioning around [0, 3], always
105106 getting into 0 when possible. When it's disabled, it's always at 2. Returns
106107 ``-EINVAL`` if it's not supported.
108+
109+``amdgpu_gfxoff_count``
110+-----------------------
111+
112+Read it to get the total GFXOFF entry count at the time of query since system
113+power-up. The value is an `uint64_t` type, however, due to firmware limitations,
114+it can currently overflow as an `uint32_t`. *Only supported in vangogh*
115+
116+``amdgpu_gfxoff_residency``
117+---------------------------
118+
119+Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to
120+get average GFXOFF residency % multiplied by 100 during the last logging
121+interval. E.g. a value of 7854 means 78.54% of the time in the last logging
122+interval the GPU was in GFXOFF mode. *Only supported in vangogh*
Documentation/gpu/drm-kms-helpers.rst+4−4
@@ -122,13 +122,13 @@ format Helper Functions Reference · 121 unmodified lines
122122 .. kernel-doc:: drivers/gpu/drm/drm_format_helper.c
123123 :export:
124124
125−Framebuffer CMA Helper Functions Reference
125+Framebuffer DMA Helper Functions Reference
126126 ==========================================
127127
128−.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
129− :doc: framebuffer cma helper functions
128+.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
129+ :doc: framebuffer dma helper functions
130130
131−.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
131+.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c
132132 :export:
133133
134134 Framebuffer GEM Helper Reference
Documentation/gpu/drm-kms.rst+2−0
@@ -532,6 +532,8 @@ Standard Plane Properties · 531 unmodified lines
532532 .. kernel-doc:: drivers/gpu/drm/drm_plane.c
533533 :doc: standard plane properties
534534
535+.. _plane_composition_properties:
536+
535537 Plane Composition Properties
536538 ----------------------------
537539
Documentation/gpu/drm-mm.rst+8−8
@@ -300,12 +300,12 @@ Drivers that want to map the GEM object upfront instead of handling page · 299 unmodified lines
300300 faults can implement their own mmap file operation handler.
301301
302302 For platforms without MMU the GEM core provides a helper method
303−drm_gem_cma_get_unmapped_area(). The mmap() routines will call this to get a
303+drm_gem_dma_get_unmapped_area(). The mmap() routines will call this to get a
304304 proposed address for the mapping.
305305
306−To use drm_gem_cma_get_unmapped_area(), drivers must fill the struct
306+To use drm_gem_dma_get_unmapped_area(), drivers must fill the struct
307307 :c:type:`struct file_operations <file_operations>` get_unmapped_area field with
308−a pointer on drm_gem_cma_get_unmapped_area().
308+a pointer on drm_gem_dma_get_unmapped_area().
309309
310310 More detailed information about get_unmapped_area can be found in
311311 Documentation/admin-guide/mm/nommu-mmap.rst
@@ -355,16 +355,16 @@ GEM Function Reference · 43 unmodified lines
355355 .. kernel-doc:: drivers/gpu/drm/drm_gem.c
356356 :export:
357357
358−GEM CMA Helper Functions Reference
358+GEM DMA Helper Functions Reference
359359 ----------------------------------
360360
361−.. kernel-doc:: drivers/gpu/drm/drm_gem_cma_helper.c
362− :doc: cma helpers
361+.. kernel-doc:: drivers/gpu/drm/drm_gem_dma_helper.c
362+ :doc: dma helpers
363363
364−.. kernel-doc:: include/drm/drm_gem_cma_helper.h
364+.. kernel-doc:: include/drm/drm_gem_dma_helper.h
365365 :internal:
366366
367−.. kernel-doc:: drivers/gpu/drm/drm_gem_cma_helper.c
367+.. kernel-doc:: drivers/gpu/drm/drm_gem_dma_helper.c
368368 :export:
369369
370370 GEM SHMEM Helper Function Reference
Documentation/gpu/todo.rst+0−36
@@ -322,18 +322,6 @@ Contact: Daniel Vetter, Noralf Tronnes · 321 unmodified lines
322322
323323 Level: Advanced
324324
325−idr_init_base()
326−---------------
327−
328−DRM core&drivers uses a lot of idr (integer lookup directories) for mapping
329−userspace IDs to internal objects, and in most places ID=0 means NULL and hence
330−is never used. Switching to idr_init_base() for these would make the idr more
331−efficient.
332−
333−Contact: Daniel Vetter
334−
335−Level: Starter
336−
337325 struct drm_gem_object_funcs
338326 ---------------------------
339327
@@ -343,19 +331,6 @@ converted, except for struct drm_driver.gem_prime_mmap. · 3 unmodified lines
343331
344332 Level: Intermediate
345333
346−Rename CMA helpers to DMA helpers
347−---------------------------------
348−
349−CMA (standing for contiguous memory allocator) is really a bit an accident of
350−what these were used for first, a much better name would be DMA helpers. In the
351−text these should even be called coherent DMA memory helpers (so maybe CDM, but
352−no one knows what that means) since underneath they just use dma_alloc_coherent.
353−
354−Contact: Laurent Pinchart, Daniel Vetter
355−
356−Level: Intermediate (mostly because it is a huge tasks without good partial
357−milestones, not technically itself that challenging)
358−
359334 connector register/unregister fixes
360335 -----------------------------------
361336
@@ -617,17 +592,6 @@ Contact: Javier Martinez Canillas <javierm@redhat.com> · 255 unmodified lines
617592
618593 Level: Intermediate
619594
620−Convert Kernel Selftests (kselftest) to KUnit tests when appropriate
621−--------------------------------------------------------------------
622−
623−Many of the `Kselftest <https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html>`_
624−tests in DRM could be converted to Kunit tests instead, since that framework
625−is more suitable for unit testing.
626−
627−Contact: Javier Martinez Canillas <javierm@redhat.com>
628−
629−Level: Starter
630−
631595 Enable trinity for DRM
632596 ----------------------
633597
Documentation/gpu/vkms.rst+1−6
@@ -118,15 +118,10 @@ Add Plane Features · 117 unmodified lines
118118
119119 There's lots of plane features we could add support for:
120120
121−- Clearing primary plane: clear primary plane before plane composition (at the
122− start) for correctness of pixel blend ops. It also guarantees alpha channel
123− is cleared in the target buffer for stable crc. [Good to get started]
124−
125121 - ARGB format on primary plane: blend the primary plane into background with
126122 translucent alpha.
127123
128−- Support when the primary plane isn't exactly matching the output size: blend
129− the primary plane into the black background.
124+- Add background color KMS property[Good to get started].
130125
131126 - Full alpha blending on all planes.
132127
MAINTAINERS+5−0
@@ -6431,6 +6431,11 @@ S: Maintained · 6430 unmodified lines
64316431 F: Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml
64326432 F: drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
64336433
6434+DRM DRIVER FOR GENERIC EDP PANELS
6435+R: Douglas Anderson <dianders@chromium.org>
6436+F: Documentation/devicetree/bindings/display/panel/panel-edp.yaml
6437+F: drivers/gpu/drm/panel/panel-edp.c
6438+
64346439 DRM DRIVER FOR GENERIC USB DISPLAY
64356440 M: Noralf Trønnes <noralf@tronnes.org>
64366441 S: Maintained
drivers/dma-buf/dma-fence.c+13−9
@@ -136,6 +136,10 @@ struct dma_fence *dma_fence_get_stub(void) · 135 unmodified lines
136136 &dma_fence_stub_ops,
137137 &dma_fence_stub_lock,
138138 0, 0);
139+
140+ set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
141+ &dma_fence_stub.flags);
142+
139143 dma_fence_signal_locked(&dma_fence_stub);
140144 }
141145 spin_unlock(&dma_fence_stub_lock);
@@ -161,6 +165,10 @@ struct dma_fence *dma_fence_allocate_private_stub(void) · 19 unmodified lines
161165 &dma_fence_stub_ops,
162166 &dma_fence_stub_lock,
163167 0, 0);
168+
169+ set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
170+ &dma_fence_stub.flags);
171+
164172 dma_fence_signal(fence);
165173
166174 return fence;
@@ -500,6 +508,8 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout) · 333 unmodified lines
500508
501509 __dma_fence_might_wait();
502510
511+ dma_fence_enable_sw_signaling(fence);
512+
503513 trace_dma_fence_wait_start(fence);
504514 if (fence->ops->wait)
505515 ret = fence->ops->wait(fence, intr, timeout);
@@ -601,9 +611,6 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence) · 95 unmodified lines
601611 {
602612 unsigned long flags;
603613
604− if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
605− return;
606−
607614 spin_lock_irqsave(fence->lock, flags);
608615 __dma_fence_enable_signaling(fence);
609616 spin_unlock_irqrestore(fence->lock, flags);
@@ -756,19 +763,16 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout) · 146 unmodified lines
756763 unsigned long flags;
757764 signed long ret = timeout ? timeout : 1;
758765
759− if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
760− return ret;
761−
762766 spin_lock_irqsave(fence->lock, flags);
763767
768+ if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
769+ goto out;
770+
764771 if (intr && signal_pending(current)) {
765772 ret = -ERESTARTSYS;
766773 goto out;
767774 }
768775
769− if (!__dma_fence_enable_signaling(fence))
770− goto out;
771−
772776 if (!timeout) {
773777 ret = 0;
774778 goto out;
drivers/dma-buf/st-dma-fence-chain.c+4−0
@@ -87,6 +87,8 @@ static int sanitycheck(void *arg) · 86 unmodified lines
8787 if (!chain)
8888 err = -ENOMEM;
8989
90+ dma_fence_enable_sw_signaling(chain);
91+
9092 dma_fence_signal(f);
9193 dma_fence_put(f);
9294
@@ -143,6 +145,8 @@ static int fence_chains_init(struct fence_chains *fc, unsigned int count, · 50 unmodified lines
143145 }
144146
145147 fc->tail = fc->chains[i];
148+
149+ dma_fence_enable_sw_signaling(fc->chains[i]);
146150 }
147151
148152 fc->chain_length = i;
drivers/dma-buf/st-dma-fence-unwrap.c+22−0
@@ -102,6 +102,8 @@ static int sanitycheck(void *arg) · 101 unmodified lines
102102 if (!f)
103103 return -ENOMEM;
104104
105+ dma_fence_enable_sw_signaling(f);
106+
105107 array = mock_array(1, f);
106108 if (!array)
107109 return -ENOMEM;
@@ -124,12 +126,16 @@ static int unwrap_array(void *arg) · 16 unmodified lines
124126 if (!f1)
125127 return -ENOMEM;
126128
129+ dma_fence_enable_sw_signaling(f1);
130+
127131 f2 = mock_fence();
128132 if (!f2) {
129133 dma_fence_put(f1);
130134 return -ENOMEM;
131135 }
132136
137+ dma_fence_enable_sw_signaling(f2);
138+
133139 array = mock_array(2, f1, f2);
134140 if (!array)
135141 return -ENOMEM;
@@ -164,12 +170,16 @@ static int unwrap_chain(void *arg) · 28 unmodified lines
164170 if (!f1)
165171 return -ENOMEM;
166172
173+ dma_fence_enable_sw_signaling(f1);
174+
167175 f2 = mock_fence();
168176 if (!f2) {
169177 dma_fence_put(f1);
170178 return -ENOMEM;
171179 }
172180
181+ dma_fence_enable_sw_signaling(f2);
182+
173183 chain = mock_chain(f1, f2);
174184 if (!chain)
175185 return -ENOMEM;
@@ -204,12 +214,16 @@ static int unwrap_chain_array(void *arg) · 28 unmodified lines
204214 if (!f1)
205215 return -ENOMEM;
206216
217+ dma_fence_enable_sw_signaling(f1);
218+
207219 f2 = mock_fence();
208220 if (!f2) {
209221 dma_fence_put(f1);
210222 return -ENOMEM;
211223 }
212224
225+ dma_fence_enable_sw_signaling(f2);
226+
213227 array = mock_array(2, f1, f2);
214228 if (!array)
215229 return -ENOMEM;
@@ -248,12 +262,16 @@ static int unwrap_merge(void *arg) · 32 unmodified lines
248262 if (!f1)
249263 return -ENOMEM;
250264
265+ dma_fence_enable_sw_signaling(f1);
266+
251267 f2 = mock_fence();
252268 if (!f2) {
253269 err = -ENOMEM;
254270 goto error_put_f1;
255271 }
256272
273+ dma_fence_enable_sw_signaling(f2);
274+
257275 f3 = dma_fence_unwrap_merge(f1, f2);
258276 if (!f3) {
259277 err = -ENOMEM;
@@ -296,10 +314,14 @@ static int unwrap_merge_complex(void *arg) · 36 unmodified lines
296314 if (!f1)
297315 return -ENOMEM;
298316
317+ dma_fence_enable_sw_signaling(f1);
318+
299319 f2 = mock_fence();
300320 if (!f2)
301321 goto error_put_f1;
302322
323+ dma_fence_enable_sw_signaling(f2);
324+
303325 f3 = dma_fence_unwrap_merge(f1, f2);
304326 if (!f3)
305327 goto error_put_f2;
drivers/dma-buf/st-dma-fence.c+16−0
@@ -102,6 +102,8 @@ static int sanitycheck(void *arg) · 101 unmodified lines
102102 if (!f)
103103 return -ENOMEM;
104104
105+ dma_fence_enable_sw_signaling(f);
106+
105107 dma_fence_signal(f);
106108 dma_fence_put(f);
107109
@@ -117,6 +119,8 @@ static int test_signaling(void *arg) · 9 unmodified lines
117119 if (!f)
118120 return -ENOMEM;
119121
122+ dma_fence_enable_sw_signaling(f);
123+
120124 if (dma_fence_is_signaled(f)) {
121125 pr_err("Fence unexpectedly signaled on creation\n");
122126 goto err_free;
@@ -190,6 +194,8 @@ static int test_late_add_callback(void *arg) · 67 unmodified lines
190194 if (!f)
191195 return -ENOMEM;
192196
197+ dma_fence_enable_sw_signaling(f);
198+
193199 dma_fence_signal(f);
194200
195201 if (!dma_fence_add_callback(f, &cb.cb, simple_callback)) {
@@ -282,6 +288,8 @@ static int test_status(void *arg) · 86 unmodified lines
282288 if (!f)
283289 return -ENOMEM;
284290
291+ dma_fence_enable_sw_signaling(f);
292+
285293 if (dma_fence_get_status(f)) {
286294 pr_err("Fence unexpectedly has signaled status on creation\n");
287295 goto err_free;
@@ -308,6 +316,8 @@ static int test_error(void *arg) · 20 unmodified lines
308316 if (!f)
309317 return -ENOMEM;
310318
319+ dma_fence_enable_sw_signaling(f);
320+
311321 dma_fence_set_error(f, -EIO);
312322
313323 if (dma_fence_get_status(f)) {
@@ -337,6 +347,8 @@ static int test_wait(void *arg) · 23 unmodified lines
337347 if (!f)
338348 return -ENOMEM;
339349
350+ dma_fence_enable_sw_signaling(f);
351+
340352 if (dma_fence_wait_timeout(f, false, 0) != -ETIME) {
341353 pr_err("Wait reported complete before being signaled\n");
342354 goto err_free;
@@ -379,6 +391,8 @@ static int test_wait_timeout(void *arg) · 36 unmodified lines
379391 if (!wt.f)
380392 return -ENOMEM;
381393
394+ dma_fence_enable_sw_signaling(wt.f);
395+
382396 if (dma_fence_wait_timeout(wt.f, false, 1) != -ETIME) {
383397 pr_err("Wait reported complete before being signaled\n");
384398 goto err_free;
@@ -458,6 +472,8 @@ static int thread_signal_callback(void *arg) · 73 unmodified lines
458472 break;
459473 }
460474
475+ dma_fence_enable_sw_signaling(f1);
476+
461477 rcu_assign_pointer(t->fences[t->id], f1);
462478 smp_wmb();
463479
drivers/dma-buf/st-dma-resv.c+10−0
@@ -45,6 +45,8 @@ static int sanitycheck(void *arg) · 44 unmodified lines
4545 if (!f)
4646 return -ENOMEM;
4747
48+ dma_fence_enable_sw_signaling(f);
49+
4850 dma_fence_signal(f);
4951 dma_fence_put(f);
5052
@@ -69,6 +71,8 @@ static int test_signaling(void *arg) · 18 unmodified lines
6971 if (!f)
7072 return -ENOMEM;
7173
74+ dma_fence_enable_sw_signaling(f);
75+
7276 dma_resv_init(&resv);
7377 r = dma_resv_lock(&resv, NULL);
7478 if (r) {
@@ -114,6 +118,8 @@ static int test_for_each(void *arg) · 39 unmodified lines
114118 if (!f)
115119 return -ENOMEM;
116120
121+ dma_fence_enable_sw_signaling(f);
122+
117123 dma_resv_init(&resv);
118124 r = dma_resv_lock(&resv, NULL);
119125 if (r) {
@@ -173,6 +179,8 @@ static int test_for_each_unlocked(void *arg) · 53 unmodified lines
173179 if (!f)
174180 return -ENOMEM;
175181
182+ dma_fence_enable_sw_signaling(f);
183+
176184 dma_resv_init(&resv);
177185 r = dma_resv_lock(&resv, NULL);
178186 if (r) {
@@ -244,6 +252,8 @@ static int test_get_fences(void *arg) · 65 unmodified lines
244252 if (!f)
245253 return -ENOMEM;
246254
255+ dma_fence_enable_sw_signaling(f);
256+
247257 dma_resv_init(&resv);
248258 r = dma_resv_lock(&resv, NULL);
249259 if (r) {
drivers/dma-buf/sync_file.c+4−4
@@ -132,7 +132,7 @@ EXPORT_SYMBOL(sync_file_get_fence); · 131 unmodified lines
132132 char *sync_file_get_name(struct sync_file *sync_file, char *buf, int len)
133133 {
134134 if (sync_file->user_name[0]) {
135− strlcpy(buf, sync_file->user_name, len);
135+ strscpy(buf, sync_file->user_name, len);
136136 } else {
137137 struct dma_fence *fence = sync_file->fence;
138138
@@ -172,7 +172,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a, · 33 unmodified lines
172172 return NULL;
173173 }
174174 sync_file->fence = fence;
175− strlcpy(sync_file->user_name, name, sizeof(sync_file->user_name));
175+ strscpy(sync_file->user_name, name, sizeof(sync_file->user_name));
176176 return sync_file;
177177 }
178178
@@ -262,9 +262,9 @@ err_put_fd: · 83 unmodified lines
262262 static int sync_fill_fence_info(struct dma_fence *fence,
263263 struct sync_fence_info *info)
264264 {
265− strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
265+ strscpy(info->obj_name, fence->ops->get_timeline_name(fence),
266266 sizeof(info->obj_name));
267− strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
267+ strscpy(info->driver_name, fence->ops->get_driver_name(fence),
268268 sizeof(info->driver_name));
269269
270270 info->status = dma_fence_get_status(fence);
drivers/dma-buf/udmabuf.c+6−3
@@ -124,17 +124,20 @@ static int begin_cpu_udmabuf(struct dma_buf *buf, · 123 unmodified lines
124124 {
125125 struct udmabuf *ubuf = buf->priv;
126126 struct device *dev = ubuf->device->this_device;
127+ int ret = 0;
127128
128129 if (!ubuf->sg) {
129130 ubuf->sg = get_sg_table(dev, buf, direction);
130− if (IS_ERR(ubuf->sg))
131− return PTR_ERR(ubuf->sg);
131+ if (IS_ERR(ubuf->sg)) {
132+ ret = PTR_ERR(ubuf->sg);
133+ ubuf->sg = NULL;
134+ }
132135 } else {
133136 dma_sync_sg_for_cpu(dev, ubuf->sg->sgl, ubuf->sg->nents,
134137 direction);
135138 }
136139
137− return 0;
140+ return ret;
138141 }
139142
140143 static int end_cpu_udmabuf(struct dma_buf *buf,
drivers/firmware/sysfb.c+4−0
@@ -94,6 +94,10 @@ static __init int sysfb_init(void) · 93 unmodified lines
9494 name = "efi-framebuffer";
9595 else if (si->orig_video_isVGA == VIDEO_TYPE_VLFB)
9696 name = "vesa-framebuffer";
97+ else if (si->orig_video_isVGA == VIDEO_TYPE_VGAC)
98+ name = "vga-framebuffer";
99+ else if (si->orig_video_isVGA == VIDEO_TYPE_EGAC)
100+ name = "ega-framebuffer";
97101 else
98102 name = "platform-framebuffer";
99103
drivers/gpu/drm/Kconfig+6−19
@@ -31,6 +31,7 @@ menuconfig DRM · 30 unmodified lines
3131 config DRM_MIPI_DBI
3232 tristate
3333 depends on DRM
34+ select DRM_KMS_HELPER
3435
3536 config DRM_MIPI_DSI
3637 bool
@@ -50,10 +51,9 @@ config DRM_DEBUG_MM · 13 unmodified lines
5051
5152 If in doubt, say "N".
5253
53−config DRM_DEBUG_SELFTEST
54− tristate "kselftests for DRM"
55− depends on DRM
56− depends on DEBUG_KERNEL
54+config DRM_KUNIT_TEST
55+ tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
56+ depends on DRM && KUNIT
5757 select PRIME_NUMBERS
5858 select DRM_DISPLAY_DP_HELPER
5959 select DRM_DISPLAY_HELPER
@@ -61,19 +61,6 @@ config DRM_DEBUG_SELFTEST · 1 unmodified line
6161 select DRM_KMS_HELPER
6262 select DRM_BUDDY
6363 select DRM_EXPORT_FOR_TESTS if m
64− default n
65− help
66− This option provides kernel modules that can be used to run
67− various selftests on parts of the DRM api. This option is not
68− useful for distributions or general kernels, but only for kernel
69− developers working on DRM and associated drivers.
70−
71− If in doubt, say "N".
72−
73−config DRM_KUNIT_TEST
74− tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS
75− depends on DRM && KUNIT=y
76− select DRM_KMS_HELPER
7764 default KUNIT_ALL_TESTS
7865 help
7966 This builds unit tests for DRM. This option is not useful for
@@ -214,11 +201,11 @@ config DRM_TTM_HELPER · 134 unmodified lines
214201 help
215202 Helpers for ttm-based gem objects
216203
217−config DRM_GEM_CMA_HELPER
204+config DRM_GEM_DMA_HELPER
218205 tristate
219206 depends on DRM
220207 help
221− Choose this if you need the GEM CMA helper functions
208+ Choose this if you need the GEM DMA helper functions
222209
223210 config DRM_GEM_SHMEM_HELPER
224211 tristate
drivers/gpu/drm/Makefile+3−4
@@ -40,9 +40,9 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o · 39 unmodified lines
4040
4141 obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o
4242
43−drm_cma_helper-y := drm_gem_cma_helper.o
44−drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_cma_helper.o
45−obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o
43+drm_dma_helper-y := drm_gem_dma_helper.o
44+drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o
45+obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o
4646
4747 drm_shmem_helper-y := drm_gem_shmem_helper.o
4848 obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o
@@ -75,7 +75,6 @@ obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o · 26 unmodified lines
7575 # Drivers and the rest
7676 #
7777
78−obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/
7978 obj-$(CONFIG_DRM_KUNIT_TEST) += tests/
8079
8180 obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
drivers/gpu/drm/amd/amdgpu/Makefile+4−3
@@ -75,7 +75,7 @@ amdgpu-y += \ · 74 unmodified lines
7575 vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \
7676 vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o arct_reg_init.o mxgpu_nv.o \
7777 nbio_v7_2.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o soc21.o \
78− nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o
78+ sienna_cichlid.o nbio_v4_3.o hdp_v6_0.o nbio_v7_7.o hdp_v5_2.o lsdma_v6_0.o
7979
8080 # add DF block
8181 amdgpu-y += \
@@ -89,7 +89,7 @@ amdgpu-y += \ · 7 unmodified lines
8989 gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \
9090 gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o gfxhub_v2_1.o mmhub_v2_3.o \
9191 mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \
92− mmhub_v3_0_1.o
92+ mmhub_v3_0_1.o gfxhub_v3_0_3.o
9393
9494 # add UMC block
9595 amdgpu-y += \
@@ -134,7 +134,8 @@ amdgpu-y += \ · 38 unmodified lines
134134 gfx_v9_4_2.o \
135135 gfx_v10_0.o \
136136 imu_v11_0.o \
137− gfx_v11_0.o
137+ gfx_v11_0.o \
138+ imu_v11_0_3.o
138139
139140 # add async DMA block
140141 amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu.h+9−0
@@ -274,6 +274,9 @@ extern int amdgpu_vcnfw_log; · 273 unmodified lines
274274 #define AMDGPU_RESET_VCE (1 << 13)
275275 #define AMDGPU_RESET_VCE1 (1 << 14)
276276
277+#define AMDGPU_RESET_LEVEL_SOFT_RECOVERY (1 << 0)
278+#define AMDGPU_RESET_LEVEL_MODE2 (1 << 1)
279+
277280 /* max cursor sizes (in pixels) */
278281 #define CIK_CURSOR_WIDTH 128
279282 #define CIK_CURSOR_HEIGHT 128
@@ -882,6 +885,7 @@ struct amdgpu_device { · 602 unmodified lines
882885 u64 fence_context;
883886 unsigned num_rings;
884887 struct amdgpu_ring *rings[AMDGPU_MAX_RINGS];
888+ struct dma_fence __rcu *gang_submit;
885889 bool ib_pool_ready;
886890 struct amdgpu_sa_manager ib_pools[AMDGPU_IB_POOL_MAX];
887891 struct amdgpu_sched gpu_sched[AMDGPU_HW_IP_NUM][AMDGPU_RING_PRIO_MAX];
@@ -1060,6 +1064,9 @@ struct amdgpu_device { · 172 unmodified lines
10601064 uint32_t scpm_status;
10611065
10621066 struct work_struct reset_work;
1067+
1068+ uint32_t amdgpu_reset_level_mask;
1069+ bool job_hang;
10631070 };
10641071
10651072 static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)
@@ -1288,6 +1295,8 @@ u32 amdgpu_device_pcie_port_rreg(struct amdgpu_device *adev, · 222 unmodified lines
12881295 u32 reg);
12891296 void amdgpu_device_pcie_port_wreg(struct amdgpu_device *adev,
12901297 u32 reg, u32 v);
1298+struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,
1299+ struct dma_fence *gang);
12911300
12921301 /* atpx handler */
12931302 #if defined(CONFIG_VGA_SWITCHEROO)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c+13−4
@@ -1,3 +1,4 @@
1+// SPDX-License-Identifier: MIT
12 /*
23 * Copyright 2012 Advanced Micro Devices, Inc.
34 *
@@ -849,6 +850,7 @@ int amdgpu_acpi_init(struct amdgpu_device *adev) · 845 unmodified lines
849850 if (amdgpu_device_has_dc_support(adev)) {
850851 #if defined(CONFIG_DRM_AMD_DC)
851852 struct amdgpu_display_manager *dm = &adev->dm;
853+
852854 if (dm->backlight_dev[0])
853855 atif->bd = dm->backlight_dev[0];
854856 #endif
@@ -863,6 +865,7 @@ int amdgpu_acpi_init(struct amdgpu_device *adev) · 8 unmodified lines
863865 if ((enc->devices & (ATOM_DEVICE_LCD_SUPPORT)) &&
864866 enc->enc_priv) {
865867 struct amdgpu_encoder_atom_dig *dig = enc->enc_priv;
868+
866869 if (dig->bl_dev) {
867870 atif->bd = dig->bl_dev;
868871 break;
@@ -919,9 +922,9 @@ static bool amdgpu_atif_pci_probe_handle(struct pci_dev *pdev) · 50 unmodified lines
919922 return false;
920923
921924 status = acpi_get_handle(dhandle, "ATIF", &atif_handle);
922− if (ACPI_FAILURE(status)) {
925+ if (ACPI_FAILURE(status))
923926 return false;
924− }
927+
925928 amdgpu_acpi_priv.atif.handle = atif_handle;
926929 acpi_get_name(amdgpu_acpi_priv.atif.handle, ACPI_FULL_PATHNAME, &buffer);
927930 DRM_DEBUG_DRIVER("Found ATIF handle %s\n", acpi_method_name);
@@ -954,9 +957,9 @@ static bool amdgpu_atcs_pci_probe_handle(struct pci_dev *pdev) · 26 unmodified lines
954957 return false;
955958
956959 status = acpi_get_handle(dhandle, "ATCS", &atcs_handle);
957− if (ACPI_FAILURE(status)) {
960+ if (ACPI_FAILURE(status))
958961 return false;
959− }
962+
960963 amdgpu_acpi_priv.atcs.handle = atcs_handle;
961964 acpi_get_name(amdgpu_acpi_priv.atcs.handle, ACPI_FULL_PATHNAME, &buffer);
962965 DRM_DEBUG_DRIVER("Found ATCS handle %s\n", acpi_method_name);
@@ -1070,6 +1073,12 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) · 107 unmodified lines
10701073 (pm_suspend_target_state != PM_SUSPEND_TO_IDLE))
10711074 return false;
10721075
1076+ /*
1077+ * If ACPI_FADT_LOW_POWER_S0 is not set in the FADT, it is generally
1078+ * risky to do any special firmware-related preparations for entering
1079+ * S0ix even though the system is suspending to idle, so return false
1080+ * in that case.
1081+ */
10731082 if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) {
10741083 dev_warn_once(adev->dev,
10751084 "Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n"
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c+5−5
@@ -1,3 +1,4 @@
1+// SPDX-License-Identifier: MIT
12 /*
23 * Copyright 2014 Advanced Micro Devices, Inc.
34 *
@@ -130,11 +131,13 @@ static void amdgpu_amdkfd_reset_work(struct work_struct *work) · 126 unmodified lines
130131 kfd.reset_work);
131132
132133 struct amdgpu_reset_context reset_context;
134+
133135 memset(&reset_context, 0, sizeof(reset_context));
134136
135137 reset_context.method = AMD_RESET_METHOD_NONE;
136138 reset_context.reset_req_dev = adev;
137139 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
140+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
138141
139142 amdgpu_device_gpu_recover(adev, NULL, &reset_context);
140143 }
@@ -683,6 +686,7 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev, · 542 unmodified lines
683686 ib->length_dw = ib_len;
684687 /* This works for NO_HWS. TODO: need to handle without knowing VMID */
685688 job->vmid = vmid;
689+ job->num_ibs = 1;
686690
687691 ret = amdgpu_ib_schedule(ring, 1, ib, job, &f);
688692
@@ -752,11 +756,7 @@ void amdgpu_amdkfd_ras_poison_consumption_handler(struct amdgpu_device *adev, bo · 63 unmodified lines
752756 {
753757 struct ras_err_data err_data = {0, 0, 0, NULL};
754758
755− /* CPU MCA will handle page retirement if connected_to_cpu is 1 */
756− if (!adev->gmc.xgmi.connected_to_cpu)
757− amdgpu_umc_poison_handler(adev, &err_data, reset);
758− else if (reset)
759− amdgpu_amdkfd_gpu_reset(adev);
759+ amdgpu_umc_poison_handler(adev, &err_data, reset);
760760 }
761761
762762 bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c+19−11
@@ -1,3 +1,4 @@
1+// SPDX-License-Identifier: MIT
12 /*
23 * Copyright 2014-2018 Advanced Micro Devices, Inc.
34 *
@@ -297,7 +298,7 @@ static int amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo *bo, · 293 unmodified lines
297298 */
298299 replacement = dma_fence_get_stub();
299300 dma_resv_replace_fences(bo->tbo.base.resv, ef->base.context,
300− replacement, DMA_RESV_USAGE_READ);
301+ replacement, DMA_RESV_USAGE_BOOKKEEP);
301302 dma_fence_put(replacement);
302303 return 0;
303304 }
@@ -1390,8 +1391,9 @@ static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info, · 1086 unmodified lines
13901391 ret = dma_resv_reserve_fences(vm->root.bo->tbo.base.resv, 1);
13911392 if (ret)
13921393 goto reserve_shared_fail;
1393− amdgpu_bo_fence(vm->root.bo,
1394− &vm->process_info->eviction_fence->base, true);
1394+ dma_resv_add_fence(vm->root.bo->tbo.base.resv,
1395+ &vm->process_info->eviction_fence->base,
1396+ DMA_RESV_USAGE_BOOKKEEP);
13951397 amdgpu_bo_unreserve(vm->root.bo);
13961398
13971399 /* Update process info */
@@ -1612,6 +1614,7 @@ size_t amdgpu_amdkfd_get_available_memory(struct amdgpu_device *adev) · 214 unmodified lines
16121614 uint64_t reserved_for_pt =
16131615 ESTIMATE_PT_SIZE(amdgpu_amdkfd_total_mem_size);
16141616 size_t available;
1617+
16151618 spin_lock(&kfd_mem_limit.mem_limit_lock);
16161619 available = adev->gmc.real_vram_size
16171620 - adev->kfd.vram_used_aligned
@@ -1987,9 +1990,9 @@ int amdgpu_amdkfd_gpuvm_map_memory_to_gpu( · 369 unmodified lines
19871990 }
19881991
19891992 if (!amdgpu_ttm_tt_get_usermm(bo->tbo.ttm) && !bo->tbo.pin_count)
1990− amdgpu_bo_fence(bo,
1991− &avm->process_info->eviction_fence->base,
1992− true);
1993+ dma_resv_add_fence(bo->tbo.base.resv,
1994+ &avm->process_info->eviction_fence->base,
1995+ DMA_RESV_USAGE_BOOKKEEP);
19931996 ret = unreserve_bo_and_vms(&ctx, false, false);
19941997
19951998 goto out;
@@ -2216,7 +2219,7 @@ int amdgpu_amdkfd_gpuvm_get_vm_fault_info(struct amdgpu_device *adev, · 220 unmodified lines
22162219 {
22172220 if (atomic_read(&adev->gmc.vm_fault_info_updated) == 1) {
22182221 *mem = *adev->gmc.vm_fault_info;
2219− mb();
2222+ mb(); /* make sure read happened */
22202223 atomic_set(&adev->gmc.vm_fault_info_updated, 0);
22212224 }
22222225 return 0;
@@ -2758,15 +2761,18 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence **ef) · 535 unmodified lines
27582761 if (mem->bo->tbo.pin_count)
27592762 continue;
27602763
2761− amdgpu_bo_fence(mem->bo,
2762− &process_info->eviction_fence->base, true);
2764+ dma_resv_add_fence(mem->bo->tbo.base.resv,
2765+ &process_info->eviction_fence->base,
2766+ DMA_RESV_USAGE_BOOKKEEP);
27632767 }
27642768 /* Attach eviction fence to PD / PT BOs */
27652769 list_for_each_entry(peer_vm, &process_info->vm_list_head,
27662770 vm_list_node) {
27672771 struct amdgpu_bo *bo = peer_vm->root.bo;
27682772
2769− amdgpu_bo_fence(bo, &process_info->eviction_fence->base, true);
2773+ dma_resv_add_fence(bo->tbo.base.resv,
2774+ &process_info->eviction_fence->base,
2775+ DMA_RESV_USAGE_BOOKKEEP);
27702776 }
27712777
27722778 validate_map_fail:
@@ -2820,7 +2826,9 @@ int amdgpu_amdkfd_add_gws_to_process(void *info, void *gws, struct kgd_mem **mem · 47 unmodified lines
28202826 ret = dma_resv_reserve_fences(gws_bo->tbo.base.resv, 1);
28212827 if (ret)
28222828 goto reserve_shared_fail;
2823− amdgpu_bo_fence(gws_bo, &process_info->eviction_fence->base, true);
2829+ dma_resv_add_fence(gws_bo->tbo.base.resv,
2830+ &process_info->eviction_fence->base,
2831+ DMA_RESV_USAGE_BOOKKEEP);
28242832 amdgpu_bo_unreserve(gws_bo);
28252833 mutex_unlock(&(*mem)->process_info->lock);
28262834
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c+6−1
@@ -1674,10 +1674,12 @@ amdgpu_connector_add(struct amdgpu_device *adev, · 1673 unmodified lines
16741674 adev->mode_info.dither_property,
16751675 AMDGPU_FMT_DITHER_DISABLE);
16761676
1677− if (amdgpu_audio != 0)
1677+ if (amdgpu_audio != 0) {
16781678 drm_object_attach_property(&amdgpu_connector->base.base,
16791679 adev->mode_info.audio_property,
16801680 AMDGPU_AUDIO_AUTO);
1681+ amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
1682+ }
16811683
16821684 subpixel_order = SubPixelHorizontalRGB;
16831685 connector->interlace_allowed = true;
@@ -1799,6 +1801,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, · 115 unmodified lines
17991801 drm_object_attach_property(&amdgpu_connector->base.base,
18001802 adev->mode_info.audio_property,
18011803 AMDGPU_AUDIO_AUTO);
1804+ amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
18021805 }
18031806 drm_object_attach_property(&amdgpu_connector->base.base,
18041807 adev->mode_info.dither_property,
@@ -1852,6 +1855,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, · 47 unmodified lines
18521855 drm_object_attach_property(&amdgpu_connector->base.base,
18531856 adev->mode_info.audio_property,
18541857 AMDGPU_AUDIO_AUTO);
1858+ amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
18551859 }
18561860 drm_object_attach_property(&amdgpu_connector->base.base,
18571861 adev->mode_info.dither_property,
@@ -1902,6 +1906,7 @@ amdgpu_connector_add(struct amdgpu_device *adev, · 44 unmodified lines
19021906 drm_object_attach_property(&amdgpu_connector->base.base,
19031907 adev->mode_info.audio_property,
19041908 AMDGPU_AUDIO_AUTO);
1909+ amdgpu_connector->audio = AMDGPU_AUDIO_AUTO;
19051910 }
19061911 drm_object_attach_property(&amdgpu_connector->base.base,
19071912 adev->mode_info.dither_property,
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+898−844
@@ -39,9 +39,82 @@ · 38 unmodified lines
3939 #include "amdgpu_gem.h"
4040 #include "amdgpu_ras.h"
4141
42−static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
43− struct drm_amdgpu_cs_chunk_fence *data,
44− uint32_t *offset)
42+static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
43+ struct amdgpu_device *adev,
44+ struct drm_file *filp,
45+ union drm_amdgpu_cs *cs)
46+{
47+ struct amdgpu_fpriv *fpriv = filp->driver_priv;
48+
49+ if (cs->in.num_chunks == 0)
50+ return -EINVAL;
51+
52+ memset(p, 0, sizeof(*p));
53+ p->adev = adev;
54+ p->filp = filp;
55+
56+ p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id);
57+ if (!p->ctx)
58+ return -EINVAL;
59+
60+ if (atomic_read(&p->ctx->guilty)) {
61+ amdgpu_ctx_put(p->ctx);
62+ return -ECANCELED;
63+ }
64+ return 0;
65+}
66+
67+static int amdgpu_cs_job_idx(struct amdgpu_cs_parser *p,
68+ struct drm_amdgpu_cs_chunk_ib *chunk_ib)
69+{
70+ struct drm_sched_entity *entity;
71+ unsigned int i;
72+ int r;
73+
74+ r = amdgpu_ctx_get_entity(p->ctx, chunk_ib->ip_type,
75+ chunk_ib->ip_instance,
76+ chunk_ib->ring, &entity);
77+ if (r)
78+ return r;
79+
80+ /*
81+ * Abort if there is no run queue associated with this entity.
82+ * Possibly because of disabled HW IP.
83+ */
84+ if (entity->rq == NULL)
85+ return -EINVAL;
86+
87+ /* Check if we can add this IB to some existing job */
88+ for (i = 0; i < p->gang_size; ++i)
89+ if (p->entities[i] == entity)
90+ return i;
91+
92+ /* If not increase the gang size if possible */
93+ if (i == AMDGPU_CS_GANG_SIZE)
94+ return -EINVAL;
95+
96+ p->entities[i] = entity;
97+ p->gang_size = i + 1;
98+ return i;
99+}
100+
101+static int amdgpu_cs_p1_ib(struct amdgpu_cs_parser *p,
102+ struct drm_amdgpu_cs_chunk_ib *chunk_ib,
103+ unsigned int *num_ibs)
104+{
105+ int r;
106+
107+ r = amdgpu_cs_job_idx(p, chunk_ib);
108+ if (r < 0)
109+ return r;
110+
111+ ++(num_ibs[r]);
112+ return 0;
113+}
114+
115+static int amdgpu_cs_p1_user_fence(struct amdgpu_cs_parser *p,
116+ struct drm_amdgpu_cs_chunk_fence *data,
117+ uint32_t *offset)
45118 {
46119 struct drm_gem_object *gobj;
47120 struct amdgpu_bo *bo;
@@ -80,11 +153,11 @@ error_unref: · 32 unmodified lines
80153 return r;
81154 }
82155
83−static int amdgpu_cs_bo_handles_chunk(struct amdgpu_cs_parser *p,
84− struct drm_amdgpu_bo_list_in *data)
156+static int amdgpu_cs_p1_bo_handles(struct amdgpu_cs_parser *p,
157+ struct drm_amdgpu_bo_list_in *data)
85158 {
159+ struct drm_amdgpu_bo_list_entry *info;
86160 int r;
87− struct drm_amdgpu_bo_list_entry *info = NULL;
88161
89162 r = amdgpu_bo_create_list_entry_array(data, &info);
90163 if (r)
@@ -104,38 +177,25 @@ error_free: · 13 unmodified lines
104177 return r;
105178 }
106179
107−static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs *cs)
180+/* Copy the data from userspace and go over it the first time */
181+static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
182+ union drm_amdgpu_cs *cs)
108183 {
109184 struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
185+ unsigned int num_ibs[AMDGPU_CS_GANG_SIZE] = { };
110186 struct amdgpu_vm *vm = &fpriv->vm;
111187 uint64_t *chunk_array_user;
112188 uint64_t *chunk_array;
113− unsigned size, num_ibs = 0;
114189 uint32_t uf_offset = 0;
115− int i;
190+ unsigned int size;
116191 int ret;
192+ int i;
117193
118− if (cs->in.num_chunks == 0)
119− return -EINVAL;
120−
121− chunk_array = kvmalloc_array(cs->in.num_chunks, sizeof(uint64_t), GFP_KERNEL);
194+ chunk_array = kvmalloc_array(cs->in.num_chunks, sizeof(uint64_t),
195+ GFP_KERNEL);
122196 if (!chunk_array)
123197 return -ENOMEM;
124198
125− p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id);
126− if (!p->ctx) {
127− ret = -EINVAL;
128− goto free_chunk;
129− }
130−
131− mutex_lock(&p->ctx->lock);
132−
133− /* skip guilty context job */
134− if (atomic_read(&p->ctx->guilty) == 1) {
135− ret = -ECANCELED;
136− goto free_chunk;
137− }
138−
139199 /* get chunks */
140200 chunk_array_user = u64_to_user_ptr(cs->in.chunks);
141201 if (copy_from_user(chunk_array, chunk_array_user,
@@ -170,7 +230,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs · 28 unmodified lines
170230 size = p->chunks[i].length_dw;
171231 cdata = u64_to_user_ptr(user_chunk.chunk_data);
172232
173− p->chunks[i].kdata = kvmalloc_array(size, sizeof(uint32_t), GFP_KERNEL);
233+ p->chunks[i].kdata = kvmalloc_array(size, sizeof(uint32_t),
234+ GFP_KERNEL);
174235 if (p->chunks[i].kdata == NULL) {
175236 ret = -ENOMEM;
176237 i--;
@@ -182,36 +243,35 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs · 5 unmodified lines
182243 goto free_partial_kdata;
183244 }
184245
246+ /* Assume the worst on the following checks */
247+ ret = -EINVAL;
185248 switch (p->chunks[i].chunk_id) {
186249 case AMDGPU_CHUNK_ID_IB:
187− ++num_ibs;
250+ if (size < sizeof(struct drm_amdgpu_cs_chunk_ib))
251+ goto free_partial_kdata;
252+
253+ ret = amdgpu_cs_p1_ib(p, p->chunks[i].kdata, num_ibs);
254+ if (ret)
255+ goto free_partial_kdata;
188256 break;
189257
190258 case AMDGPU_CHUNK_ID_FENCE:
191− size = sizeof(struct drm_amdgpu_cs_chunk_fence);
192− if (p->chunks[i].length_dw * sizeof(uint32_t) < size) {
193− ret = -EINVAL;
259+ if (size < sizeof(struct drm_amdgpu_cs_chunk_fence))
194260 goto free_partial_kdata;
195− }
196261
197− ret = amdgpu_cs_user_fence_chunk(p, p->chunks[i].kdata,
198− &uf_offset);
262+ ret = amdgpu_cs_p1_user_fence(p, p->chunks[i].kdata,
263+ &uf_offset);
199264 if (ret)
200265 goto free_partial_kdata;
201−
202266 break;
203267
204268 case AMDGPU_CHUNK_ID_BO_HANDLES:
205− size = sizeof(struct drm_amdgpu_bo_list_in);
206− if (p->chunks[i].length_dw * sizeof(uint32_t) < size) {
207− ret = -EINVAL;
269+ if (size < sizeof(struct drm_amdgpu_bo_list_in))
208270 goto free_partial_kdata;
209− }
210271
211− ret = amdgpu_cs_bo_handles_chunk(p, p->chunks[i].kdata);
272+ ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
212273 if (ret)
213274 goto free_partial_kdata;
214−
215275 break;
216276
217277 case AMDGPU_CHUNK_ID_DEPENDENCIES:
@@ -223,22 +283,32 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs · 5 unmodified lines
223283 break;
224284
225285 default:
226− ret = -EINVAL;
227286 goto free_partial_kdata;
228287 }
229288 }
230289
231− ret = amdgpu_job_alloc(p->adev, num_ibs, &p->job, vm);
232− if (ret)
233− goto free_all_kdata;
290+ if (!p->gang_size)
291+ return -EINVAL;
292+
293+ for (i = 0; i < p->gang_size; ++i) {
294+ ret = amdgpu_job_alloc(p->adev, num_ibs[i], &p->jobs[i], vm);
295+ if (ret)
296+ goto free_all_kdata;
297+
298+ ret = drm_sched_job_init(&p->jobs[i]->base, p->entities[i],
299+ &fpriv->vm);
300+ if (ret)
301+ goto free_all_kdata;
302+ }
303+ p->gang_leader = p->jobs[p->gang_size - 1];
234304
235− if (p->ctx->vram_lost_counter != p->job->vram_lost_counter) {
305+ if (p->ctx->vram_lost_counter != p->gang_leader->vram_lost_counter) {
236306 ret = -ECANCELED;
237307 goto free_all_kdata;
238308 }
239309
240310 if (p->uf_entry.tv.bo)
241− p->job->uf_addr = uf_offset;
311+ p->gang_leader->uf_addr = uf_offset;
242312 kvfree(chunk_array);
243313
244314 /* Use this opportunity to fill in task info for the vm */
@@ -260,943 +330,880 @@ free_chunk: · 15 unmodified lines
260330 return ret;
261331 }
262332
263−/* Convert microseconds to bytes. */
264−static u64 us_to_bytes(struct amdgpu_device *adev, s64 us)
333+static int amdgpu_cs_p2_ib(struct amdgpu_cs_parser *p,
334+ struct amdgpu_cs_chunk *chunk,
335+ unsigned int *ce_preempt,
336+ unsigned int *de_preempt)
265337 {
266− if (us <= 0 || !adev->mm_stats.log2_max_MBps)
267− return 0;
338+ struct drm_amdgpu_cs_chunk_ib *chunk_ib = chunk->kdata;
339+ struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
340+ struct amdgpu_vm *vm = &fpriv->vm;
341+ struct amdgpu_ring *ring;
342+ struct amdgpu_job *job;
343+ struct amdgpu_ib *ib;
344+ int r;
268345
269− /* Since accum_us is incremented by a million per second, just
270− * multiply it by the number of MB/s to get the number of bytes.
271− */
272− return us << adev->mm_stats.log2_max_MBps;
273−}
346+ r = amdgpu_cs_job_idx(p, chunk_ib);
347+ if (r < 0)
348+ return r;
274349
275−static s64 bytes_to_us(struct amdgpu_device *adev, u64 bytes)
276−{
277− if (!adev->mm_stats.log2_max_MBps)
278− return 0;
350+ job = p->jobs[r];
351+ ring = amdgpu_job_ring(job);
352+ ib = &job->ibs[job->num_ibs++];
279353
280− return bytes >> adev->mm_stats.log2_max_MBps;
281−}
354+ /* MM engine doesn't support user fences */
355+ if (p->uf_entry.tv.bo && ring->funcs->no_user_fence)
356+ return -EINVAL;
282357
283−/* Returns how many bytes TTM can move right now. If no bytes can be moved,
284− * it returns 0. If it returns non-zero, it's OK to move at least one buffer,
285− * which means it can go over the threshold once. If that happens, the driver
286− * will be in debt and no other buffer migrations can be done until that debt
287− * is repaid.
288− *
289− * This approach allows moving a buffer of any size (it's important to allow
290− * that).
291− *
292− * The currency is simply time in microseconds and it increases as the clock
293− * ticks. The accumulated microseconds (us) are converted to bytes and
294− * returned.
295− */
296−static void amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev,
297− u64 *max_bytes,
298− u64 *max_vis_bytes)
299−{
300− s64 time_us, increment_us;
301− u64 free_vram, total_vram, used_vram;
302− /* Allow a maximum of 200 accumulated ms. This is basically per-IB
303− * throttling.
304− *
305− * It means that in order to get full max MBps, at least 5 IBs per
306− * second must be submitted and not more than 200ms apart from each
307− * other.
308− */
309− const s64 us_upper_bound = 200000;
358+ if (chunk_ib->ip_type == AMDGPU_HW_IP_GFX &&
359+ chunk_ib->flags & AMDGPU_IB_FLAG_PREEMPT) {
360+ if (chunk_ib->flags & AMDGPU_IB_FLAG_CE)
361+ (*ce_preempt)++;
362+ else
363+ (*de_preempt)++;
310364
311− if (!adev->mm_stats.log2_max_MBps) {
312− *max_bytes = 0;
313− *max_vis_bytes = 0;
314− return;
365+ /* Each GFX command submit allows only 1 IB max
366+ * preemptible for CE & DE */
367+ if (*ce_preempt > 1 || *de_preempt > 1)
368+ return -EINVAL;
315369 }
316370
317− total_vram = adev->gmc.real_vram_size - atomic64_read(&adev->vram_pin_size);
318− used_vram = ttm_resource_manager_usage(&adev->mman.vram_mgr.manager);
319− free_vram = used_vram >= total_vram ? 0 : total_vram - used_vram;
371+ if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE)
372+ job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT;
320373
321− spin_lock(&adev->mm_stats.lock);
374+ r = amdgpu_ib_get(p->adev, vm, ring->funcs->parse_cs ?
375+ chunk_ib->ib_bytes : 0,
376+ AMDGPU_IB_POOL_DELAYED, ib);
377+ if (r) {
378+ DRM_ERROR("Failed to get ib !\n");
379+ return r;
380+ }
322381
323− /* Increase the amount of accumulated us. */
324− time_us = ktime_to_us(ktime_get());
325− increment_us = time_us - adev->mm_stats.last_update_us;
326− adev->mm_stats.last_update_us = time_us;
327− adev->mm_stats.accum_us = min(adev->mm_stats.accum_us + increment_us,
328− us_upper_bound);
382+ ib->gpu_addr = chunk_ib->va_start;
383+ ib->length_dw = chunk_ib->ib_bytes / 4;
384+ ib->flags = chunk_ib->flags;
385+ return 0;
386+}
329387
330− /* This prevents the short period of low performance when the VRAM
331− * usage is low and the driver is in debt or doesn't have enough
332− * accumulated us to fill VRAM quickly.
333− *
334− * The situation can occur in these cases:
335− * - a lot of VRAM is freed by userspace
336− * - the presence of a big buffer causes a lot of evictions
337− * (solution: split buffers into smaller ones)
338− *
339− * If 128 MB or 1/8th of VRAM is free, start filling it now by setting
340− * accum_us to a positive number.
341− */
342− if (free_vram >= 128 * 1024 * 1024 || free_vram >= total_vram / 8) {
343− s64 min_us;
388+static int amdgpu_cs_p2_dependencies(struct amdgpu_cs_parser *p,
389+ struct amdgpu_cs_chunk *chunk)
390+{
391+ struct drm_amdgpu_cs_chunk_dep *deps = chunk->kdata;
392+ struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
393+ unsigned num_deps;
394+ int i, r;
344395
345− /* Be more aggressive on dGPUs. Try to fill a portion of free
346− * VRAM now.
347− */
348− if (!(adev->flags & AMD_IS_APU))
349− min_us = bytes_to_us(adev, free_vram / 4);
350− else
351− min_us = 0; /* Reset accum_us on APUs. */
396+ num_deps = chunk->length_dw * 4 /
397+ sizeof(struct drm_amdgpu_cs_chunk_dep);
352398
353− adev->mm_stats.accum_us = max(min_us, adev->mm_stats.accum_us);
354− }
399+ for (i = 0; i < num_deps; ++i) {
400+ struct amdgpu_ctx *ctx;
401+ struct drm_sched_entity *entity;
402+ struct dma_fence *fence;
355403
356− /* This is set to 0 if the driver is in debt to disallow (optional)
357− * buffer moves.
358− */
359− *max_bytes = us_to_bytes(adev, adev->mm_stats.accum_us);
404+ ctx = amdgpu_ctx_get(fpriv, deps[i].ctx_id);
405+ if (ctx == NULL)
406+ return -EINVAL;
360407
361− /* Do the same for visible VRAM if half of it is free */
362− if (!amdgpu_gmc_vram_full_visible(&adev->gmc)) {
363− u64 total_vis_vram = adev->gmc.visible_vram_size;
364− u64 used_vis_vram =
365− amdgpu_vram_mgr_vis_usage(&adev->mman.vram_mgr);
408+ r = amdgpu_ctx_get_entity(ctx, deps[i].ip_type,
409+ deps[i].ip_instance,
410+ deps[i].ring, &entity);
411+ if (r) {
412+ amdgpu_ctx_put(ctx);
413+ return r;
414+ }
366415
367− if (used_vis_vram < total_vis_vram) {
368− u64 free_vis_vram = total_vis_vram - used_vis_vram;
369− adev->mm_stats.accum_us_vis = min(adev->mm_stats.accum_us_vis +
370− increment_us, us_upper_bound);
416+ fence = amdgpu_ctx_get_fence(ctx, entity, deps[i].handle);
417+ amdgpu_ctx_put(ctx);
371418
372− if (free_vis_vram >= total_vis_vram / 2)
373− adev->mm_stats.accum_us_vis =
374− max(bytes_to_us(adev, free_vis_vram / 2),
375− adev->mm_stats.accum_us_vis);
376− }
419+ if (IS_ERR(fence))
420+ return PTR_ERR(fence);
421+ else if (!fence)
422+ continue;
377423
378− *max_vis_bytes = us_to_bytes(adev, adev->mm_stats.accum_us_vis);
379− } else {
380− *max_vis_bytes = 0;
381− }
424+ if (chunk->chunk_id == AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES) {
425+ struct drm_sched_fence *s_fence;
426+ struct dma_fence *old = fence;
382427
383− spin_unlock(&adev->mm_stats.lock);
384−}
428+ s_fence = to_drm_sched_fence(fence);
429+ fence = dma_fence_get(&s_fence->scheduled);
430+ dma_fence_put(old);
431+ }
385432
386−/* Report how many bytes have really been moved for the last command
387− * submission. This can result in a debt that can stop buffer migrations
388− * temporarily.
389− */
390−void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes,
391− u64 num_vis_bytes)
392−{
393− spin_lock(&adev->mm_stats.lock);
394− adev->mm_stats.accum_us -= bytes_to_us(adev, num_bytes);
395− adev->mm_stats.accum_us_vis -= bytes_to_us(adev, num_vis_bytes);
396− spin_unlock(&adev->mm_stats.lock);
433+ r = amdgpu_sync_fence(&p->gang_leader->sync, fence);
434+ dma_fence_put(fence);
435+ if (r)
436+ return r;
437+ }
438+ return 0;
397439 }
398440
399−static int amdgpu_cs_bo_validate(void *param, struct amdgpu_bo *bo)
441+static int amdgpu_syncobj_lookup_and_add(struct amdgpu_cs_parser *p,
442+ uint32_t handle, u64 point,
443+ u64 flags)
400444 {
401− struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
402− struct amdgpu_cs_parser *p = param;
403− struct ttm_operation_ctx ctx = {
404− .interruptible = true,
405− .no_wait_gpu = false,
406− .resv = bo->tbo.base.resv
407− };
408− uint32_t domain;
445+ struct dma_fence *fence;
409446 int r;
410447
411− if (bo->tbo.pin_count)
412− return 0;
448+ r = drm_syncobj_find_fence(p->filp, handle, point, flags, &fence);
449+ if (r) {
450+ DRM_ERROR("syncobj %u failed to find fence @ %llu (%d)!\n",
451+ handle, point, r);
452+ return r;
453+ }
413454
414− /* Don't move this buffer if we have depleted our allowance
415− * to move it. Don't move anything if the threshold is zero.
416− */
417− if (p->bytes_moved < p->bytes_moved_threshold &&
418− (!bo->tbo.base.dma_buf ||
419− list_empty(&bo->tbo.base.dma_buf->attachments))) {
420− if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
421− (bo->flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)) {
422− /* And don't move a CPU_ACCESS_REQUIRED BO to limited
423− * visible VRAM if we've depleted our allowance to do
424− * that.
425− */
426− if (p->bytes_moved_vis < p->bytes_moved_vis_threshold)
427− domain = bo->preferred_domains;
428− else
429− domain = bo->allowed_domains;
430− } else {
431− domain = bo->preferred_domains;
432− }
433− } else {
434− domain = bo->allowed_domains;
435− }
436−
437−retry:
438− amdgpu_bo_placement_from_domain(bo, domain);
439− r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
440−
441− p->bytes_moved += ctx.bytes_moved;
442− if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
443− amdgpu_bo_in_cpu_visible_vram(bo))
444− p->bytes_moved_vis += ctx.bytes_moved;
445−
446− if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains) {
447− domain = bo->allowed_domains;
448− goto retry;
449− }
455+ r = amdgpu_sync_fence(&p->gang_leader->sync, fence);
456+ dma_fence_put(fence);
450457
451458 return r;
452459 }
453460
454−static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
455− struct list_head *validated)
461+static int amdgpu_cs_p2_syncobj_in(struct amdgpu_cs_parser *p,
462+ struct amdgpu_cs_chunk *chunk)
456463 {
457− struct ttm_operation_ctx ctx = { true, false };
458− struct amdgpu_bo_list_entry *lobj;
459− int r;
460−
461− list_for_each_entry(lobj, validated, tv.head) {
462− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(lobj->tv.bo);
463− struct mm_struct *usermm;
464−
465− usermm = amdgpu_ttm_tt_get_usermm(bo->tbo.ttm);
466− if (usermm && usermm != current->mm)
467− return -EPERM;
468−
469− if (amdgpu_ttm_tt_is_userptr(bo->tbo.ttm) &&
470− lobj->user_invalidated && lobj->user_pages) {
471− amdgpu_bo_placement_from_domain(bo,
472− AMDGPU_GEM_DOMAIN_CPU);
473− r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
474− if (r)
475− return r;
476−
477− amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm,
478− lobj->user_pages);
479− }
464+ struct drm_amdgpu_cs_chunk_sem *deps = chunk->kdata;
465+ unsigned num_deps;
466+ int i, r;
480467
481− r = amdgpu_cs_bo_validate(p, bo);
468+ num_deps = chunk->length_dw * 4 /
469+ sizeof(struct drm_amdgpu_cs_chunk_sem);
470+ for (i = 0; i < num_deps; ++i) {
471+ r = amdgpu_syncobj_lookup_and_add(p, deps[i].handle, 0, 0);
482472 if (r)
483473 return r;
484−
485− kvfree(lobj->user_pages);
486− lobj->user_pages = NULL;
487474 }
475+
488476 return 0;
489477 }
490478
491−static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
492− union drm_amdgpu_cs *cs)
479+static int amdgpu_cs_p2_syncobj_timeline_wait(struct amdgpu_cs_parser *p,
480+ struct amdgpu_cs_chunk *chunk)
493481 {
494− struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
495− struct amdgpu_vm *vm = &fpriv->vm;
496− struct amdgpu_bo_list_entry *e;
497− struct list_head duplicates;
498− struct amdgpu_bo *gds;
499− struct amdgpu_bo *gws;
500− struct amdgpu_bo *oa;
501− int r;
502−
503− INIT_LIST_HEAD(&p->validated);
504−
505− /* p->bo_list could already be assigned if AMDGPU_CHUNK_ID_BO_HANDLES is present */
506− if (cs->in.bo_list_handle) {
507− if (p->bo_list)
508− return -EINVAL;
482+ struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps = chunk->kdata;
483+ unsigned num_deps;
484+ int i, r;
509485
510− r = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle,
511− &p->bo_list);
512− if (r)
513− return r;
514− } else if (!p->bo_list) {
515− /* Create a empty bo_list when no handle is provided */
516− r = amdgpu_bo_list_create(p->adev, p->filp, NULL, 0,
517− &p->bo_list);
486+ num_deps = chunk->length_dw * 4 /
487+ sizeof(struct drm_amdgpu_cs_chunk_syncobj);
488+ for (i = 0; i < num_deps; ++i) {
489+ r = amdgpu_syncobj_lookup_and_add(p, syncobj_deps[i].handle,
490+ syncobj_deps[i].point,
491+ syncobj_deps[i].flags);
518492 if (r)
519493 return r;
520494 }
521495
522− mutex_lock(&p->bo_list->bo_list_mutex);
523−
524− /* One for TTM and one for the CS job */
525− amdgpu_bo_list_for_each_entry(e, p->bo_list)
526− e->tv.num_shared = 2;
527−
528− amdgpu_bo_list_get_list(p->bo_list, &p->validated);
496+ return 0;
497+}
529498
530− INIT_LIST_HEAD(&duplicates);
531− amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);
499+static int amdgpu_cs_p2_syncobj_out(struct amdgpu_cs_parser *p,
500+ struct amdgpu_cs_chunk *chunk)
501+{
502+ struct drm_amdgpu_cs_chunk_sem *deps = chunk->kdata;
503+ unsigned num_deps;
504+ int i;
532505
533− if (p->uf_entry.tv.bo && !ttm_to_amdgpu_bo(p->uf_entry.tv.bo)->parent)
534− list_add(&p->uf_entry.tv.head, &p->validated);
506+ num_deps = chunk->length_dw * 4 /
507+ sizeof(struct drm_amdgpu_cs_chunk_sem);
535508
536− /* Get userptr backing pages. If pages are updated after registered
537− * in amdgpu_gem_userptr_ioctl(), amdgpu_cs_list_validate() will do
538− * amdgpu_ttm_backend_bind() to flush and invalidate new pages
539− */
540− amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
541− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
542− bool userpage_invalidated = false;
543− int i;
509+ if (p->post_deps)
510+ return -EINVAL;
544511
545− e->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
546− sizeof(struct page *),
547− GFP_KERNEL | __GFP_ZERO);
548− if (!e->user_pages) {
549− DRM_ERROR("kvmalloc_array failure\n");
550− r = -ENOMEM;
551− goto out_free_user_pages;
552− }
512+ p->post_deps = kmalloc_array(num_deps, sizeof(*p->post_deps),
513+ GFP_KERNEL);
514+ p->num_post_deps = 0;
553515
554− r = amdgpu_ttm_tt_get_user_pages(bo, e->user_pages);
555− if (r) {
556− kvfree(e->user_pages);
557− e->user_pages = NULL;
558− goto out_free_user_pages;
559− }
516+ if (!p->post_deps)
517+ return -ENOMEM;
560518
561− for (i = 0; i < bo->tbo.ttm->num_pages; i++) {
562− if (bo->tbo.ttm->pages[i] != e->user_pages[i]) {
563− userpage_invalidated = true;
564− break;
565− }
566− }
567− e->user_invalidated = userpage_invalidated;
568− }
569519
570− r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true,
571− &duplicates);
572− if (unlikely(r != 0)) {
573− if (r != -ERESTARTSYS)
574− DRM_ERROR("ttm_eu_reserve_buffers failed.\n");
575− goto out_free_user_pages;
520+ for (i = 0; i < num_deps; ++i) {
521+ p->post_deps[i].syncobj =
522+ drm_syncobj_find(p->filp, deps[i].handle);
523+ if (!p->post_deps[i].syncobj)
524+ return -EINVAL;
525+ p->post_deps[i].chain = NULL;
526+ p->post_deps[i].point = 0;
527+ p->num_post_deps++;
576528 }
577529
578− amdgpu_bo_list_for_each_entry(e, p->bo_list) {
579− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
580−
581− e->bo_va = amdgpu_vm_bo_find(vm, bo);
582− }
530+ return 0;
531+}
583532
584− /* Move fence waiting after getting reservation lock of
585− * PD root. Then there is no need on a ctx mutex lock.
586− */
587− r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entity);
588− if (unlikely(r != 0)) {
589− if (r != -ERESTARTSYS)
590− DRM_ERROR("amdgpu_ctx_wait_prev_fence failed.\n");
591− goto error_validate;
592− }
533+static int amdgpu_cs_p2_syncobj_timeline_signal(struct amdgpu_cs_parser *p,
534+ struct amdgpu_cs_chunk *chunk)
535+{
536+ struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps = chunk->kdata;
537+ unsigned num_deps;
538+ int i;
593539
594− amdgpu_cs_get_threshold_for_moves(p->adev, &p->bytes_moved_threshold,
595− &p->bytes_moved_vis_threshold);
596− p->bytes_moved = 0;
597− p->bytes_moved_vis = 0;
540+ num_deps = chunk->length_dw * 4 /
541+ sizeof(struct drm_amdgpu_cs_chunk_syncobj);
598542
599− r = amdgpu_vm_validate_pt_bos(p->adev, &fpriv->vm,
600− amdgpu_cs_bo_validate, p);
601− if (r) {
602− DRM_ERROR("amdgpu_vm_validate_pt_bos() failed.\n");
603− goto error_validate;
604− }
543+ if (p->post_deps)
544+ return -EINVAL;
605545
606− r = amdgpu_cs_list_validate(p, &duplicates);
607− if (r)
608− goto error_validate;
546+ p->post_deps = kmalloc_array(num_deps, sizeof(*p->post_deps),
547+ GFP_KERNEL);
548+ p->num_post_deps = 0;
609549
610− r = amdgpu_cs_list_validate(p, &p->validated);
611− if (r)
612− goto error_validate;
550+ if (!p->post_deps)
551+ return -ENOMEM;
613552
614− amdgpu_cs_report_moved_bytes(p->adev, p->bytes_moved,
615− p->bytes_moved_vis);
553+ for (i = 0; i < num_deps; ++i) {
554+ struct amdgpu_cs_post_dep *dep = &p->post_deps[i];
616555
617− gds = p->bo_list->gds_obj;
618− gws = p->bo_list->gws_obj;
619− oa = p->bo_list->oa_obj;
556+ dep->chain = NULL;
557+ if (syncobj_deps[i].point) {
558+ dep->chain = dma_fence_chain_alloc();
559+ if (!dep->chain)
560+ return -ENOMEM;
561+ }
620562
621− if (gds) {
622− p->job->gds_base = amdgpu_bo_gpu_offset(gds) >> PAGE_SHIFT;
623− p->job->gds_size = amdgpu_bo_size(gds) >> PAGE_SHIFT;
624− }
625− if (gws) {
626− p->job->gws_base = amdgpu_bo_gpu_offset(gws) >> PAGE_SHIFT;
627− p->job->gws_size = amdgpu_bo_size(gws) >> PAGE_SHIFT;
628− }
629− if (oa) {
630− p->job->oa_base = amdgpu_bo_gpu_offset(oa) >> PAGE_SHIFT;
631− p->job->oa_size = amdgpu_bo_size(oa) >> PAGE_SHIFT;
563+ dep->syncobj = drm_syncobj_find(p->filp,
564+ syncobj_deps[i].handle);
565+ if (!dep->syncobj) {
566+ dma_fence_chain_free(dep->chain);
567+ return -EINVAL;
568+ }
569+ dep->point = syncobj_deps[i].point;
570+ p->num_post_deps++;
632571 }
633572
634− if (!r && p->uf_entry.tv.bo) {
635− struct amdgpu_bo *uf = ttm_to_amdgpu_bo(p->uf_entry.tv.bo);
573+ return 0;
574+}
636575
637− r = amdgpu_ttm_alloc_gart(&uf->tbo);
638− p->job->uf_addr += amdgpu_bo_gpu_offset(uf);
639− }
576+static int amdgpu_cs_pass2(struct amdgpu_cs_parser *p)
577+{
578+ unsigned int ce_preempt = 0, de_preempt = 0;
579+ int i, r;
640580
641−error_validate:
642− if (r)
643− ttm_eu_backoff_reservation(&p->ticket, &p->validated);
581+ for (i = 0; i < p->nchunks; ++i) {
582+ struct amdgpu_cs_chunk *chunk;
644583
645−out_free_user_pages:
646− if (r) {
647− amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
648− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
584+ chunk = &p->chunks[i];
649585
650− if (!e->user_pages)
651− continue;
652− amdgpu_ttm_tt_get_user_pages_done(bo->tbo.ttm);
653− kvfree(e->user_pages);
654− e->user_pages = NULL;
586+ switch (chunk->chunk_id) {
587+ case AMDGPU_CHUNK_ID_IB:
588+ r = amdgpu_cs_p2_ib(p, chunk, &ce_preempt, &de_preempt);
589+ if (r)
590+ return r;
591+ break;
592+ case AMDGPU_CHUNK_ID_DEPENDENCIES:
593+ case AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES:
594+ r = amdgpu_cs_p2_dependencies(p, chunk);
595+ if (r)
596+ return r;
597+ break;
598+ case AMDGPU_CHUNK_ID_SYNCOBJ_IN:
599+ r = amdgpu_cs_p2_syncobj_in(p, chunk);
600+ if (r)
601+ return r;
602+ break;
603+ case AMDGPU_CHUNK_ID_SYNCOBJ_OUT:
604+ r = amdgpu_cs_p2_syncobj_out(p, chunk);
605+ if (r)
606+ return r;
607+ break;
608+ case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT:
609+ r = amdgpu_cs_p2_syncobj_timeline_wait(p, chunk);
610+ if (r)
611+ return r;
612+ break;
613+ case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL:
614+ r = amdgpu_cs_p2_syncobj_timeline_signal(p, chunk);
615+ if (r)
616+ return r;
617+ break;
655618 }
656− mutex_unlock(&p->bo_list->bo_list_mutex);
657619 }
658− return r;
620+
621+ return 0;
659622 }
660623
661−static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
624+/* Convert microseconds to bytes. */
625+static u64 us_to_bytes(struct amdgpu_device *adev, s64 us)
662626 {
663− struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
664− struct amdgpu_bo_list_entry *e;
665− int r;
627+ if (us <= 0 || !adev->mm_stats.log2_max_MBps)
628+ return 0;
666629
667− list_for_each_entry(e, &p->validated, tv.head) {
668− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
669− struct dma_resv *resv = bo->tbo.base.resv;
670− enum amdgpu_sync_mode sync_mode;
630+ /* Since accum_us is incremented by a million per second, just
631+ * multiply it by the number of MB/s to get the number of bytes.
632+ */
633+ return us << adev->mm_stats.log2_max_MBps;
634+}
671635
672− sync_mode = amdgpu_bo_explicit_sync(bo) ?
673− AMDGPU_SYNC_EXPLICIT : AMDGPU_SYNC_NE_OWNER;
674− r = amdgpu_sync_resv(p->adev, &p->job->sync, resv, sync_mode,
675− &fpriv->vm);
676− if (r)
677− return r;
678− }
679− return 0;
636+static s64 bytes_to_us(struct amdgpu_device *adev, u64 bytes)
637+{
638+ if (!adev->mm_stats.log2_max_MBps)
639+ return 0;
640+
641+ return bytes >> adev->mm_stats.log2_max_MBps;
680642 }
681643
682−/**
683− * amdgpu_cs_parser_fini() - clean parser states
684− * @parser: parser structure holding parsing context.
685− * @error: error number
686− * @backoff: indicator to backoff the reservation
644+/* Returns how many bytes TTM can move right now. If no bytes can be moved,
645+ * it returns 0. If it returns non-zero, it's OK to move at least one buffer,
646+ * which means it can go over the threshold once. If that happens, the driver
647+ * will be in debt and no other buffer migrations can be done until that debt
648+ * is repaid.
649+ *
650+ * This approach allows moving a buffer of any size (it's important to allow
651+ * that).
687652 *
688− * If error is set then unvalidate buffer, otherwise just free memory
689− * used by parsing context.
690− **/
691−static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser, int error,
692− bool backoff)
653+ * The currency is simply time in microseconds and it increases as the clock
654+ * ticks. The accumulated microseconds (us) are converted to bytes and
655+ * returned.
656+ */
657+static void amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev,
658+ u64 *max_bytes,
659+ u64 *max_vis_bytes)
693660 {
694− unsigned i;
661+ s64 time_us, increment_us;
662+ u64 free_vram, total_vram, used_vram;
663+ /* Allow a maximum of 200 accumulated ms. This is basically per-IB
664+ * throttling.
665+ *
666+ * It means that in order to get full max MBps, at least 5 IBs per
667+ * second must be submitted and not more than 200ms apart from each
668+ * other.
669+ */
670+ const s64 us_upper_bound = 200000;
695671
696− if (error && backoff) {
697− ttm_eu_backoff_reservation(&parser->ticket,
698− &parser->validated);
699− mutex_unlock(&parser->bo_list->bo_list_mutex);
672+ if (!adev->mm_stats.log2_max_MBps) {
673+ *max_bytes = 0;
674+ *max_vis_bytes = 0;
675+ return;
700676 }
701677
702− for (i = 0; i < parser->num_post_deps; i++) {
703− drm_syncobj_put(parser->post_deps[i].syncobj);
704− kfree(parser->post_deps[i].chain);
705− }
706− kfree(parser->post_deps);
678+ total_vram = adev->gmc.real_vram_size - atomic64_read(&adev->vram_pin_size);
679+ used_vram = ttm_resource_manager_usage(&adev->mman.vram_mgr.manager);
680+ free_vram = used_vram >= total_vram ? 0 : total_vram - used_vram;
707681
708− dma_fence_put(parser->fence);
682+ spin_lock(&adev->mm_stats.lock);
709683
710− if (parser->ctx) {
711− mutex_unlock(&parser->ctx->lock);
712− amdgpu_ctx_put(parser->ctx);
684+ /* Increase the amount of accumulated us. */
685+ time_us = ktime_to_us(ktime_get());
686+ increment_us = time_us - adev->mm_stats.last_update_us;
687+ adev->mm_stats.last_update_us = time_us;
688+ adev->mm_stats.accum_us = min(adev->mm_stats.accum_us + increment_us,
689+ us_upper_bound);
690+
691+ /* This prevents the short period of low performance when the VRAM
692+ * usage is low and the driver is in debt or doesn't have enough
693+ * accumulated us to fill VRAM quickly.
694+ *
695+ * The situation can occur in these cases:
696+ * - a lot of VRAM is freed by userspace
697+ * - the presence of a big buffer causes a lot of evictions
698+ * (solution: split buffers into smaller ones)
699+ *
700+ * If 128 MB or 1/8th of VRAM is free, start filling it now by setting
701+ * accum_us to a positive number.
702+ */
703+ if (free_vram >= 128 * 1024 * 1024 || free_vram >= total_vram / 8) {
704+ s64 min_us;
705+
706+ /* Be more aggressive on dGPUs. Try to fill a portion of free
707+ * VRAM now.
708+ */
709+ if (!(adev->flags & AMD_IS_APU))
710+ min_us = bytes_to_us(adev, free_vram / 4);
711+ else
712+ min_us = 0; /* Reset accum_us on APUs. */
713+
714+ adev->mm_stats.accum_us = max(min_us, adev->mm_stats.accum_us);
713715 }
714− if (parser->bo_list)
715− amdgpu_bo_list_put(parser->bo_list);
716716
717− for (i = 0; i < parser->nchunks; i++)
718− kvfree(parser->chunks[i].kdata);
719− kvfree(parser->chunks);
720− if (parser->job)
721− amdgpu_job_free(parser->job);
722− if (parser->uf_entry.tv.bo) {
723− struct amdgpu_bo *uf = ttm_to_amdgpu_bo(parser->uf_entry.tv.bo);
717+ /* This is set to 0 if the driver is in debt to disallow (optional)
718+ * buffer moves.
719+ */
720+ *max_bytes = us_to_bytes(adev, adev->mm_stats.accum_us);
724721
725− amdgpu_bo_unref(&uf);
722+ /* Do the same for visible VRAM if half of it is free */
723+ if (!amdgpu_gmc_vram_full_visible(&adev->gmc)) {
724+ u64 total_vis_vram = adev->gmc.visible_vram_size;
725+ u64 used_vis_vram =
726+ amdgpu_vram_mgr_vis_usage(&adev->mman.vram_mgr);
727+
728+ if (used_vis_vram < total_vis_vram) {
729+ u64 free_vis_vram = total_vis_vram - used_vis_vram;
730+ adev->mm_stats.accum_us_vis = min(adev->mm_stats.accum_us_vis +
731+ increment_us, us_upper_bound);
732+
733+ if (free_vis_vram >= total_vis_vram / 2)
734+ adev->mm_stats.accum_us_vis =
735+ max(bytes_to_us(adev, free_vis_vram / 2),
736+ adev->mm_stats.accum_us_vis);
737+ }
738+
739+ *max_vis_bytes = us_to_bytes(adev, adev->mm_stats.accum_us_vis);
740+ } else {
741+ *max_vis_bytes = 0;
726742 }
743+
744+ spin_unlock(&adev->mm_stats.lock);
727745 }
728746
729−static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
747+/* Report how many bytes have really been moved for the last command
748+ * submission. This can result in a debt that can stop buffer migrations
749+ * temporarily.
750+ */
751+void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes,
752+ u64 num_vis_bytes)
730753 {
731− struct amdgpu_ring *ring = to_amdgpu_ring(p->entity->rq->sched);
732− struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
733− struct amdgpu_device *adev = p->adev;
734− struct amdgpu_vm *vm = &fpriv->vm;
735− struct amdgpu_bo_list_entry *e;
736− struct amdgpu_bo_va *bo_va;
737− struct amdgpu_bo *bo;
738− int r;
754+ spin_lock(&adev->mm_stats.lock);
755+ adev->mm_stats.accum_us -= bytes_to_us(adev, num_bytes);
756+ adev->mm_stats.accum_us_vis -= bytes_to_us(adev, num_vis_bytes);
757+ spin_unlock(&adev->mm_stats.lock);
758+}
739759
740− /* Only for UVD/VCE VM emulation */
741− if (ring->funcs->parse_cs || ring->funcs->patch_cs_in_place) {
742− unsigned i, j;
743−
744− for (i = 0, j = 0; i < p->nchunks && j < p->job->num_ibs; i++) {
745− struct drm_amdgpu_cs_chunk_ib *chunk_ib;
746− struct amdgpu_bo_va_mapping *m;
747− struct amdgpu_bo *aobj = NULL;
748− struct amdgpu_cs_chunk *chunk;
749− uint64_t offset, va_start;
750− struct amdgpu_ib *ib;
751− uint8_t *kptr;
752−
753− chunk = &p->chunks[i];
754− ib = &p->job->ibs[j];
755− chunk_ib = chunk->kdata;
756−
757− if (chunk->chunk_id != AMDGPU_CHUNK_ID_IB)
758− continue;
760+static int amdgpu_cs_bo_validate(void *param, struct amdgpu_bo *bo)
761+{
762+ struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
763+ struct amdgpu_cs_parser *p = param;
764+ struct ttm_operation_ctx ctx = {
765+ .interruptible = true,
766+ .no_wait_gpu = false,
767+ .resv = bo->tbo.base.resv
768+ };
769+ uint32_t domain;
770+ int r;
759771
760− va_start = chunk_ib->va_start & AMDGPU_GMC_HOLE_MASK;
761− r = amdgpu_cs_find_mapping(p, va_start, &aobj, &m);
762− if (r) {
763− DRM_ERROR("IB va_start is invalid\n");
764− return r;
765− }
772+ if (bo->tbo.pin_count)
773+ return 0;
766774
767− if ((va_start + chunk_ib->ib_bytes) >
768− (m->last + 1) * AMDGPU_GPU_PAGE_SIZE) {
769− DRM_ERROR("IB va_start+ib_bytes is invalid\n");
770− return -EINVAL;
771− }
775+ /* Don't move this buffer if we have depleted our allowance
776+ * to move it. Don't move anything if the threshold is zero.
777+ */
778+ if (p->bytes_moved < p->bytes_moved_threshold &&
779+ (!bo->tbo.base.dma_buf ||
780+ list_empty(&bo->tbo.base.dma_buf->attachments))) {
781+ if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
782+ (bo->flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)) {
783+ /* And don't move a CPU_ACCESS_REQUIRED BO to limited
784+ * visible VRAM if we've depleted our allowance to do
785+ * that.
786+ */
787+ if (p->bytes_moved_vis < p->bytes_moved_vis_threshold)
788+ domain = bo->preferred_domains;
789+ else
790+ domain = bo->allowed_domains;
791+ } else {
792+ domain = bo->preferred_domains;
793+ }
794+ } else {
795+ domain = bo->allowed_domains;
796+ }
772797
773− /* the IB should be reserved at this point */
774− r = amdgpu_bo_kmap(aobj, (void **)&kptr);
775− if (r) {
776− return r;
777− }
798+retry:
799+ amdgpu_bo_placement_from_domain(bo, domain);
800+ r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
778801
779− offset = m->start * AMDGPU_GPU_PAGE_SIZE;
780− kptr += va_start - offset;
781−
782− if (ring->funcs->parse_cs) {
783− memcpy(ib->ptr, kptr, chunk_ib->ib_bytes);
784− amdgpu_bo_kunmap(aobj);
785−
786− r = amdgpu_ring_parse_cs(ring, p, p->job, ib);
787− if (r)
788− return r;
789− } else {
790− ib->ptr = (uint32_t *)kptr;
791− r = amdgpu_ring_patch_cs_in_place(ring, p, p->job, ib);
792− amdgpu_bo_kunmap(aobj);
793− if (r)
794− return r;
795− }
802+ p->bytes_moved += ctx.bytes_moved;
803+ if (!amdgpu_gmc_vram_full_visible(&adev->gmc) &&
804+ amdgpu_bo_in_cpu_visible_vram(bo))
805+ p->bytes_moved_vis += ctx.bytes_moved;
796806
797− j++;
798− }
807+ if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains) {
808+ domain = bo->allowed_domains;
809+ goto retry;
799810 }
800811
801− if (!p->job->vm)
802− return amdgpu_cs_sync_rings(p);
812+ return r;
813+}
803814
815+static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
816+ struct list_head *validated)
817+{
818+ struct ttm_operation_ctx ctx = { true, false };
819+ struct amdgpu_bo_list_entry *lobj;
820+ int r;
804821
805− r = amdgpu_vm_clear_freed(adev, vm, NULL);
806− if (r)
807− return r;
822+ list_for_each_entry(lobj, validated, tv.head) {
823+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(lobj->tv.bo);
824+ struct mm_struct *usermm;
808825
809− r = amdgpu_vm_bo_update(adev, fpriv->prt_va, false);
810− if (r)
811− return r;
826+ usermm = amdgpu_ttm_tt_get_usermm(bo->tbo.ttm);
827+ if (usermm && usermm != current->mm)
828+ return -EPERM;
812829
813− r = amdgpu_sync_fence(&p->job->sync, fpriv->prt_va->last_pt_update);
814− if (r)
815− return r;
830+ if (amdgpu_ttm_tt_is_userptr(bo->tbo.ttm) &&
831+ lobj->user_invalidated && lobj->user_pages) {
832+ amdgpu_bo_placement_from_domain(bo,
833+ AMDGPU_GEM_DOMAIN_CPU);
834+ r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
835+ if (r)
836+ return r;
816837
817− if (amdgpu_mcbp || amdgpu_sriov_vf(adev)) {
818− bo_va = fpriv->csa_va;
819− BUG_ON(!bo_va);
820− r = amdgpu_vm_bo_update(adev, bo_va, false);
821− if (r)
822− return r;
838+ amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm,
839+ lobj->user_pages);
840+ }
823841
824− r = amdgpu_sync_fence(&p->job->sync, bo_va->last_pt_update);
842+ r = amdgpu_cs_bo_validate(p, bo);
825843 if (r)
826844 return r;
845+
846+ kvfree(lobj->user_pages);
847+ lobj->user_pages = NULL;
827848 }
849+ return 0;
850+}
828851
829− amdgpu_bo_list_for_each_entry(e, p->bo_list) {
830− /* ignore duplicates */
831− bo = ttm_to_amdgpu_bo(e->tv.bo);
832− if (!bo)
833− continue;
852+static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
853+ union drm_amdgpu_cs *cs)
854+{
855+ struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
856+ struct amdgpu_vm *vm = &fpriv->vm;
857+ struct amdgpu_bo_list_entry *e;
858+ struct list_head duplicates;
859+ unsigned int i;
860+ int r;
834861
835− bo_va = e->bo_va;
836− if (bo_va == NULL)
837− continue;
862+ INIT_LIST_HEAD(&p->validated);
838863
839− r = amdgpu_vm_bo_update(adev, bo_va, false);
864+ /* p->bo_list could already be assigned if AMDGPU_CHUNK_ID_BO_HANDLES is present */
865+ if (cs->in.bo_list_handle) {
866+ if (p->bo_list)
867+ return -EINVAL;
868+
869+ r = amdgpu_bo_list_get(fpriv, cs->in.bo_list_handle,
870+ &p->bo_list);
840871 if (r)
841872 return r;
842−
843− r = amdgpu_sync_fence(&p->job->sync, bo_va->last_pt_update);
873+ } else if (!p->bo_list) {
874+ /* Create a empty bo_list when no handle is provided */
875+ r = amdgpu_bo_list_create(p->adev, p->filp, NULL, 0,
876+ &p->bo_list);
844877 if (r)
845878 return r;
846879 }
847880
848− r = amdgpu_vm_handle_moved(adev, vm);
849− if (r)
850− return r;
881+ mutex_lock(&p->bo_list->bo_list_mutex);
851882
852− r = amdgpu_vm_update_pdes(adev, vm, false);
853− if (r)
854− return r;
883+ /* One for TTM and one for the CS job */
884+ amdgpu_bo_list_for_each_entry(e, p->bo_list)
885+ e->tv.num_shared = 2;
855886
856− r = amdgpu_sync_fence(&p->job->sync, vm->last_update);
857− if (r)
858− return r;
887+ amdgpu_bo_list_get_list(p->bo_list, &p->validated);
859888
860− p->job->vm_pd_addr = amdgpu_gmc_pd_addr(vm->root.bo);
889+ INIT_LIST_HEAD(&duplicates);
890+ amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);
861891
862− if (amdgpu_vm_debug) {
863− /* Invalidate all BOs to test for userspace bugs */
864− amdgpu_bo_list_for_each_entry(e, p->bo_list) {
865− struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
892+ if (p->uf_entry.tv.bo && !ttm_to_amdgpu_bo(p->uf_entry.tv.bo)->parent)
893+ list_add(&p->uf_entry.tv.head, &p->validated);
866894
867− /* ignore duplicates */
868− if (!bo)
869− continue;
895+ /* Get userptr backing pages. If pages are updated after registered
896+ * in amdgpu_gem_userptr_ioctl(), amdgpu_cs_list_validate() will do
897+ * amdgpu_ttm_backend_bind() to flush and invalidate new pages
898+ */
899+ amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
900+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
901+ bool userpage_invalidated = false;
902+ int i;
870903
871− amdgpu_vm_bo_invalidate(adev, bo, false);
904+ e->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
905+ sizeof(struct page *),
906+ GFP_KERNEL | __GFP_ZERO);
907+ if (!e->user_pages) {
908+ DRM_ERROR("kvmalloc_array failure\n");
909+ r = -ENOMEM;
910+ goto out_free_user_pages;
872911 }
873− }
874−
875− return amdgpu_cs_sync_rings(p);
876−}
877−
878−static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
879− struct amdgpu_cs_parser *parser)
880−{
881− struct amdgpu_fpriv *fpriv = parser->filp->driver_priv;
882− struct amdgpu_vm *vm = &fpriv->vm;
883− int r, ce_preempt = 0, de_preempt = 0;
884− struct amdgpu_ring *ring;
885− int i, j;
886−
887− for (i = 0, j = 0; i < parser->nchunks && j < parser->job->num_ibs; i++) {
888− struct amdgpu_cs_chunk *chunk;
889− struct amdgpu_ib *ib;
890− struct drm_amdgpu_cs_chunk_ib *chunk_ib;
891− struct drm_sched_entity *entity;
892912
893− chunk = &parser->chunks[i];
894− ib = &parser->job->ibs[j];
895− chunk_ib = (struct drm_amdgpu_cs_chunk_ib *)chunk->kdata;
896−
897− if (chunk->chunk_id != AMDGPU_CHUNK_ID_IB)
898− continue;
913+ r = amdgpu_ttm_tt_get_user_pages(bo, e->user_pages);
914+ if (r) {
915+ kvfree(e->user_pages);
916+ e->user_pages = NULL;
917+ goto out_free_user_pages;
918+ }
899919
900− if (chunk_ib->ip_type == AMDGPU_HW_IP_GFX &&
901− (amdgpu_mcbp || amdgpu_sriov_vf(adev))) {
902− if (chunk_ib->flags & AMDGPU_IB_FLAG_PREEMPT) {
903− if (chunk_ib->flags & AMDGPU_IB_FLAG_CE)
904− ce_preempt++;
905− else
906− de_preempt++;
920+ for (i = 0; i < bo->tbo.ttm->num_pages; i++) {
921+ if (bo->tbo.ttm->pages[i] != e->user_pages[i]) {
922+ userpage_invalidated = true;
923+ break;
907924 }
908−
909− /* each GFX command submit allows 0 or 1 IB preemptible for CE & DE */
910− if (ce_preempt > 1 || de_preempt > 1)
911− return -EINVAL;
912925 }
926+ e->user_invalidated = userpage_invalidated;
927+ }
913928
914− r = amdgpu_ctx_get_entity(parser->ctx, chunk_ib->ip_type,
915− chunk_ib->ip_instance, chunk_ib->ring,
916− &entity);
917− if (r)
918− return r;
919−
920− if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE)
921− parser->job->preamble_status |=
922− AMDGPU_PREAMBLE_IB_PRESENT;
923−
924− if (parser->entity && parser->entity != entity)
925− return -EINVAL;
926−
927− /* Return if there is no run queue associated with this entity.
928− * Possibly because of disabled HW IP*/
929− if (entity->rq == NULL)
930− return -EINVAL;
931−
932− parser->entity = entity;
933−
934− ring = to_amdgpu_ring(entity->rq->sched);
935− r = amdgpu_ib_get(adev, vm, ring->funcs->parse_cs ?
936− chunk_ib->ib_bytes : 0,
937− AMDGPU_IB_POOL_DELAYED, ib);
938− if (r) {
939− DRM_ERROR("Failed to get ib !\n");
940− return r;
941− }
929+ r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true,
930+ &duplicates);
931+ if (unlikely(r != 0)) {
932+ if (r != -ERESTARTSYS)
933+ DRM_ERROR("ttm_eu_reserve_buffers failed.\n");
934+ goto out_free_user_pages;
935+ }
942936
943− ib->gpu_addr = chunk_ib->va_start;
944− ib->length_dw = chunk_ib->ib_bytes / 4;
945− ib->flags = chunk_ib->flags;
937+ amdgpu_bo_list_for_each_entry(e, p->bo_list) {
938+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
946939
947− j++;
940+ e->bo_va = amdgpu_vm_bo_find(vm, bo);
948941 }
949942
950− /* MM engine doesn't support user fences */
951− ring = to_amdgpu_ring(parser->entity->rq->sched);
952− if (parser->job->uf_addr && ring->funcs->no_user_fence)
953− return -EINVAL;
943+ amdgpu_cs_get_threshold_for_moves(p->adev, &p->bytes_moved_threshold,
944+ &p->bytes_moved_vis_threshold);
945+ p->bytes_moved = 0;
946+ p->bytes_moved_vis = 0;
954947
955− return 0;
956−}
948+ r = amdgpu_vm_validate_pt_bos(p->adev, &fpriv->vm,
949+ amdgpu_cs_bo_validate, p);
950+ if (r) {
951+ DRM_ERROR("amdgpu_vm_validate_pt_bos() failed.\n");
952+ goto error_validate;
953+ }
957954
958−static int amdgpu_cs_process_fence_dep(struct amdgpu_cs_parser *p,
959− struct amdgpu_cs_chunk *chunk)
960−{
961− struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
962− unsigned num_deps;
963− int i, r;
964− struct drm_amdgpu_cs_chunk_dep *deps;
955+ r = amdgpu_cs_list_validate(p, &duplicates);
956+ if (r)
957+ goto error_validate;
965958
966− deps = (struct drm_amdgpu_cs_chunk_dep *)chunk->kdata;
967− num_deps = chunk->length_dw * 4 /
968− sizeof(struct drm_amdgpu_cs_chunk_dep);
959+ r = amdgpu_cs_list_validate(p, &p->validated);
960+ if (r)
961+ goto error_validate;
969962
970− for (i = 0; i < num_deps; ++i) {
971− struct amdgpu_ctx *ctx;
972− struct drm_sched_entity *entity;
973− struct dma_fence *fence;
963+ if (p->uf_entry.tv.bo) {
964+ struct amdgpu_bo *uf = ttm_to_amdgpu_bo(p->uf_entry.tv.bo);
974965
975− ctx = amdgpu_ctx_get(fpriv, deps[i].ctx_id);
976− if (ctx == NULL)
977− return -EINVAL;
966+ r = amdgpu_ttm_alloc_gart(&uf->tbo);
967+ if (r)
968+ goto error_validate;
978969
979− r = amdgpu_ctx_get_entity(ctx, deps[i].ip_type,
980− deps[i].ip_instance,
981− deps[i].ring, &entity);
982− if (r) {
983− amdgpu_ctx_put(ctx);
984− return r;
985− }
970+ p->gang_leader->uf_addr += amdgpu_bo_gpu_offset(uf);
971+ }
986972
987− fence = amdgpu_ctx_get_fence(ctx, entity, deps[i].handle);
988− amdgpu_ctx_put(ctx);
973+ amdgpu_cs_report_moved_bytes(p->adev, p->bytes_moved,
974+ p->bytes_moved_vis);
989975
990− if (IS_ERR(fence))
991− return PTR_ERR(fence);
992− else if (!fence)
993− continue;
976+ for (i = 0; i < p->gang_size; ++i)
977+ amdgpu_job_set_resources(p->jobs[i], p->bo_list->gds_obj,
978+ p->bo_list->gws_obj,
979+ p->bo_list->oa_obj);
980+ return 0;
994981
995− if (chunk->chunk_id == AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES) {
996− struct drm_sched_fence *s_fence;
997− struct dma_fence *old = fence;
982+error_validate:
983+ ttm_eu_backoff_reservation(&p->ticket, &p->validated);
998984
999− s_fence = to_drm_sched_fence(fence);
1000− fence = dma_fence_get(&s_fence->scheduled);
1001− dma_fence_put(old);
1002− }
985+out_free_user_pages:
986+ amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
987+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
1003988
1004− r = amdgpu_sync_fence(&p->job->sync, fence);
1005− dma_fence_put(fence);
1006− if (r)
1007− return r;
989+ if (!e->user_pages)
990+ continue;
991+ amdgpu_ttm_tt_get_user_pages_done(bo->tbo.ttm);
992+ kvfree(e->user_pages);
993+ e->user_pages = NULL;
1008994 }
1009− return 0;
995+ return r;
1010996 }
1011997
1012−static int amdgpu_syncobj_lookup_and_add_to_sync(struct amdgpu_cs_parser *p,
1013− uint32_t handle, u64 point,
1014− u64 flags)
998+static void trace_amdgpu_cs_ibs(struct amdgpu_cs_parser *p)
1015999 {
1016− struct dma_fence *fence;
1017− int r;
1000+ int i, j;
10181001
1019− r = drm_syncobj_find_fence(p->filp, handle, point, flags, &fence);
1020− if (r) {
1021− DRM_ERROR("syncobj %u failed to find fence @ %llu (%d)!\n",
1022− handle, point, r);
1023− return r;
1024− }
1002+ if (!trace_amdgpu_cs_enabled())
1003+ return;
10251004
1026− r = amdgpu_sync_fence(&p->job->sync, fence);
1027− dma_fence_put(fence);
1005+ for (i = 0; i < p->gang_size; ++i) {
1006+ struct amdgpu_job *job = p->jobs[i];
10281007
1029− return r;
1008+ for (j = 0; j < job->num_ibs; ++j)
1009+ trace_amdgpu_cs(p, job, &job->ibs[j]);
1010+ }
10301011 }
10311012
1032−static int amdgpu_cs_process_syncobj_in_dep(struct amdgpu_cs_parser *p,
1033− struct amdgpu_cs_chunk *chunk)
1013+static int amdgpu_cs_patch_ibs(struct amdgpu_cs_parser *p,
1014+ struct amdgpu_job *job)
10341015 {
1035− struct drm_amdgpu_cs_chunk_sem *deps;
1036− unsigned num_deps;
1037− int i, r;
1016+ struct amdgpu_ring *ring = amdgpu_job_ring(job);
1017+ unsigned int i;
1018+ int r;
10381019
1039− deps = (struct drm_amdgpu_cs_chunk_sem *)chunk->kdata;
1040− num_deps = chunk->length_dw * 4 /
1041− sizeof(struct drm_amdgpu_cs_chunk_sem);
1042− for (i = 0; i < num_deps; ++i) {
1043− r = amdgpu_syncobj_lookup_and_add_to_sync(p, deps[i].handle,
1044− 0, 0);
1045− if (r)
1020+ /* Only for UVD/VCE VM emulation */
1021+ if (!ring->funcs->parse_cs && !ring->funcs->patch_cs_in_place)
1022+ return 0;
1023+
1024+ for (i = 0; i < job->num_ibs; ++i) {
1025+ struct amdgpu_ib *ib = &job->ibs[i];
1026+ struct amdgpu_bo_va_mapping *m;
1027+ struct amdgpu_bo *aobj;
1028+ uint64_t va_start;
1029+ uint8_t *kptr;
1030+
1031+ va_start = ib->gpu_addr & AMDGPU_GMC_HOLE_MASK;
1032+ r = amdgpu_cs_find_mapping(p, va_start, &aobj, &m);
1033+ if (r) {
1034+ DRM_ERROR("IB va_start is invalid\n");
10461035 return r;
1036+ }
1037+
1038+ if ((va_start + ib->length_dw * 4) >
1039+ (m->last + 1) * AMDGPU_GPU_PAGE_SIZE) {
1040+ DRM_ERROR("IB va_start+ib_bytes is invalid\n");
1041+ return -EINVAL;
1042+ }
1043+
1044+ /* the IB should be reserved at this point */
1045+ r = amdgpu_bo_kmap(aobj, (void **)&kptr);
1046+ if (r) {
1047+ return r;
1048+ }
1049+
1050+ kptr += va_start - (m->start * AMDGPU_GPU_PAGE_SIZE);
1051+
1052+ if (ring->funcs->parse_cs) {
1053+ memcpy(ib->ptr, kptr, ib->length_dw * 4);
1054+ amdgpu_bo_kunmap(aobj);
1055+
1056+ r = amdgpu_ring_parse_cs(ring, p, job, ib);
1057+ if (r)
1058+ return r;
1059+ } else {
1060+ ib->ptr = (uint32_t *)kptr;
1061+ r = amdgpu_ring_patch_cs_in_place(ring, p, job, ib);
1062+ amdgpu_bo_kunmap(aobj);
1063+ if (r)
1064+ return r;
1065+ }
10471066 }
10481067
10491068 return 0;
10501069 }
10511070
1052−
1053−static int amdgpu_cs_process_syncobj_timeline_in_dep(struct amdgpu_cs_parser *p,
1054− struct amdgpu_cs_chunk *chunk)
1071+static int amdgpu_cs_patch_jobs(struct amdgpu_cs_parser *p)
10551072 {
1056− struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps;
1057− unsigned num_deps;
1058− int i, r;
1073+ unsigned int i;
1074+ int r;
10591075
1060− syncobj_deps = (struct drm_amdgpu_cs_chunk_syncobj *)chunk->kdata;
1061− num_deps = chunk->length_dw * 4 /
1062− sizeof(struct drm_amdgpu_cs_chunk_syncobj);
1063− for (i = 0; i < num_deps; ++i) {
1064− r = amdgpu_syncobj_lookup_and_add_to_sync(p,
1065− syncobj_deps[i].handle,
1066− syncobj_deps[i].point,
1067− syncobj_deps[i].flags);
1076+ for (i = 0; i < p->gang_size; ++i) {
1077+ r = amdgpu_cs_patch_ibs(p, p->jobs[i]);
10681078 if (r)
10691079 return r;
10701080 }
1071−
10721081 return 0;
10731082 }
10741083
1075−static int amdgpu_cs_process_syncobj_out_dep(struct amdgpu_cs_parser *p,
1076− struct amdgpu_cs_chunk *chunk)
1084+static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
10771085 {
1078− struct drm_amdgpu_cs_chunk_sem *deps;
1079− unsigned num_deps;
1080− int i;
1081−
1082− deps = (struct drm_amdgpu_cs_chunk_sem *)chunk->kdata;
1083− num_deps = chunk->length_dw * 4 /
1084− sizeof(struct drm_amdgpu_cs_chunk_sem);
1086+ struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
1087+ struct amdgpu_job *job = p->gang_leader;
1088+ struct amdgpu_device *adev = p->adev;
1089+ struct amdgpu_vm *vm = &fpriv->vm;
1090+ struct amdgpu_bo_list_entry *e;
1091+ struct amdgpu_bo_va *bo_va;
1092+ struct amdgpu_bo *bo;
1093+ unsigned int i;
1094+ int r;
10851095
1086− if (p->post_deps)
1087− return -EINVAL;
1096+ r = amdgpu_vm_clear_freed(adev, vm, NULL);
1097+ if (r)
1098+ return r;
10881099
1089− p->post_deps = kmalloc_array(num_deps, sizeof(*p->post_deps),
1090− GFP_KERNEL);
1091− p->num_post_deps = 0;
1100+ r = amdgpu_vm_bo_update(adev, fpriv->prt_va, false);
1101+ if (r)
1102+ return r;
10921103
1093− if (!p->post_deps)
1094− return -ENOMEM;
1104+ r = amdgpu_sync_fence(&job->sync, fpriv->prt_va->last_pt_update);
1105+ if (r)
1106+ return r;
10951107
1108+ if (fpriv->csa_va) {
1109+ bo_va = fpriv->csa_va;
1110+ BUG_ON(!bo_va);
1111+ r = amdgpu_vm_bo_update(adev, bo_va, false);
1112+ if (r)
1113+ return r;
10961114
1097− for (i = 0; i < num_deps; ++i) {
1098− p->post_deps[i].syncobj =
1099− drm_syncobj_find(p->filp, deps[i].handle);
1100− if (!p->post_deps[i].syncobj)
1101− return -EINVAL;
1102− p->post_deps[i].chain = NULL;
1103− p->post_deps[i].point = 0;
1104− p->num_post_deps++;
1115+ r = amdgpu_sync_fence(&job->sync, bo_va->last_pt_update);
1116+ if (r)
1117+ return r;
11051118 }
11061119
1107− return 0;
1108−}
1120+ amdgpu_bo_list_for_each_entry(e, p->bo_list) {
1121+ /* ignore duplicates */
1122+ bo = ttm_to_amdgpu_bo(e->tv.bo);
1123+ if (!bo)
1124+ continue;
11091125
1126+ bo_va = e->bo_va;
1127+ if (bo_va == NULL)
1128+ continue;
11101129
1111−static int amdgpu_cs_process_syncobj_timeline_out_dep(struct amdgpu_cs_parser *p,
1112− struct amdgpu_cs_chunk *chunk)
1113−{
1114− struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps;
1115− unsigned num_deps;
1116− int i;
1130+ r = amdgpu_vm_bo_update(adev, bo_va, false);
1131+ if (r)
1132+ return r;
11171133
1118− syncobj_deps = (struct drm_amdgpu_cs_chunk_syncobj *)chunk->kdata;
1119− num_deps = chunk->length_dw * 4 /
1120− sizeof(struct drm_amdgpu_cs_chunk_syncobj);
1134+ r = amdgpu_sync_fence(&job->sync, bo_va->last_pt_update);
1135+ if (r)
1136+ return r;
1137+ }
11211138
1122− if (p->post_deps)
1123− return -EINVAL;
1139+ r = amdgpu_vm_handle_moved(adev, vm);
1140+ if (r)
1141+ return r;
11241142
1125− p->post_deps = kmalloc_array(num_deps, sizeof(*p->post_deps),
1126− GFP_KERNEL);
1127− p->num_post_deps = 0;
1143+ r = amdgpu_vm_update_pdes(adev, vm, false);
1144+ if (r)
1145+ return r;
11281146
1129− if (!p->post_deps)
1130− return -ENOMEM;
1147+ r = amdgpu_sync_fence(&job->sync, vm->last_update);
1148+ if (r)
1149+ return r;
11311150
1132− for (i = 0; i < num_deps; ++i) {
1133− struct amdgpu_cs_post_dep *dep = &p->post_deps[i];
1151+ for (i = 0; i < p->gang_size; ++i) {
1152+ job = p->jobs[i];
11341153
1135− dep->chain = NULL;
1136− if (syncobj_deps[i].point) {
1137− dep->chain = dma_fence_chain_alloc();
1138− if (!dep->chain)
1139− return -ENOMEM;
1140− }
1154+ if (!job->vm)
1155+ continue;
11411156
1142− dep->syncobj = drm_syncobj_find(p->filp,
1143− syncobj_deps[i].handle);
1144− if (!dep->syncobj) {
1145− dma_fence_chain_free(dep->chain);
1146− return -EINVAL;
1157+ job->vm_pd_addr = amdgpu_gmc_pd_addr(vm->root.bo);
1158+ }
1159+
1160+ if (amdgpu_vm_debug) {
1161+ /* Invalidate all BOs to test for userspace bugs */
1162+ amdgpu_bo_list_for_each_entry(e, p->bo_list) {
1163+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
1164+
1165+ /* ignore duplicates */
1166+ if (!bo)
1167+ continue;
1168+
1169+ amdgpu_vm_bo_invalidate(adev, bo, false);
11471170 }
1148− dep->point = syncobj_deps[i].point;
1149− p->num_post_deps++;
11501171 }
11511172
11521173 return 0;
11531174 }
11541175
1155−static int amdgpu_cs_dependencies(struct amdgpu_device *adev,
1156− struct amdgpu_cs_parser *p)
1176+static int amdgpu_cs_sync_rings(struct amdgpu_cs_parser *p)
11571177 {
1158− int i, r;
1159−
1160− /* TODO: Investigate why we still need the context lock */
1161− mutex_unlock(&p->ctx->lock);
1178+ struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
1179+ struct amdgpu_job *leader = p->gang_leader;
1180+ struct amdgpu_bo_list_entry *e;
1181+ unsigned int i;
1182+ int r;
11621183
1163− for (i = 0; i < p->nchunks; ++i) {
1164− struct amdgpu_cs_chunk *chunk;
1184+ list_for_each_entry(e, &p->validated, tv.head) {
1185+ struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
1186+ struct dma_resv *resv = bo->tbo.base.resv;
1187+ enum amdgpu_sync_mode sync_mode;
11651188
1166− chunk = &p->chunks[i];
1189+ sync_mode = amdgpu_bo_explicit_sync(bo) ?
1190+ AMDGPU_SYNC_EXPLICIT : AMDGPU_SYNC_NE_OWNER;
1191+ r = amdgpu_sync_resv(p->adev, &leader->sync, resv, sync_mode,
1192+ &fpriv->vm);
1193+ if (r)
1194+ return r;
1195+ }
11671196
1168− switch (chunk->chunk_id) {
1169− case AMDGPU_CHUNK_ID_DEPENDENCIES:
1170− case AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES:
1171− r = amdgpu_cs_process_fence_dep(p, chunk);
1172− if (r)
1173− goto out;
1174− break;
1175− case AMDGPU_CHUNK_ID_SYNCOBJ_IN:
1176− r = amdgpu_cs_process_syncobj_in_dep(p, chunk);
1177− if (r)
1178− goto out;
1179− break;
1180− case AMDGPU_CHUNK_ID_SYNCOBJ_OUT:
1181− r = amdgpu_cs_process_syncobj_out_dep(p, chunk);
1182− if (r)
1183− goto out;
1184− break;
1185− case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT:
1186− r = amdgpu_cs_process_syncobj_timeline_in_dep(p, chunk);
1187− if (r)
1188− goto out;
1189− break;
1190− case AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL:
1191− r = amdgpu_cs_process_syncobj_timeline_out_dep(p, chunk);
1192− if (r)
1193− goto out;
1194− break;
1195− }
1197+ for (i = 0; i < p->gang_size - 1; ++i) {
1198+ r = amdgpu_sync_clone(&leader->sync, &p->jobs[i]->sync);
1199+ if (r)
1200+ return r;
11961201 }
11971202
1198−out:
1199− mutex_lock(&p->ctx->lock);
1203+ r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_size - 1]);
1204+ if (r && r != -ERESTARTSYS)
1205+ DRM_ERROR("amdgpu_ctx_wait_prev_fence failed.\n");
1206+
12001207 return r;
12011208 }
12021209
@@ -1221,20 +1228,28 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 18 unmodified lines
12211228 union drm_amdgpu_cs *cs)
12221229 {
12231230 struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
1224− struct drm_sched_entity *entity = p->entity;
1231+ struct amdgpu_job *leader = p->gang_leader;
12251232 struct amdgpu_bo_list_entry *e;
1226− struct amdgpu_job *job;
1233+ unsigned int i;
12271234 uint64_t seq;
12281235 int r;
12291236
1230− job = p->job;
1231− p->job = NULL;
1237+ for (i = 0; i < p->gang_size; ++i)
1238+ drm_sched_job_arm(&p->jobs[i]->base);
12321239
1233− r = drm_sched_job_init(&job->base, entity, &fpriv->vm);
1234− if (r)
1235− goto error_unlock;
1240+ for (i = 0; i < (p->gang_size - 1); ++i) {
1241+ struct dma_fence *fence;
1242+
1243+ fence = &p->jobs[i]->base.s_fence->scheduled;
1244+ r = amdgpu_sync_fence(&leader->sync, fence);
1245+ if (r)
1246+ goto error_cleanup;
1247+ }
12361248
1237− drm_sched_job_arm(&job->base);
1249+ if (p->gang_size > 1) {
1250+ for (i = 0; i < p->gang_size; ++i)
1251+ amdgpu_job_set_gang_leader(p->jobs[i], leader);
1252+ }
12381253
12391254 /* No memory allocation is allowed while holding the notifier lock.
12401255 * The lock is held until amdgpu_cs_submit is finished and fence is
@@ -1245,6 +1260,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 4 unmodified lines
12451260 /* If userptr are invalidated after amdgpu_cs_parser_bos(), return
12461261 * -EAGAIN, drmIoctl in libdrm will restart the amdgpu_cs_ioctl.
12471262 */
1263+ r = 0;
12481264 amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
12491265 struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo);
12501266
@@ -1252,67 +1268,96 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p, · 1 unmodified line
12521268 }
12531269 if (r) {
12541270 r = -EAGAIN;
1255− goto error_abort;
1271+ goto error_unlock;
12561272 }
12571273
1258− p->fence = dma_fence_get(&job->base.s_fence->finished);
1274+ p->fence = dma_fence_get(&leader->base.s_fence->finished);
1275+ list_for_each_entry(e, &p->validated, tv.head) {
1276+
1277+ /* Everybody except for the gang leader uses READ */
1278+ for (i = 0; i < (p->gang_size - 1); ++i) {
1279+ dma_resv_add_fence(e->tv.bo->base.resv,
1280+ &p->jobs[i]->base.s_fence->finished,
1281+ DMA_RESV_USAGE_READ);
1282+ }
1283+
1284+ /* The gang leader is remembered as writer */
1285+ e->tv.num_shared = 0;
1286+ }
12591287
1260− seq = amdgpu_ctx_add_fence(p->ctx, entity, p->fence);
1288+ seq = amdgpu_ctx_add_fence(p->ctx, p->entities[p->gang_size - 1],
1289+ p->fence);
12611290 amdgpu_cs_post_dependencies(p);
12621291
1263− if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) &&
1292+ if ((leader->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) &&
12641293 !p->ctx->preamble_presented) {
1265− job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
1294+ leader->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
12661295 p->ctx->preamble_presented = true;
12671296 }
12681297
12691298 cs->out.handle = seq;
1270− job->uf_sequence = seq;
1299+ leader->uf_sequence = seq;
12711300
1272− amdgpu_job_free_resources(job);
1273−
1274− trace_amdgpu_cs_ioctl(job);
12751301 amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->ticket);
1276− drm_sched_entity_push_job(&job->base);
1302+ for (i = 0; i < p->gang_size; ++i) {
1303+ amdgpu_job_free_resources(p->jobs[i]);
1304+ trace_amdgpu_cs_ioctl(p->jobs[i]);
1305+ drm_sched_entity_push_job(&p->jobs[i]->base);
1306+ p->jobs[i] = NULL;
1307+ }
12771308
12781309 amdgpu_vm_move_to_lru_tail(p->adev, &fpriv->vm);
1279−
1280− /* Make sure all BOs are remembered as writers */
1281− amdgpu_bo_list_for_each_entry(e, p->bo_list)
1282− e->tv.num_shared = 0;
1283−
12841310 ttm_eu_fence_buffer_objects(&p->ticket, &p->validated, p->fence);
1311+
12851312 mutex_unlock(&p->adev->notifier_lock);
12861313 mutex_unlock(&p->bo_list->bo_list_mutex);
1287−
12881314 return 0;
12891315
1290−error_abort:
1291− drm_sched_job_cleanup(&job->base);
1316+error_unlock:
12921317 mutex_unlock(&p->adev->notifier_lock);
12931318
1294−error_unlock:
1295− amdgpu_job_free(job);
1319+error_cleanup:
1320+ for (i = 0; i < p->gang_size; ++i)
1321+ drm_sched_job_cleanup(&p->jobs[i]->base);
12961322 return r;
12971323 }
12981324
1299−static void trace_amdgpu_cs_ibs(struct amdgpu_cs_parser *parser)
1325+/* Cleanup the parser structure */
1326+static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser)
13001327 {
1301− int i;
1328+ unsigned i;
13021329
1303− if (!trace_amdgpu_cs_enabled())
1304− return;
1330+ for (i = 0; i < parser->num_post_deps; i++) {
1331+ drm_syncobj_put(parser->post_deps[i].syncobj);
1332+ kfree(parser->post_deps[i].chain);
1333+ }
1334+ kfree(parser->post_deps);
1335+
1336+ dma_fence_put(parser->fence);
1337+
1338+ if (parser->ctx)
1339+ amdgpu_ctx_put(parser->ctx);
1340+ if (parser->bo_list)
1341+ amdgpu_bo_list_put(parser->bo_list);
1342+
1343+ for (i = 0; i < parser->nchunks; i++)
1344+ kvfree(parser->chunks[i].kdata);
1345+ kvfree(parser->chunks);
1346+ for (i = 0; i < parser->gang_size; ++i) {
1347+ if (parser->jobs[i])
1348+ amdgpu_job_free(parser->jobs[i]);
1349+ }
1350+ if (parser->uf_entry.tv.bo) {
1351+ struct amdgpu_bo *uf = ttm_to_amdgpu_bo(parser->uf_entry.tv.bo);
13051352
1306− for (i = 0; i < parser->job->num_ibs; i++)
1307− trace_amdgpu_cs(parser, i);
1353+ amdgpu_bo_unref(&uf);
1354+ }
13081355 }
13091356
13101357 int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
13111358 {
13121359 struct amdgpu_device *adev = drm_to_adev(dev);
1313− union drm_amdgpu_cs *cs = data;
1314− struct amdgpu_cs_parser parser = {};
1315− bool reserved_buffers = false;
1360+ struct amdgpu_cs_parser parser;
13161361 int r;
13171362
13181363 if (amdgpu_ras_intr_triggered())
@@ -1321,25 +1366,20 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · 2 unmodified lines
13211366 if (!adev->accel_working)
13221367 return -EBUSY;
13231368
1324− parser.adev = adev;
1325− parser.filp = filp;
1326−
1327− r = amdgpu_cs_parser_init(&parser, data);
1369+ r = amdgpu_cs_parser_init(&parser, adev, filp, data);
13281370 if (r) {
13291371 if (printk_ratelimit())
13301372 DRM_ERROR("Failed to initialize parser %d!\n", r);
1331− goto out;
1373+ return r;
13321374 }
13331375
1334− r = amdgpu_cs_ib_fill(adev, &parser);
1376+ r = amdgpu_cs_pass1(&parser, data);
13351377 if (r)
1336− goto out;
1378+ goto error_fini;
13371379
1338− r = amdgpu_cs_dependencies(adev, &parser);
1339− if (r) {
1340− DRM_ERROR("Failed in the dependencies handling %d!\n", r);
1341− goto out;
1342− }
1380+ r = amdgpu_cs_pass2(&parser);
1381+ if (r)
1382+ goto error_fini;
13431383
13441384 r = amdgpu_cs_parser_bos(&parser, data);
13451385 if (r) {
@@ -1347,22 +1387,36 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) · 1 unmodified line
13471387 DRM_ERROR("Not enough memory for command submission!\n");
13481388 else if (r != -ERESTARTSYS && r != -EAGAIN)
13491389 DRM_ERROR("Failed to process the buffer list %d!\n", r);
1350− goto out;
1390+ goto error_fini;
13511391 }
13521392
1353− reserved_buffers = true;
1393+ r = amdgpu_cs_patch_jobs(&parser);
1394+ if (r)
1395+ goto error_backoff;
1396+
1397+ r = amdgpu_cs_vm_handling(&parser);
1398+ if (r)
1399+ goto error_backoff;
1400+
1401+ r = amdgpu_cs_sync_rings(&parser);
1402+ if (r)
1403+ goto error_backoff;
13541404
13551405 trace_amdgpu_cs_ibs(&parser);
13561406
1357− r = amdgpu_cs_vm_handling(&parser);
1407+ r = amdgpu_cs_submit(&parser, data);
13581408 if (r)
1359− goto out;
1409+ goto error_backoff;
13601410
1361− r = amdgpu_cs_submit(&parser, cs);
1411+ amdgpu_cs_parser_fini(&parser);
1412+ return 0;
13621413
1363−out:
1364− amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
1414+error_backoff:
1415+ ttm_eu_backoff_reservation(&parser.ticket, &parser.validated);
1416+ mutex_unlock(&parser.bo_list->bo_list_mutex);
13651417
1418+error_fini:
1419+ amdgpu_cs_parser_fini(&parser);
13661420 return r;
13671421 }
13681422
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h+7−3
@@ -27,6 +27,8 @@ · 26 unmodified lines
2727 #include "amdgpu_bo_list.h"
2828 #include "amdgpu_ring.h"
2929
30+#define AMDGPU_CS_GANG_SIZE 4
31+
3032 struct amdgpu_bo_va_mapping;
3133
3234 struct amdgpu_cs_chunk {
@@ -50,9 +52,11 @@ struct amdgpu_cs_parser { · 17 unmodified lines
5052 unsigned nchunks;
5153 struct amdgpu_cs_chunk *chunks;
5254
53− /* scheduler job object */
54− struct amdgpu_job *job;
55− struct drm_sched_entity *entity;
55+ /* scheduler job objects */
56+ unsigned int gang_size;
57+ struct drm_sched_entity *entities[AMDGPU_CS_GANG_SIZE];
58+ struct amdgpu_job *jobs[AMDGPU_CS_GANG_SIZE];
59+ struct amdgpu_job *gang_leader;
5660
5761 /* buffer objects */
5862 struct ww_acquire_ctx ticket;
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c+2−4
@@ -315,7 +315,6 @@ static int amdgpu_ctx_init(struct amdgpu_ctx_mgr *mgr, int32_t priority, · 314 unmodified lines
315315 kref_init(&ctx->refcount);
316316 ctx->mgr = mgr;
317317 spin_lock_init(&ctx->ring_lock);
318− mutex_init(&ctx->lock);
319318
320319 ctx->reset_counter = atomic_read(&mgr->adev->gpu_reset_counter);
321320 ctx->reset_counter_query = ctx->reset_counter;
@@ -402,12 +401,11 @@ static void amdgpu_ctx_fini(struct kref *ref) · 80 unmodified lines
402401 }
403402 }
404403
405− if (drm_dev_enter(&adev->ddev, &idx)) {
404+ if (drm_dev_enter(adev_to_drm(adev), &idx)) {
406405 amdgpu_ctx_set_stable_pstate(ctx, ctx->stable_pstate);
407406 drm_dev_exit(idx);
408407 }
409408
410− mutex_destroy(&ctx->lock);
411409 kfree(ctx);
412410 }
413411
@@ -848,7 +846,7 @@ void amdgpu_ctx_mgr_init(struct amdgpu_ctx_mgr *mgr, · 434 unmodified lines
848846
849847 mgr->adev = adev;
850848 mutex_init(&mgr->lock);
851− idr_init(&mgr->ctx_handles);
849+ idr_init_base(&mgr->ctx_handles, 1);
852850
853851 for (i = 0; i < AMDGPU_HW_IP_NUM; ++i)
854852 atomic64_set(&mgr->time_spend[i], 0);
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h+0−1
@@ -53,7 +53,6 @@ struct amdgpu_ctx { · 52 unmodified lines
5353 bool preamble_presented;
5454 int32_t init_priority;
5555 int32_t override_priority;
56− struct mutex lock;
5756 atomic_t guilty;
5857 unsigned long ras_counter_ce;
5958 unsigned long ras_counter_ue;
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c+170−0
@@ -1042,6 +1042,157 @@ err: · 1041 unmodified lines
10421042 return r;
10431043 }
10441044
1045+/**
1046+ * amdgpu_debugfs_gfxoff_residency_read - Read GFXOFF residency
1047+ *
1048+ * @f: open file handle
1049+ * @buf: User buffer to store read data in
1050+ * @size: Number of bytes to read
1051+ * @pos: Offset to seek to
1052+ *
1053+ * Read the last residency value logged. It doesn't auto update, one needs to
1054+ * stop logging before getting the current value.
1055+ */
1056+static ssize_t amdgpu_debugfs_gfxoff_residency_read(struct file *f, char __user *buf,
1057+ size_t size, loff_t *pos)
1058+{
1059+ struct amdgpu_device *adev = file_inode(f)->i_private;
1060+ ssize_t result = 0;
1061+ int r;
1062+
1063+ if (size & 0x3 || *pos & 0x3)
1064+ return -EINVAL;
1065+
1066+ r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
1067+ if (r < 0) {
1068+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1069+ return r;
1070+ }
1071+
1072+ while (size) {
1073+ uint32_t value;
1074+
1075+ r = amdgpu_get_gfx_off_residency(adev, &value);
1076+ if (r)
1077+ goto out;
1078+
1079+ r = put_user(value, (uint32_t *)buf);
1080+ if (r)
1081+ goto out;
1082+
1083+ result += 4;
1084+ buf += 4;
1085+ *pos += 4;
1086+ size -= 4;
1087+ }
1088+
1089+ r = result;
1090+out:
1091+ pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
1092+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1093+
1094+ return r;
1095+}
1096+
1097+/**
1098+ * amdgpu_debugfs_gfxoff_residency_write - Log GFXOFF Residency
1099+ *
1100+ * @f: open file handle
1101+ * @buf: User buffer to write data from
1102+ * @size: Number of bytes to write
1103+ * @pos: Offset to seek to
1104+ *
1105+ * Write a 32-bit non-zero to start logging; write a 32-bit zero to stop
1106+ */
1107+static ssize_t amdgpu_debugfs_gfxoff_residency_write(struct file *f, const char __user *buf,
1108+ size_t size, loff_t *pos)
1109+{
1110+ struct amdgpu_device *adev = file_inode(f)->i_private;
1111+ ssize_t result = 0;
1112+ int r;
1113+
1114+ if (size & 0x3 || *pos & 0x3)
1115+ return -EINVAL;
1116+
1117+ r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
1118+ if (r < 0) {
1119+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1120+ return r;
1121+ }
1122+
1123+ while (size) {
1124+ u32 value;
1125+
1126+ r = get_user(value, (uint32_t *)buf);
1127+ if (r)
1128+ goto out;
1129+
1130+ amdgpu_set_gfx_off_residency(adev, value ? true : false);
1131+
1132+ result += 4;
1133+ buf += 4;
1134+ *pos += 4;
1135+ size -= 4;
1136+ }
1137+
1138+ r = result;
1139+out:
1140+ pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
1141+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1142+
1143+ return r;
1144+}
1145+
1146+
1147+/**
1148+ * amdgpu_debugfs_gfxoff_count_read - Read GFXOFF entry count
1149+ *
1150+ * @f: open file handle
1151+ * @buf: User buffer to store read data in
1152+ * @size: Number of bytes to read
1153+ * @pos: Offset to seek to
1154+ */
1155+static ssize_t amdgpu_debugfs_gfxoff_count_read(struct file *f, char __user *buf,
1156+ size_t size, loff_t *pos)
1157+{
1158+ struct amdgpu_device *adev = file_inode(f)->i_private;
1159+ ssize_t result = 0;
1160+ int r;
1161+
1162+ if (size & 0x3 || *pos & 0x3)
1163+ return -EINVAL;
1164+
1165+ r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
1166+ if (r < 0) {
1167+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1168+ return r;
1169+ }
1170+
1171+ while (size) {
1172+ u64 value = 0;
1173+
1174+ r = amdgpu_get_gfx_off_entrycount(adev, &value);
1175+ if (r)
1176+ goto out;
1177+
1178+ r = put_user(value, (u64 *)buf);
1179+ if (r)
1180+ goto out;
1181+
1182+ result += 4;
1183+ buf += 4;
1184+ *pos += 4;
1185+ size -= 4;
1186+ }
1187+
1188+ r = result;
1189+out:
1190+ pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
1191+ pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
1192+
1193+ return r;
1194+}
1195+
10451196 /**
10461197 * amdgpu_debugfs_gfxoff_write - Enable/disable GFXOFF
10471198 *
@@ -1249,6 +1400,19 @@ static const struct file_operations amdgpu_debugfs_gfxoff_status_fops = { · 201 unmodified lines
12491400 .llseek = default_llseek
12501401 };
12511402
1403+static const struct file_operations amdgpu_debugfs_gfxoff_count_fops = {
1404+ .owner = THIS_MODULE,
1405+ .read = amdgpu_debugfs_gfxoff_count_read,
1406+ .llseek = default_llseek
1407+};
1408+
1409+static const struct file_operations amdgpu_debugfs_gfxoff_residency_fops = {
1410+ .owner = THIS_MODULE,
1411+ .read = amdgpu_debugfs_gfxoff_residency_read,
1412+ .write = amdgpu_debugfs_gfxoff_residency_write,
1413+ .llseek = default_llseek
1414+};
1415+
12521416 static const struct file_operations *debugfs_regs[] = {
12531417 &amdgpu_debugfs_regs_fops,
12541418 &amdgpu_debugfs_regs2_fops,
@@ -1261,6 +1425,8 @@ static const struct file_operations *debugfs_regs[] = { · 6 unmodified lines
12611425 &amdgpu_debugfs_gpr_fops,
12621426 &amdgpu_debugfs_gfxoff_fops,
12631427 &amdgpu_debugfs_gfxoff_status_fops,
1428+ &amdgpu_debugfs_gfxoff_count_fops,
1429+ &amdgpu_debugfs_gfxoff_residency_fops,
12641430 };
12651431
12661432 static const char *debugfs_regs_names[] = {
@@ -1275,6 +1441,8 @@ static const char *debugfs_regs_names[] = { · 8 unmodified lines
12751441 "amdgpu_gpr",
12761442 "amdgpu_gfxoff",
12771443 "amdgpu_gfxoff_status",
1444+ "amdgpu_gfxoff_count",
1445+ "amdgpu_gfxoff_residency",
12781446 };
12791447
12801448 /**
@@ -1786,6 +1954,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) · 505 unmodified lines
17861954 return PTR_ERR(ent);
17871955 }
17881956
1957+ debugfs_create_u32("amdgpu_reset_level", 0600, root, &adev->amdgpu_reset_level_mask);
1958+
17891959 /* Register debugfs entries for amdgpu_ttm */
17901960 amdgpu_ttm_debugfs_init(adev);
17911961 amdgpu_debugfs_pm_init(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+100−22
@@ -2459,19 +2459,21 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) · 2458 unmodified lines
24592459 */
24602460 if (adev->gmc.xgmi.num_physical_nodes > 1) {
24612461 if (amdgpu_xgmi_add_device(adev) == 0) {
2462− struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev);
2462+ if (!amdgpu_sriov_vf(adev)) {
2463+ struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev);
24632464
2464− if (!hive->reset_domain ||
2465− !amdgpu_reset_get_reset_domain(hive->reset_domain)) {
2466− r = -ENOENT;
2465+ if (!hive->reset_domain ||
2466+ !amdgpu_reset_get_reset_domain(hive->reset_domain)) {
2467+ r = -ENOENT;
2468+ amdgpu_put_xgmi_hive(hive);
2469+ goto init_failed;
2470+ }
2471+
2472+ /* Drop the early temporary reset domain we created for device */
2473+ amdgpu_reset_put_reset_domain(adev->reset_domain);
2474+ adev->reset_domain = hive->reset_domain;
24672475 amdgpu_put_xgmi_hive(hive);
2468− goto init_failed;
24692476 }
2470−
2471− /* Drop the early temporary reset domain we created for device */
2472− amdgpu_reset_put_reset_domain(adev->reset_domain);
2473− adev->reset_domain = hive->reset_domain;
2474− amdgpu_put_xgmi_hive(hive);
24752477 }
24762478 }
24772479
@@ -3510,6 +3512,7 @@ int amdgpu_device_init(struct amdgpu_device *adev, · 1032 unmodified lines
35103512 adev->gmc.gart_size = 512 * 1024 * 1024;
35113513 adev->accel_working = false;
35123514 adev->num_rings = 0;
3515+ RCU_INIT_POINTER(adev->gang_submit, dma_fence_get_stub());
35133516 adev->mman.buffer_funcs = NULL;
35143517 adev->mman.buffer_funcs_ring = NULL;
35153518 adev->vm_manager.vm_pte_funcs = NULL;
@@ -3588,6 +3591,8 @@ int amdgpu_device_init(struct amdgpu_device *adev, · 72 unmodified lines
35883591 INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
35893592
35903593 adev->gfx.gfx_off_req_count = 1;
3594+ adev->gfx.gfx_off_residency = 0;
3595+ adev->gfx.gfx_off_entrycount = 0;
35913596 adev->pm.ac_power = power_supply_is_system_supplied() > 0;
35923597
35933598 atomic_set(&adev->throttling_logging_enabled, 1);
@@ -3976,8 +3981,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev) · 382 unmodified lines
39763981
39773982 amdgpu_gart_dummy_page_fini(adev);
39783983
3979− if (drm_dev_is_unplugged(adev_to_drm(adev)))
3980− amdgpu_device_unmap_mmio(adev);
3984+ amdgpu_device_unmap_mmio(adev);
39813985
39823986 }
39833987
@@ -3990,6 +3994,7 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev) · 6 unmodified lines
39903994 release_firmware(adev->firmware.gpu_info_fw);
39913995 adev->firmware.gpu_info_fw = NULL;
39923996 adev->accel_working = false;
3997+ dma_fence_put(rcu_dereference_protected(adev->gang_submit, true));
39933998
39943999 amdgpu_reset_fini(adev);
39954000
@@ -4542,14 +4547,15 @@ bool amdgpu_device_has_job_running(struct amdgpu_device *adev) · 546 unmodified lines
45424547 */
45434548 bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev)
45444549 {
4545− if (!amdgpu_device_ip_check_soft_reset(adev)) {
4546− dev_info(adev->dev, "Timeout, but no hardware hang detected.\n");
4547− return false;
4548− }
45494550
45504551 if (amdgpu_gpu_recovery == 0)
45514552 goto disabled;
45524553
4554+ if (!amdgpu_device_ip_check_soft_reset(adev)) {
4555+ dev_info(adev->dev,"Timeout, but no hardware hang detected.\n");
4556+ return false;
4557+ }
4558+
45534559 if (amdgpu_sriov_vf(adev))
45544560 return true;
45554561
@@ -4674,7 +4680,7 @@ int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev, · 118 unmodified lines
46744680 if (!need_full_reset)
46754681 need_full_reset = amdgpu_device_ip_need_full_reset(adev);
46764682
4677− if (!need_full_reset) {
4683+ if (!need_full_reset && amdgpu_gpu_recovery) {
46784684 amdgpu_device_ip_pre_soft_reset(adev);
46794685 r = amdgpu_device_ip_soft_reset(adev);
46804686 amdgpu_device_ip_post_soft_reset(adev);
@@ -4770,6 +4776,7 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle, · 89 unmodified lines
47704776 struct amdgpu_device *tmp_adev = NULL;
47714777 bool need_full_reset, skip_hw_reset, vram_lost = false;
47724778 int r = 0;
4779+ bool gpu_reset_for_dev_remove = 0;
47734780
47744781 /* Try reset handler method first */
47754782 tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
@@ -4789,6 +4796,10 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle, · 13 unmodified lines
47894796 test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
47904797 skip_hw_reset = test_bit(AMDGPU_SKIP_HW_RESET, &reset_context->flags);
47914798
4799+ gpu_reset_for_dev_remove =
4800+ test_bit(AMDGPU_RESET_FOR_DEVICE_REMOVE, &reset_context->flags) &&
4801+ test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
4802+
47924803 /*
47934804 * ASIC reset has to be done on all XGMI hive nodes ASAP
47944805 * to allow proper links negotiation in FW (within 1 sec)
@@ -4833,6 +4844,18 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle, · 38 unmodified lines
48334844 amdgpu_ras_intr_cleared();
48344845 }
48354846
4847+ /* Since the mode1 reset affects base ip blocks, the
4848+ * phase1 ip blocks need to be resumed. Otherwise there
4849+ * will be a BIOS signature error and the psp bootloader
4850+ * can't load kdb on the next amdgpu install.
4851+ */
4852+ if (gpu_reset_for_dev_remove) {
4853+ list_for_each_entry(tmp_adev, device_list_handle, reset_list)
4854+ amdgpu_device_ip_resume_phase1(tmp_adev);
4855+
4856+ goto end;
4857+ }
4858+
48364859 list_for_each_entry(tmp_adev, device_list_handle, reset_list) {
48374860 if (need_full_reset) {
48384861 /* post card */
@@ -5072,6 +5095,7 @@ static void amdgpu_device_recheck_guilty_jobs( · 233 unmodified lines
50725095
50735096 /* set guilty */
50745097 drm_sched_increase_karma(s_job);
5098+ amdgpu_reset_prepare_hwcontext(adev, reset_context);
50755099 retry:
50765100 /* do hw reset */
50775101 if (amdgpu_sriov_vf(adev)) {
@@ -5154,6 +5178,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 76 unmodified lines
51545178 bool need_emergency_restart = false;
51555179 bool audio_suspended = false;
51565180 int tmp_vram_lost_counter;
5181+ bool gpu_reset_for_dev_remove = false;
5182+
5183+ gpu_reset_for_dev_remove =
5184+ test_bit(AMDGPU_RESET_FOR_DEVICE_REMOVE, &reset_context->flags) &&
5185+ test_bit(AMDGPU_NEED_FULL_RESET, &reset_context->flags);
51575186
51585187 /*
51595188 * Special case: RAS triggered and full reset isn't supported
@@ -5181,6 +5210,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 21 unmodified lines
51815210
51825211 reset_context->job = job;
51835212 reset_context->hive = hive;
5213+
51845214 /*
51855215 * Build list of devices to reset.
51865216 * In case we are in XGMI hive mode, resort the device list
@@ -5188,8 +5218,11 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 1 unmodified line
51885218 */
51895219 INIT_LIST_HEAD(&device_list);
51905220 if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1)) {
5191− list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head)
5221+ list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
51925222 list_add_tail(&tmp_adev->reset_list, &device_list);
5223+ if (gpu_reset_for_dev_remove && adev->shutdown)
5224+ tmp_adev->shutdown = true;
5225+ }
51935226 if (!list_is_first(&adev->reset_list, &device_list))
51945227 list_rotate_to_front(&adev->reset_list, &device_list);
51955228 device_list_handle = &device_list;
@@ -5272,6 +5305,10 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · 76 unmodified lines
52725305
52735306 retry: /* Rest of adevs pre asic reset from XGMI hive. */
52745307 list_for_each_entry(tmp_adev, device_list_handle, reset_list) {
5308+ if (gpu_reset_for_dev_remove) {
5309+ /* Workaroud for ASICs need to disable SMC first */
5310+ amdgpu_device_smu_fini_early(tmp_adev);
5311+ }
52755312 r = amdgpu_device_pre_asic_reset(tmp_adev, reset_context);
52765313 /*TODO Should we stop ?*/
52775314 if (r) {
@@ -5300,8 +5337,14 @@ retry: /* Rest of adevs pre asic reset from XGMI hive. */ · 22 unmodified lines
53005337 amdgpu_ras_resume(adev);
53015338 } else {
53025339 r = amdgpu_do_asic_reset(device_list_handle, reset_context);
5303− if (r && r == -EAGAIN)
5340+ if (r && r == -EAGAIN) {
5341+ set_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context->flags);
5342+ adev->asic_reset_res = 0;
53045343 goto retry;
5344+ }
5345+
5346+ if (!r && gpu_reset_for_dev_remove)
5347+ goto recover_end;
53055348 }
53065349
53075350 skip_hw_reset:
@@ -5375,6 +5418,7 @@ skip_sched_resume: · 67 unmodified lines
53755418 amdgpu_device_unset_mp1_state(tmp_adev);
53765419 }
53775420
5421+recover_end:
53785422 tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
53795423 reset_list);
53805424 amdgpu_device_unlock_reset_domain(tmp_adev->reset_domain);
@@ -5557,9 +5601,9 @@ bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev, · 176 unmodified lines
55575601 ~*peer_adev->dev->dma_mask : ~((1ULL << 32) - 1);
55585602 resource_size_t aper_limit =
55595603 adev->gmc.aper_base + adev->gmc.aper_size - 1;
5560− bool p2p_access = !adev->gmc.xgmi.connected_to_cpu &&
5561− !(pci_p2pdma_distance_many(adev->pdev,
5562− &peer_adev->dev, 1, true) < 0);
5604+ bool p2p_access =
5605+ !adev->gmc.xgmi.connected_to_cpu &&
5606+ !(pci_p2pdma_distance(adev->pdev, peer_adev->dev, false) < 0);
55635607
55645608 return pcie_p2p && p2p_access && (adev->gmc.visible_vram_size &&
55655609 adev->gmc.real_vram_size == adev->gmc.visible_vram_size &&
@@ -5733,6 +5777,7 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev) · 167 unmodified lines
57335777 reset_context.reset_req_dev = adev;
57345778 set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
57355779 set_bit(AMDGPU_SKIP_HW_RESET, &reset_context.flags);
5780+ set_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
57365781
57375782 adev->no_hw_access = true;
57385783 r = amdgpu_device_pre_asic_reset(adev, &reset_context);
@@ -5942,3 +5987,36 @@ void amdgpu_device_pcie_port_wreg(struct amdgpu_device *adev, · 203 unmodified lines
59425987 (void)RREG32(data);
59435988 spin_unlock_irqrestore(&adev->pcie_idx_lock, flags);
59445989 }
5990+
5991+/**
5992+ * amdgpu_device_switch_gang - switch to a new gang
5993+ * @adev: amdgpu_device pointer
5994+ * @gang: the gang to switch to
5995+ *
5996+ * Try to switch to a new gang.
5997+ * Returns: NULL if we switched to the new gang or a reference to the current
5998+ * gang leader.
5999+ */
6000+struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,
6001+ struct dma_fence *gang)
6002+{
6003+ struct dma_fence *old = NULL;
6004+
6005+ do {
6006+ dma_fence_put(old);
6007+ rcu_read_lock();
6008+ old = dma_fence_get_rcu_safe(&adev->gang_submit);
6009+ rcu_read_unlock();
6010+
6011+ if (old == gang)
6012+ break;
6013+
6014+ if (!dma_fence_is_signaled(old))
6015+ return old;
6016+
6017+ } while (cmpxchg((struct dma_fence __force **)&adev->gang_submit,
6018+ old, gang) != old);
6019+
6020+ dma_fence_put(old);
6021+ return NULL;
6022+}
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c+16−3
@@ -229,7 +229,7 @@ static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, ui · 228 unmodified lines
229229 return r;
230230 }
231231
232− memcpy((u8 *)binary, (u8 *)fw->data, adev->mman.discovery_tmr_size);
232+ memcpy((u8 *)binary, (u8 *)fw->data, fw->size);
233233 release_firmware(fw);
234234
235235 return 0;
@@ -1506,6 +1506,7 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev) · 1270 unmodified lines
15061506 case IP_VERSION(11, 0, 0):
15071507 case IP_VERSION(11, 0, 1):
15081508 case IP_VERSION(11, 0, 2):
1509+ case IP_VERSION(11, 0, 3):
15091510 amdgpu_device_ip_block_add(adev, &soc21_common_ip_block);
15101511 break;
15111512 default:
@@ -1549,6 +1550,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev) · 37 unmodified lines
15491550 case IP_VERSION(11, 0, 0):
15501551 case IP_VERSION(11, 0, 1):
15511552 case IP_VERSION(11, 0, 2):
1553+ case IP_VERSION(11, 0, 3):
15521554 amdgpu_device_ip_block_add(adev, &gmc_v11_0_ip_block);
15531555 break;
15541556 default:
@@ -1633,6 +1635,7 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev) · 78 unmodified lines
16331635 case IP_VERSION(13, 0, 5):
16341636 case IP_VERSION(13, 0, 7):
16351637 case IP_VERSION(13, 0, 8):
1638+ case IP_VERSION(13, 0, 10):
16361639 amdgpu_device_ip_block_add(adev, &psp_v13_0_ip_block);
16371640 break;
16381641 case IP_VERSION(13, 0, 4):
@@ -1682,6 +1685,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev) · 43 unmodified lines
16821685 case IP_VERSION(13, 0, 5):
16831686 case IP_VERSION(13, 0, 7):
16841687 case IP_VERSION(13, 0, 8):
1688+ case IP_VERSION(13, 0, 10):
16851689 amdgpu_device_ip_block_add(adev, &smu_v13_0_ip_block);
16861690 break;
16871691 default:
@@ -1780,6 +1784,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev) · 92 unmodified lines
17801784 case IP_VERSION(11, 0, 0):
17811785 case IP_VERSION(11, 0, 1):
17821786 case IP_VERSION(11, 0, 2):
1787+ case IP_VERSION(11, 0, 3):
17831788 amdgpu_device_ip_block_add(adev, &gfx_v11_0_ip_block);
17841789 break;
17851790 default:
@@ -1823,6 +1828,7 @@ static int amdgpu_discovery_set_sdma_ip_blocks(struct amdgpu_device *adev) · 37 unmodified lines
18231828 case IP_VERSION(6, 0, 0):
18241829 case IP_VERSION(6, 0, 1):
18251830 case IP_VERSION(6, 0, 2):
1831+ case IP_VERSION(6, 0, 3):
18261832 amdgpu_device_ip_block_add(adev, &sdma_v6_0_ip_block);
18271833 break;
18281834 default:
@@ -1903,7 +1909,8 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev) · 74 unmodified lines
19031909 case IP_VERSION(4, 0, 2):
19041910 case IP_VERSION(4, 0, 4):
19051911 amdgpu_device_ip_block_add(adev, &vcn_v4_0_ip_block);
1906− amdgpu_device_ip_block_add(adev, &jpeg_v4_0_ip_block);
1912+ if (!amdgpu_sriov_vf(adev))
1913+ amdgpu_device_ip_block_add(adev, &jpeg_v4_0_ip_block);
19071914 break;
19081915 default:
19091916 dev_err(adev->dev,
@@ -1940,6 +1947,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev) · 30 unmodified lines
19401947 case IP_VERSION(11, 0, 0):
19411948 case IP_VERSION(11, 0, 1):
19421949 case IP_VERSION(11, 0, 2):
1950+ case IP_VERSION(11, 0, 3):
19431951 amdgpu_device_ip_block_add(adev, &mes_v11_0_ip_block);
19441952 adev->enable_mes = true;
19451953 adev->enable_mes_kiq = true;
@@ -2165,6 +2173,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev) · 219 unmodified lines
21652173 break;
21662174 case IP_VERSION(11, 0, 0):
21672175 case IP_VERSION(11, 0, 2):
2176+ case IP_VERSION(11, 0, 3):
21682177 adev->family = AMDGPU_FAMILY_GC_11_0_0;
21692178 break;
21702179 case IP_VERSION(11, 0, 1):
@@ -2234,7 +2243,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev) · 63 unmodified lines
22342243 break;
22352244 case IP_VERSION(4, 3, 0):
22362245 case IP_VERSION(4, 3, 1):
2237− adev->nbio.funcs = &nbio_v4_3_funcs;
2246+ if (amdgpu_sriov_vf(adev))
2247+ adev->nbio.funcs = &nbio_v4_3_sriov_funcs;
2248+ else
2249+ adev->nbio.funcs = &nbio_v4_3_funcs;
22382250 adev->nbio.hdp_flush_reg = &nbio_v4_3_hdp_flush_reg;
22392251 break;
22402252 case IP_VERSION(7, 7, 0):
@@ -2332,6 +2344,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev) · 91 unmodified lines
23322344 case IP_VERSION(6, 0, 0):
23332345 case IP_VERSION(6, 0, 1):
23342346 case IP_VERSION(6, 0, 2):
2347+ case IP_VERSION(6, 0, 3):
23352348 adev->lsdma.funcs = &lsdma_v6_0_funcs;
23362349 break;
23372350 default:
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c+1−1
@@ -58,7 +58,7 @@ static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf, · 57 unmodified lines
5858 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
5959 int r;
6060
61− if (pci_p2pdma_distance_many(adev->pdev, &attach->dev, 1, true) < 0)
61+ if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
6262 attach->peer2peer = false;
6363
6464 r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+39−4
@@ -102,9 +102,10 @@ · 101 unmodified lines
102102 * - 3.46.0 - To enable hot plug amdgpu tests in libdrm
103103 * - 3.47.0 - Add AMDGPU_GEM_CREATE_DISCARDABLE and AMDGPU_VM_NOALLOC flags
104104 * - 3.48.0 - Add IP discovery version info to HW INFO
105+ * 3.49.0 - Add gang submit into CS IOCTL
105106 */
106107 #define KMS_DRIVER_MAJOR 3
107−#define KMS_DRIVER_MINOR 48
108+#define KMS_DRIVER_MINOR 49
108109 #define KMS_DRIVER_PATCHLEVEL 0
109110
110111 int amdgpu_vram_limit;
@@ -2181,15 +2182,46 @@ amdgpu_pci_remove(struct pci_dev *pdev) · 2070 unmodified lines
21812182 struct drm_device *dev = pci_get_drvdata(pdev);
21822183 struct amdgpu_device *adev = drm_to_adev(dev);
21832184
2184− drm_dev_unplug(dev);
2185−
21862185 if (adev->pm.rpm_mode != AMDGPU_RUNPM_NONE) {
21872186 pm_runtime_get_sync(dev->dev);
21882187 pm_runtime_forbid(dev->dev);
21892188 }
21902189
2190+ if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 2)) {
2191+ bool need_to_reset_gpu = false;
2192+
2193+ if (adev->gmc.xgmi.num_physical_nodes > 1) {
2194+ struct amdgpu_hive_info *hive;
2195+
2196+ hive = amdgpu_get_xgmi_hive(adev);
2197+ if (hive->device_remove_count == 0)
2198+ need_to_reset_gpu = true;
2199+ hive->device_remove_count++;
2200+ amdgpu_put_xgmi_hive(hive);
2201+ } else {
2202+ need_to_reset_gpu = true;
2203+ }
2204+
2205+ /* Workaround for ASICs need to reset SMU.
2206+ * Called only when the first device is removed.
2207+ */
2208+ if (need_to_reset_gpu) {
2209+ struct amdgpu_reset_context reset_context;
2210+
2211+ adev->shutdown = true;
2212+ memset(&reset_context, 0, sizeof(reset_context));
2213+ reset_context.method = AMD_RESET_METHOD_NONE;
2214+ reset_context.reset_req_dev = adev;
2215+ set_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
2216+ set_bit(AMDGPU_RESET_FOR_DEVICE_REMOVE, &reset_context.flags);
2217+ amdgpu_device_gpu_recover(adev, NULL, &reset_context);
2218+ }
2219+ }
2220+
21912221 amdgpu_driver_unload_kms(dev);
21922222
2223+ drm_dev_unplug(dev);
2224+
21932225 /*
21942226 * Flush any in flight DMA operations from device.
21952227 * Clear the Bus Master Enable bit and then wait on the PCIe Device
@@ -2563,8 +2595,11 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) · 367 unmodified lines
25632595 amdgpu_device_baco_exit(drm_dev);
25642596 }
25652597 ret = amdgpu_device_resume(drm_dev, false);
2566− if (ret)
2598+ if (ret) {
2599+ if (amdgpu_device_supports_px(drm_dev))
2600+ pci_disable_device(pdev);
25672601 return ret;
2602+ }
25682603
25692604 if (amdgpu_device_supports_px(drm_dev))
25702605 drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c+180−1
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323 *
2424 */
2525
26+#include <linux/firmware.h>
2627 #include "amdgpu.h"
2728 #include "amdgpu_gfx.h"
2829 #include "amdgpu_rlc.h"
@@ -477,7 +478,7 @@ int amdgpu_gfx_disable_kcq(struct amdgpu_device *adev) · 448 unmodified lines
477478 kiq->pmf->kiq_unmap_queues(kiq_ring, &adev->gfx.compute_ring[i],
478479 RESET_QUEUES, 0, 0);
479480
480− if (adev->gfx.kiq.ring.sched.ready)
481+ if (adev->gfx.kiq.ring.sched.ready && !adev->job_hang)
481482 r = amdgpu_ring_test_helper(kiq_ring);
482483 spin_unlock(&adev->gfx.kiq.ring_lock);
483484
@@ -610,6 +611,45 @@ unlock: · 126 unmodified lines
610611 mutex_unlock(&adev->gfx.gfx_off_mutex);
611612 }
612613
614+int amdgpu_set_gfx_off_residency(struct amdgpu_device *adev, bool value)
615+{
616+ int r = 0;
617+
618+ mutex_lock(&adev->gfx.gfx_off_mutex);
619+
620+ r = amdgpu_dpm_set_residency_gfxoff(adev, value);
621+
622+ mutex_unlock(&adev->gfx.gfx_off_mutex);
623+
624+ return r;
625+}
626+
627+int amdgpu_get_gfx_off_residency(struct amdgpu_device *adev, u32 *value)
628+{
629+ int r = 0;
630+
631+ mutex_lock(&adev->gfx.gfx_off_mutex);
632+
633+ r = amdgpu_dpm_get_residency_gfxoff(adev, value);
634+
635+ mutex_unlock(&adev->gfx.gfx_off_mutex);
636+
637+ return r;
638+}
639+
640+int amdgpu_get_gfx_off_entrycount(struct amdgpu_device *adev, u64 *value)
641+{
642+ int r = 0;
643+
644+ mutex_lock(&adev->gfx.gfx_off_mutex);
645+
646+ r = amdgpu_dpm_get_entrycount_gfxoff(adev, value);
647+
648+ mutex_unlock(&adev->gfx.gfx_off_mutex);
649+
650+ return r;
651+}
652+
613653 int amdgpu_get_gfx_off_status(struct amdgpu_device *adev, uint32_t *value)
614654 {
615655
@@ -826,3 +866,142 @@ int amdgpu_gfx_get_num_kcq(struct amdgpu_device *adev) · 210 unmodified lines
826866 }
827867 return amdgpu_num_kcq;
828868 }
869+
870+void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev,
871+ uint32_t ucode_id)
872+{
873+ const struct gfx_firmware_header_v1_0 *cp_hdr;
874+ const struct gfx_firmware_header_v2_0 *cp_hdr_v2_0;
875+ struct amdgpu_firmware_info *info = NULL;
876+ const struct firmware *ucode_fw;
877+ unsigned int fw_size;
878+
879+ switch (ucode_id) {
880+ case AMDGPU_UCODE_ID_CP_PFP:
881+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
882+ adev->gfx.pfp_fw->data;
883+ adev->gfx.pfp_fw_version =
884+ le32_to_cpu(cp_hdr->header.ucode_version);
885+ adev->gfx.pfp_feature_version =
886+ le32_to_cpu(cp_hdr->ucode_feature_version);
887+ ucode_fw = adev->gfx.pfp_fw;
888+ fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
889+ break;
890+ case AMDGPU_UCODE_ID_CP_RS64_PFP:
891+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
892+ adev->gfx.pfp_fw->data;
893+ adev->gfx.pfp_fw_version =
894+ le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
895+ adev->gfx.pfp_feature_version =
896+ le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
897+ ucode_fw = adev->gfx.pfp_fw;
898+ fw_size = le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes);
899+ break;
900+ case AMDGPU_UCODE_ID_CP_RS64_PFP_P0_STACK:
901+ case AMDGPU_UCODE_ID_CP_RS64_PFP_P1_STACK:
902+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
903+ adev->gfx.pfp_fw->data;
904+ ucode_fw = adev->gfx.pfp_fw;
905+ fw_size = le32_to_cpu(cp_hdr_v2_0->data_size_bytes);
906+ break;
907+ case AMDGPU_UCODE_ID_CP_ME:
908+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
909+ adev->gfx.me_fw->data;
910+ adev->gfx.me_fw_version =
911+ le32_to_cpu(cp_hdr->header.ucode_version);
912+ adev->gfx.me_feature_version =
913+ le32_to_cpu(cp_hdr->ucode_feature_version);
914+ ucode_fw = adev->gfx.me_fw;
915+ fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
916+ break;
917+ case AMDGPU_UCODE_ID_CP_RS64_ME:
918+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
919+ adev->gfx.me_fw->data;
920+ adev->gfx.me_fw_version =
921+ le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
922+ adev->gfx.me_feature_version =
923+ le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
924+ ucode_fw = adev->gfx.me_fw;
925+ fw_size = le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes);
926+ break;
927+ case AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK:
928+ case AMDGPU_UCODE_ID_CP_RS64_ME_P1_STACK:
929+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
930+ adev->gfx.me_fw->data;
931+ ucode_fw = adev->gfx.me_fw;
932+ fw_size = le32_to_cpu(cp_hdr_v2_0->data_size_bytes);
933+ break;
934+ case AMDGPU_UCODE_ID_CP_CE:
935+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
936+ adev->gfx.ce_fw->data;
937+ adev->gfx.ce_fw_version =
938+ le32_to_cpu(cp_hdr->header.ucode_version);
939+ adev->gfx.ce_feature_version =
940+ le32_to_cpu(cp_hdr->ucode_feature_version);
941+ ucode_fw = adev->gfx.ce_fw;
942+ fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
943+ break;
944+ case AMDGPU_UCODE_ID_CP_MEC1:
945+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
946+ adev->gfx.mec_fw->data;
947+ adev->gfx.mec_fw_version =
948+ le32_to_cpu(cp_hdr->header.ucode_version);
949+ adev->gfx.mec_feature_version =
950+ le32_to_cpu(cp_hdr->ucode_feature_version);
951+ ucode_fw = adev->gfx.mec_fw;
952+ fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes) -
953+ le32_to_cpu(cp_hdr->jt_size) * 4;
954+ break;
955+ case AMDGPU_UCODE_ID_CP_MEC1_JT:
956+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
957+ adev->gfx.mec_fw->data;
958+ ucode_fw = adev->gfx.mec_fw;
959+ fw_size = le32_to_cpu(cp_hdr->jt_size) * 4;
960+ break;
961+ case AMDGPU_UCODE_ID_CP_MEC2:
962+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
963+ adev->gfx.mec2_fw->data;
964+ adev->gfx.mec2_fw_version =
965+ le32_to_cpu(cp_hdr->header.ucode_version);
966+ adev->gfx.mec2_feature_version =
967+ le32_to_cpu(cp_hdr->ucode_feature_version);
968+ ucode_fw = adev->gfx.mec2_fw;
969+ fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes) -
970+ le32_to_cpu(cp_hdr->jt_size) * 4;
971+ break;
972+ case AMDGPU_UCODE_ID_CP_MEC2_JT:
973+ cp_hdr = (const struct gfx_firmware_header_v1_0 *)
974+ adev->gfx.mec2_fw->data;
975+ ucode_fw = adev->gfx.mec2_fw;
976+ fw_size = le32_to_cpu(cp_hdr->jt_size) * 4;
977+ break;
978+ case AMDGPU_UCODE_ID_CP_RS64_MEC:
979+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
980+ adev->gfx.mec_fw->data;
981+ adev->gfx.mec_fw_version =
982+ le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
983+ adev->gfx.mec_feature_version =
984+ le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
985+ ucode_fw = adev->gfx.mec_fw;
986+ fw_size = le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes);
987+ break;
988+ case AMDGPU_UCODE_ID_CP_RS64_MEC_P0_STACK:
989+ case AMDGPU_UCODE_ID_CP_RS64_MEC_P1_STACK:
990+ case AMDGPU_UCODE_ID_CP_RS64_MEC_P2_STACK:
991+ case AMDGPU_UCODE_ID_CP_RS64_MEC_P3_STACK:
992+ cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)
993+ adev->gfx.mec_fw->data;
994+ ucode_fw = adev->gfx.mec_fw;
995+ fw_size = le32_to_cpu(cp_hdr_v2_0->data_size_bytes);
996+ break;
997+ default:
998+ break;
999+ }
1000+
1001+ if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1002+ info = &adev->firmware.ucode[ucode_id];
1003+ info->ucode_id = ucode_id;
1004+ info->fw = ucode_fw;
1005+ adev->firmware.fw_size += ALIGN(fw_size, PAGE_SIZE);
1006+ }
1007+}
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h+12−4
@@ -336,10 +336,12 @@ struct amdgpu_gfx { · 335 unmodified lines
336336 uint32_t srbm_soft_reset;
337337
338338 /* gfx off */
339− bool gfx_off_state; /* true: enabled, false: disabled */
340− struct mutex gfx_off_mutex;
341− uint32_t gfx_off_req_count; /* default 1, enable gfx off: dec 1, disable gfx off: add 1 */
342− struct delayed_work gfx_off_delay_work;
339+ bool gfx_off_state; /* true: enabled, false: disabled */
340+ struct mutex gfx_off_mutex; /* mutex to change gfxoff state */
341+ uint32_t gfx_off_req_count; /* default 1, enable gfx off: dec 1, disable gfx off: add 1 */
342+ struct delayed_work gfx_off_delay_work; /* async work to set gfx block off */
343+ uint32_t gfx_off_residency; /* last logged residency */
344+ uint64_t gfx_off_entrycount; /* count of times GPU has get into GFXOFF state */
343345
344346 /* pipe reservation */
345347 struct mutex pipe_reserve_mutex;
@@ -411,6 +413,10 @@ bool amdgpu_gfx_is_me_queue_enabled(struct amdgpu_device *adev, int me, · 65 unmodified lines
411413 void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable);
412414 int amdgpu_get_gfx_off_status(struct amdgpu_device *adev, uint32_t *value);
413415 int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block);
416+void amdgpu_gfx_ras_fini(struct amdgpu_device *adev);
417+int amdgpu_get_gfx_off_entrycount(struct amdgpu_device *adev, u64 *value);
418+int amdgpu_get_gfx_off_residency(struct amdgpu_device *adev, u32 *residency);
419+int amdgpu_set_gfx_off_residency(struct amdgpu_device *adev, bool value);
414420 int amdgpu_gfx_process_ras_data_cb(struct amdgpu_device *adev,
415421 void *err_data,
416422 struct amdgpu_iv_entry *entry);
@@ -420,4 +426,6 @@ int amdgpu_gfx_cp_ecc_error_irq(struct amdgpu_device *adev, · 3 unmodified lines
420426 uint32_t amdgpu_kiq_rreg(struct amdgpu_device *adev, uint32_t reg);
421427 void amdgpu_kiq_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v);
422428 int amdgpu_gfx_get_num_kcq(struct amdgpu_device *adev);
429+void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev, uint32_t ucode_id);
430+
423431 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_gfxhub.h+3−0
@@ -35,6 +35,9 @@ struct amdgpu_gfxhub_funcs { · 34 unmodified lines
3535 void (*init)(struct amdgpu_device *adev);
3636 int (*get_xgmi_info)(struct amdgpu_device *adev);
3737 void (*utcl2_harvest)(struct amdgpu_device *adev);
38+ void (*mode2_save_regs)(struct amdgpu_device *adev);
39+ void (*mode2_restore_regs)(struct amdgpu_device *adev);
40+ void (*halt)(struct amdgpu_device *adev);
3841 };
3942
4043 struct amdgpu_gfxhub {
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c+9−39
@@ -572,45 +572,15 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev) · 571 unmodified lines
572572 void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
573573 {
574574 struct amdgpu_gmc *gmc = &adev->gmc;
575−
576− switch (adev->ip_versions[GC_HWIP][0]) {
577− case IP_VERSION(9, 0, 1):
578− case IP_VERSION(9, 3, 0):
579− case IP_VERSION(9, 4, 0):
580− case IP_VERSION(9, 4, 1):
581− case IP_VERSION(9, 4, 2):
582− case IP_VERSION(10, 3, 3):
583− case IP_VERSION(10, 3, 4):
584− case IP_VERSION(10, 3, 5):
585− case IP_VERSION(10, 3, 6):
586− case IP_VERSION(10, 3, 7):
587− /*
588− * noretry = 0 will cause kfd page fault tests fail
589− * for some ASICs, so set default to 1 for these ASICs.
590− */
591− if (amdgpu_noretry == -1)
592− gmc->noretry = 1;
593− else
594− gmc->noretry = amdgpu_noretry;
595− break;
596− default:
597− /* Raven currently has issues with noretry
598− * regardless of what we decide for other
599− * asics, we should leave raven with
600− * noretry = 0 until we root cause the
601− * issues.
602− *
603− * default this to 0 for now, but we may want
604− * to change this in the future for certain
605− * GPUs as it can increase performance in
606− * certain cases.
607− */
608− if (amdgpu_noretry == -1)
609− gmc->noretry = 0;
610− else
611− gmc->noretry = amdgpu_noretry;
612− break;
613− }
575+ uint32_t gc_ver = adev->ip_versions[GC_HWIP][0];
576+ bool noretry_default = (gc_ver == IP_VERSION(9, 0, 1) ||
577+ gc_ver == IP_VERSION(9, 3, 0) ||
578+ gc_ver == IP_VERSION(9, 4, 0) ||
579+ gc_ver == IP_VERSION(9, 4, 1) ||
580+ gc_ver == IP_VERSION(9, 4, 2) ||
581+ gc_ver >= IP_VERSION(10, 3, 0));
582+
583+ gmc->noretry = (amdgpu_noretry == -1) ? noretry_default : amdgpu_noretry;
614584 }
615585
616586 void amdgpu_gmc_set_vm_fault_masks(struct amdgpu_device *adev, int hub_type,
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h+26−0
@@ -264,6 +264,32 @@ struct amdgpu_gmc { · 263 unmodified lines
264264 u64 mall_size;
265265 /* number of UMC instances */
266266 int num_umc;
267+ /* mode2 save restore */
268+ u64 VM_L2_CNTL;
269+ u64 VM_L2_CNTL2;
270+ u64 VM_DUMMY_PAGE_FAULT_CNTL;
271+ u64 VM_DUMMY_PAGE_FAULT_ADDR_LO32;
272+ u64 VM_DUMMY_PAGE_FAULT_ADDR_HI32;
273+ u64 VM_L2_PROTECTION_FAULT_CNTL;
274+ u64 VM_L2_PROTECTION_FAULT_CNTL2;
275+ u64 VM_L2_PROTECTION_FAULT_MM_CNTL3;
276+ u64 VM_L2_PROTECTION_FAULT_MM_CNTL4;
277+ u64 VM_L2_PROTECTION_FAULT_ADDR_LO32;
278+ u64 VM_L2_PROTECTION_FAULT_ADDR_HI32;
279+ u64 VM_DEBUG;
280+ u64 VM_L2_MM_GROUP_RT_CLASSES;
281+ u64 VM_L2_BANK_SELECT_RESERVED_CID;
282+ u64 VM_L2_BANK_SELECT_RESERVED_CID2;
283+ u64 VM_L2_CACHE_PARITY_CNTL;
284+ u64 VM_L2_IH_LOG_CNTL;
285+ u64 VM_CONTEXT_CNTL[16];
286+ u64 VM_CONTEXT_PAGE_TABLE_BASE_ADDR_LO32[16];
287+ u64 VM_CONTEXT_PAGE_TABLE_BASE_ADDR_HI32[16];
288+ u64 VM_CONTEXT_PAGE_TABLE_START_ADDR_LO32[16];
289+ u64 VM_CONTEXT_PAGE_TABLE_START_ADDR_HI32[16];
290+ u64 VM_CONTEXT_PAGE_TABLE_END_ADDR_LO32[16];
291+ u64 VM_CONTEXT_PAGE_TABLE_END_ADDR_HI32[16];
292+ u64 MC_VM_MX_L1_TLB_CNTL;
267293 };
268294
269295 #define amdgpu_gmc_flush_gpu_tlb(adev, vmid, vmhub, type) ((adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid), (vmhub), (type)))
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c+38−0
@@ -204,6 +204,42 @@ void amdgpu_gtt_mgr_recover(struct amdgpu_gtt_mgr *mgr) · 203 unmodified lines
204204 amdgpu_gart_invalidate_tlb(adev);
205205 }
206206
207+/**
208+ * amdgpu_gtt_mgr_intersects - test for intersection
209+ *
210+ * @man: Our manager object
211+ * @res: The resource to test
212+ * @place: The place for the new allocation
213+ * @size: The size of the new allocation
214+ *
215+ * Simplified intersection test, only interesting if we need GART or not.
216+ */
217+static bool amdgpu_gtt_mgr_intersects(struct ttm_resource_manager *man,
218+ struct ttm_resource *res,
219+ const struct ttm_place *place,
220+ size_t size)
221+{
222+ return !place->lpfn || amdgpu_gtt_mgr_has_gart_addr(res);
223+}
224+
225+/**
226+ * amdgpu_gtt_mgr_compatible - test for compatibility
227+ *
228+ * @man: Our manager object
229+ * @res: The resource to test
230+ * @place: The place for the new allocation
231+ * @size: The size of the new allocation
232+ *
233+ * Simplified compatibility test.
234+ */
235+static bool amdgpu_gtt_mgr_compatible(struct ttm_resource_manager *man,
236+ struct ttm_resource *res,
237+ const struct ttm_place *place,
238+ size_t size)
239+{
240+ return !place->lpfn || amdgpu_gtt_mgr_has_gart_addr(res);
241+}
242+
207243 /**
208244 * amdgpu_gtt_mgr_debug - dump VRAM table
209245 *
@@ -225,6 +261,8 @@ static void amdgpu_gtt_mgr_debug(struct ttm_resource_manager *man, · 15 unmodified lines
225261 static const struct ttm_resource_manager_func amdgpu_gtt_mgr_func = {
226262 .alloc = amdgpu_gtt_mgr_new,
227263 .free = amdgpu_gtt_mgr_del,
264+ .intersects = amdgpu_gtt_mgr_intersects,
265+ .compatible = amdgpu_gtt_mgr_compatible,
228266 .debug = amdgpu_gtt_mgr_debug
229267 };
230268
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c+47−3
@@ -49,6 +49,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) · 48 unmodified lines
4949 }
5050
5151 memset(&ti, 0, sizeof(struct amdgpu_task_info));
52+ adev->job_hang = true;
5253
5354 if (amdgpu_gpu_recovery &&
5455 amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
@@ -71,6 +72,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) · 16 unmodified lines
7172 reset_context.method = AMD_RESET_METHOD_NONE;
7273 reset_context.reset_req_dev = adev;
7374 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
75+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
7476
7577 r = amdgpu_device_gpu_recover(ring->adev, job, &reset_context);
7678 if (r)
@@ -82,6 +84,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job) · 5 unmodified lines
8284 }
8385
8486 exit:
87+ adev->job_hang = false;
8588 drm_dev_exit(idx);
8689 return DRM_GPU_SCHED_STAT_NOMINAL;
8790 }
@@ -102,7 +105,6 @@ int amdgpu_job_alloc(struct amdgpu_device *adev, unsigned num_ibs, · 14 unmodified lines
102105 */
103106 (*job)->base.sched = &adev->rings[0]->sched;
104107 (*job)->vm = vm;
105− (*job)->num_ibs = num_ibs;
106108
107109 amdgpu_sync_create(&(*job)->sync);
108110 amdgpu_sync_create(&(*job)->sched_sync);
@@ -122,6 +124,7 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size, · 13 unmodified lines
122124 if (r)
123125 return r;
124126
127+ (*job)->num_ibs = 1;
125128 r = amdgpu_ib_get(adev, NULL, size, pool_type, &(*job)->ibs[0]);
126129 if (r)
127130 kfree(*job);
@@ -129,6 +132,23 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size, · 1 unmodified line
129132 return r;
130133 }
131134
135+void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,
136+ struct amdgpu_bo *gws, struct amdgpu_bo *oa)
137+{
138+ if (gds) {
139+ job->gds_base = amdgpu_bo_gpu_offset(gds) >> PAGE_SHIFT;
140+ job->gds_size = amdgpu_bo_size(gds) >> PAGE_SHIFT;
141+ }
142+ if (gws) {
143+ job->gws_base = amdgpu_bo_gpu_offset(gws) >> PAGE_SHIFT;
144+ job->gws_size = amdgpu_bo_size(gws) >> PAGE_SHIFT;
145+ }
146+ if (oa) {
147+ job->oa_base = amdgpu_bo_gpu_offset(oa) >> PAGE_SHIFT;
148+ job->oa_size = amdgpu_bo_size(oa) >> PAGE_SHIFT;
149+ }
150+}
151+
132152 void amdgpu_job_free_resources(struct amdgpu_job *job)
133153 {
134154 struct amdgpu_ring *ring = to_amdgpu_ring(job->base.sched);
@@ -153,11 +173,29 @@ static void amdgpu_job_free_cb(struct drm_sched_job *s_job) · 18 unmodified lines
153173 dma_fence_put(&job->hw_fence);
154174 }
155175
176+void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
177+ struct amdgpu_job *leader)
178+{
179+ struct dma_fence *fence = &leader->base.s_fence->scheduled;
180+
181+ WARN_ON(job->gang_submit);
182+
183+ /*
184+ * Don't add a reference when we are the gang leader to avoid circle
185+ * dependency.
186+ */
187+ if (job != leader)
188+ dma_fence_get(fence);
189+ job->gang_submit = fence;
190+}
191+
156192 void amdgpu_job_free(struct amdgpu_job *job)
157193 {
158194 amdgpu_job_free_resources(job);
159195 amdgpu_sync_free(&job->sync);
160196 amdgpu_sync_free(&job->sched_sync);
197+ if (job->gang_submit != &job->base.s_fence->scheduled)
198+ dma_fence_put(job->gang_submit);
161199
162200 if (!job->hw_fence.ops)
163201 kfree(job);
@@ -227,12 +265,16 @@ static struct dma_fence *amdgpu_job_dependency(struct drm_sched_job *sched_job, · 63 unmodified lines
227265 fence = amdgpu_sync_get_fence(&job->sync);
228266 }
229267
268+ if (!fence && job->gang_submit)
269+ fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
270+
230271 return fence;
231272 }
232273
233274 static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
234275 {
235276 struct amdgpu_ring *ring = to_amdgpu_ring(sched_job->sched);
277+ struct amdgpu_device *adev = ring->adev;
236278 struct dma_fence *fence = NULL, *finished;
237279 struct amdgpu_job *job;
238280 int r = 0;
@@ -244,8 +286,10 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job) · 5 unmodified lines
244286
245287 trace_amdgpu_sched_run_job(job);
246288
247− if (job->vram_lost_counter != atomic_read(&ring->adev->vram_lost_counter))
248− dma_fence_set_error(finished, -ECANCELED);/* skip IB as well if VRAM lost */
289+ /* Skip job if VRAM is lost and never resubmit gangs */
290+ if (job->vram_lost_counter != atomic_read(&adev->vram_lost_counter) ||
291+ (job->job_run_counter && job->gang_submit))
292+ dma_fence_set_error(finished, -ECANCELED);
249293
250294 if (finished->error < 0) {
251295 DRM_INFO("Skip scheduling IBs!\n");
drivers/gpu/drm/amd/amdgpu/amdgpu_job.h+10−0
@@ -50,6 +50,7 @@ struct amdgpu_job { · 49 unmodified lines
5050 struct amdgpu_sync sync;
5151 struct amdgpu_sync sched_sync;
5252 struct dma_fence hw_fence;
53+ struct dma_fence *gang_submit;
5354 uint32_t preamble_status;
5455 uint32_t preemption_status;
5556 bool vm_needs_flush;
@@ -72,11 +73,20 @@ struct amdgpu_job { · 16 unmodified lines
7273 struct amdgpu_ib ibs[];
7374 };
7475
76+static inline struct amdgpu_ring *amdgpu_job_ring(struct amdgpu_job *job)
77+{
78+ return to_amdgpu_ring(job->base.entity->rq->sched);
79+}
80+
7581 int amdgpu_job_alloc(struct amdgpu_device *adev, unsigned num_ibs,
7682 struct amdgpu_job **job, struct amdgpu_vm *vm);
7783 int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size,
7884 enum amdgpu_ib_pool_type pool, struct amdgpu_job **job);
85+void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,
86+ struct amdgpu_bo *gws, struct amdgpu_bo *oa);
7987 void amdgpu_job_free_resources(struct amdgpu_job *job);
88+void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
89+ struct amdgpu_job *leader);
8090 void amdgpu_job_free(struct amdgpu_job *job);
8191 int amdgpu_job_submit(struct amdgpu_job *job, struct drm_sched_entity *entity,
8292 void *owner, struct dma_fence **f);
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c+49−1
@@ -247,6 +247,14 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info, · 246 unmodified lines
247247 fw_info->ver = adev->gfx.rlc_srls_fw_version;
248248 fw_info->feature = adev->gfx.rlc_srls_feature_version;
249249 break;
250+ case AMDGPU_INFO_FW_GFX_RLCP:
251+ fw_info->ver = adev->gfx.rlcp_ucode_version;
252+ fw_info->feature = adev->gfx.rlcp_ucode_feature_version;
253+ break;
254+ case AMDGPU_INFO_FW_GFX_RLCV:
255+ fw_info->ver = adev->gfx.rlcv_ucode_version;
256+ fw_info->feature = adev->gfx.rlcv_ucode_feature_version;
257+ break;
250258 case AMDGPU_INFO_FW_GFX_MEC:
251259 if (query_fw->index == 0) {
252260 fw_info->ver = adev->gfx.mec_fw_version;
@@ -328,6 +336,14 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info, · 75 unmodified lines
328336 fw_info->ver = adev->psp.cap_fw_version;
329337 fw_info->feature = adev->psp.cap_feature_version;
330338 break;
339+ case AMDGPU_INFO_FW_MES_KIQ:
340+ fw_info->ver = adev->mes.ucode_fw_version[0];
341+ fw_info->feature = 0;
342+ break;
343+ case AMDGPU_INFO_FW_MES:
344+ fw_info->ver = adev->mes.ucode_fw_version[1];
345+ fw_info->feature = 0;
346+ break;
331347 default:
332348 return -EINVAL;
333349 }
@@ -1160,7 +1176,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) · 826 unmodified lines
11601176 }
11611177
11621178 mutex_init(&fpriv->bo_list_lock);
1163− idr_init(&fpriv->bo_list_handles);
1179+ idr_init_base(&fpriv->bo_list_handles, 1);
11641180
11651181 amdgpu_ctx_mgr_init(&fpriv->ctx_mgr, adev);
11661182
@@ -1469,6 +1485,22 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused) · 302 unmodified lines
14691485 seq_printf(m, "RLC SRLS feature version: %u, firmware version: 0x%08x\n",
14701486 fw_info.feature, fw_info.ver);
14711487
1488+ /* RLCP */
1489+ query_fw.fw_type = AMDGPU_INFO_FW_GFX_RLCP;
1490+ ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
1491+ if (ret)
1492+ return ret;
1493+ seq_printf(m, "RLCP feature version: %u, firmware version: 0x%08x\n",
1494+ fw_info.feature, fw_info.ver);
1495+
1496+ /* RLCV */
1497+ query_fw.fw_type = AMDGPU_INFO_FW_GFX_RLCV;
1498+ ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
1499+ if (ret)
1500+ return ret;
1501+ seq_printf(m, "RLCV feature version: %u, firmware version: 0x%08x\n",
1502+ fw_info.feature, fw_info.ver);
1503+
14721504 /* MEC */
14731505 query_fw.fw_type = AMDGPU_INFO_FW_GFX_MEC;
14741506 query_fw.index = 0;
@@ -1581,6 +1613,22 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused) · 106 unmodified lines
15811613 fw_info.feature, fw_info.ver);
15821614 }
15831615
1616+ /* MES_KIQ */
1617+ query_fw.fw_type = AMDGPU_INFO_FW_MES_KIQ;
1618+ ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
1619+ if (ret)
1620+ return ret;
1621+ seq_printf(m, "MES_KIQ feature version: %u, firmware version: 0x%08x\n",
1622+ fw_info.feature, fw_info.ver);
1623+
1624+ /* MES */
1625+ query_fw.fw_type = AMDGPU_INFO_FW_MES;
1626+ ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
1627+ if (ret)
1628+ return ret;
1629+ seq_printf(m, "MES feature version: %u, firmware version: 0x%08x\n",
1630+ fw_info.feature, fw_info.ver);
1631+
15841632 seq_printf(m, "VBIOS version: %s\n", ctx->vbios_version);
15851633
15861634 return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h+0−1
@@ -38,7 +38,6 @@ · 37 unmodified lines
3838 #include <drm/drm_crtc_helper.h>
3939 #include <drm/drm_fb_helper.h>
4040 #include <drm/drm_framebuffer.h>
41−#include <drm/drm_plane_helper.h>
4241 #include <drm/drm_probe_helper.h>
4342 #include <linux/i2c.h>
4443 #include <linux/i2c-algo-bit.h>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+2−2
@@ -591,7 +591,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev, · 590 unmodified lines
591591 if (!bp->destroy)
592592 bp->destroy = &amdgpu_bo_destroy;
593593
594− r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type,
594+ r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, bp->type,
595595 &bo->placement, page_align, &ctx, NULL,
596596 bp->resv, bp->destroy);
597597 if (unlikely(r != 0))
@@ -1309,7 +1309,7 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) · 711 unmodified lines
13091309 if (bo->base.resv == &bo->base._resv)
13101310 amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo);
13111311
1312− if (bo->resource->mem_type != TTM_PL_VRAM ||
1312+ if (!bo->resource || bo->resource->mem_type != TTM_PL_VRAM ||
13131313 !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) ||
13141314 adev->in_suspend || adev->shutdown)
13151315 return;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c+35−17
@@ -138,6 +138,7 @@ static int psp_early_init(void *handle) · 137 unmodified lines
138138 case IP_VERSION(13, 0, 3):
139139 case IP_VERSION(13, 0, 5):
140140 case IP_VERSION(13, 0, 8):
141+ case IP_VERSION(13, 0, 10):
141142 psp_v13_0_set_psp_funcs(psp);
142143 psp->autoload_supported = true;
143144 break;
@@ -327,23 +328,32 @@ static int psp_init_sriov_microcode(struct psp_context *psp) · 183 unmodified lines
327328
328329 switch (adev->ip_versions[MP0_HWIP][0]) {
329330 case IP_VERSION(9, 0, 0):
331+ adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
330332 ret = psp_init_cap_microcode(psp, "vega10");
331333 break;
332334 case IP_VERSION(11, 0, 9):
335+ adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
333336 ret = psp_init_cap_microcode(psp, "navi12");
334337 break;
335338 case IP_VERSION(11, 0, 7):
339+ adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
336340 ret = psp_init_cap_microcode(psp, "sienna_cichlid");
337341 break;
338342 case IP_VERSION(13, 0, 2):
343+ adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
339344 ret = psp_init_cap_microcode(psp, "aldebaran");
340345 ret &= psp_init_ta_microcode(psp, "aldebaran");
341346 break;
347+ case IP_VERSION(13, 0, 0):
348+ adev->virt.autoload_ucode_id = 0;
349+ break;
350+ case IP_VERSION(13, 0, 10):
351+ adev->virt.autoload_ucode_id = AMDGPU_UCODE_ID_CP_MES1_DATA;
352+ break;
342353 default:
343354 BUG();
344355 break;
345356 }
346−
347357 return ret;
348358 }
349359
@@ -501,6 +511,11 @@ static int psp_sw_fini(void *handle) · 151 unmodified lines
501511 kfree(cmd);
502512 cmd = NULL;
503513
514+ if (psp->km_ring.ring_mem)
515+ amdgpu_bo_free_kernel(&adev->firmware.rbuf,
516+ &psp->km_ring.ring_mem_mc_addr,
517+ (void **)&psp->km_ring.ring_mem);
518+
504519 amdgpu_bo_free_kernel(&psp->fw_pri_bo,
505520 &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
506521 amdgpu_bo_free_kernel(&psp->fence_buf_bo,
@@ -769,6 +784,7 @@ static bool psp_skip_tmr(struct psp_context *psp) · 262 unmodified lines
769784 case IP_VERSION(11, 0, 9):
770785 case IP_VERSION(11, 0, 7):
771786 case IP_VERSION(13, 0, 2):
787+ case IP_VERSION(13, 0, 10):
772788 return true;
773789 default:
774790 return false;
@@ -815,7 +831,7 @@ static int psp_tmr_unload(struct psp_context *psp) · 40 unmodified lines
815831 struct psp_gfx_cmd_resp *cmd = acquire_psp_cmd_buf(psp);
816832
817833 psp_prep_tmr_unload_cmd_buf(psp, cmd);
818− DRM_INFO("free PSP TMR buffer\n");
834+ dev_info(psp->adev->dev, "free PSP TMR buffer\n");
819835
820836 ret = psp_cmd_submit_buf(psp, NULL, cmd,
821837 psp->fence_buf_mc_addr);
@@ -2044,6 +2060,15 @@ static int psp_hw_start(struct psp_context *psp) · 1222 unmodified lines
20442060 }
20452061 }
20462062
2063+ if ((is_psp_fw_valid(psp->ras_drv)) &&
2064+ (psp->funcs->bootloader_load_ras_drv != NULL)) {
2065+ ret = psp_bootloader_load_ras_drv(psp);
2066+ if (ret) {
2067+ DRM_ERROR("PSP load ras_drv failed!\n");
2068+ return ret;
2069+ }
2070+ }
2071+
20472072 if ((is_psp_fw_valid(psp->sos)) &&
20482073 (psp->funcs->bootloader_load_sos != NULL)) {
20492074 ret = psp_bootloader_load_sos(psp);
@@ -2414,20 +2439,7 @@ static bool fw_load_skip_check(struct psp_context *psp, · 364 unmodified lines
24142439 return true;
24152440
24162441 if (amdgpu_sriov_vf(psp->adev) &&
2417− (ucode->ucode_id == AMDGPU_UCODE_ID_SDMA0
2418− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1
2419− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2
2420− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3
2421− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA4
2422− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA5
2423− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA6
2424− || ucode->ucode_id == AMDGPU_UCODE_ID_SDMA7
2425− || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_G
2426− || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL
2427− || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM
2428− || ucode->ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM
2429− || ucode->ucode_id == AMDGPU_UCODE_ID_SMC))
2430− /*skip ucode loading in SRIOV VF */
2442+ amdgpu_virt_fw_load_skip_check(psp->adev, ucode->ucode_id))
24312443 return true;
24322444
24332445 if (psp->autoload_supported &&
@@ -2501,7 +2513,7 @@ static int psp_load_non_psp_fw(struct psp_context *psp) · 67 unmodified lines
25012513
25022514 /* Start rlc autoload after psp recieved all the gfx firmware */
25032515 if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ?
2504− AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) {
2516+ adev->virt.autoload_ucode_id : AMDGPU_UCODE_ID_RLC_G)) {
25052517 ret = psp_rlc_autoload_start(psp);
25062518 if (ret) {
25072519 DRM_ERROR("Failed to start rlc autoload\n");
@@ -3042,6 +3054,12 @@ static int parse_sos_bin_descriptor(struct psp_context *psp, · 534 unmodified lines
30423054 psp->dbg_drv.size_bytes = le32_to_cpu(desc->size_bytes);
30433055 psp->dbg_drv.start_addr = ucode_start_addr;
30443056 break;
3057+ case PSP_FW_TYPE_PSP_RAS_DRV:
3058+ psp->ras_drv.fw_version = le32_to_cpu(desc->fw_version);
3059+ psp->ras_drv.feature_version = le32_to_cpu(desc->fw_version);
3060+ psp->ras_drv.size_bytes = le32_to_cpu(desc->size_bytes);
3061+ psp->ras_drv.start_addr = ucode_start_addr;
3062+ break;
30453063 default:
30463064 dev_warn(psp->adev->dev, "Unsupported PSP FW type: %d\n", desc->fw_type);
30473065 break;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h+6−0
@@ -72,6 +72,7 @@ enum psp_bootloader_cmd { · 71 unmodified lines
7272 PSP_BL__LOAD_SOCDRV = 0xB0000,
7373 PSP_BL__LOAD_DBGDRV = 0xC0000,
7474 PSP_BL__LOAD_INTFDRV = 0xD0000,
75+ PSP_BL__LOAD_RASDRV = 0xE0000,
7576 PSP_BL__DRAM_LONG_TRAIN = 0x100000,
7677 PSP_BL__DRAM_SHORT_TRAIN = 0x200000,
7778 PSP_BL__LOAD_TOS_SPL_TABLE = 0x10000000,
@@ -115,6 +116,7 @@ struct psp_funcs · 37 unmodified lines
115116 int (*bootloader_load_soc_drv)(struct psp_context *psp);
116117 int (*bootloader_load_intf_drv)(struct psp_context *psp);
117118 int (*bootloader_load_dbg_drv)(struct psp_context *psp);
119+ int (*bootloader_load_ras_drv)(struct psp_context *psp);
118120 int (*bootloader_load_sos)(struct psp_context *psp);
119121 int (*ring_init)(struct psp_context *psp, enum psp_ring_type ring_type);
120122 int (*ring_create)(struct psp_context *psp,
@@ -324,6 +326,7 @@ struct psp_context · 203 unmodified lines
324326 struct psp_bin_desc soc_drv;
325327 struct psp_bin_desc intf_drv;
326328 struct psp_bin_desc dbg_drv;
329+ struct psp_bin_desc ras_drv;
327330
328331 /* tmr buffer */
329332 struct amdgpu_bo *tmr_bo;
@@ -404,6 +407,9 @@ struct amdgpu_psp_funcs { · 74 unmodified lines
404407 ((psp)->funcs->bootloader_load_intf_drv ? (psp)->funcs->bootloader_load_intf_drv((psp)) : 0)
405408 #define psp_bootloader_load_dbg_drv(psp) \
406409 ((psp)->funcs->bootloader_load_dbg_drv ? (psp)->funcs->bootloader_load_dbg_drv((psp)) : 0)
410+#define psp_bootloader_load_ras_drv(psp) \
411+ ((psp)->funcs->bootloader_load_ras_drv ? \
412+ (psp)->funcs->bootloader_load_ras_drv((psp)) : 0)
407413 #define psp_bootloader_load_sos(psp) \
408414 ((psp)->funcs->bootloader_load_sos ? (psp)->funcs->bootloader_load_sos((psp)) : 0)
409415 #define psp_smu_reload_quirk(psp) \
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c+18−17
@@ -1950,6 +1950,7 @@ static void amdgpu_ras_do_recovery(struct work_struct *work) · 1949 unmodified lines
19501950 reset_context.method = AMD_RESET_METHOD_NONE;
19511951 reset_context.reset_req_dev = adev;
19521952 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
1953+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
19531954
19541955 amdgpu_device_gpu_recover(ras->adev, NULL, &reset_context);
19551956 }
@@ -2719,7 +2720,8 @@ int amdgpu_ras_pre_fini(struct amdgpu_device *adev) · 763 unmodified lines
27192720
27202721
27212722 /* Need disable ras on all IPs here before ip [hw/sw]fini */
2722− amdgpu_ras_disable_all_features(adev, 0);
2723+ if (con->features)
2724+ amdgpu_ras_disable_all_features(adev, 0);
27232725 amdgpu_ras_recovery_fini(adev);
27242726 return 0;
27252727 }
@@ -2832,11 +2834,8 @@ static int amdgpu_bad_page_notifier(struct notifier_block *nb, · 106 unmodified lines
28322834 struct mce *m = (struct mce *)data;
28332835 struct amdgpu_device *adev = NULL;
28342836 uint32_t gpu_id = 0;
2835− uint32_t umc_inst = 0;
2836− uint32_t ch_inst, channel_index = 0;
2837+ uint32_t umc_inst = 0, ch_inst = 0;
28372838 struct ras_err_data err_data = {0, 0, 0, NULL};
2838− struct eeprom_table_record err_rec;
2839− uint64_t retired_page;
28402839
28412840 /*
28422841 * If the error was generated in UMC_V2, which belongs to GPU UMCs,
@@ -2875,21 +2874,22 @@ static int amdgpu_bad_page_notifier(struct notifier_block *nb, · 32 unmodified lines
28752874 dev_info(adev->dev, "Uncorrectable error detected in UMC inst: %d, chan_idx: %d",
28762875 umc_inst, ch_inst);
28772876
2877+ err_data.err_addr =
2878+ kcalloc(adev->umc.max_ras_err_cnt_per_query,
2879+ sizeof(struct eeprom_table_record), GFP_KERNEL);
2880+ if(!err_data.err_addr) {
2881+ dev_warn(adev->dev, "Failed to alloc memory for "
2882+ "umc error address record in mca notifier!\n");
2883+ return NOTIFY_DONE;
2884+ }
2885+
28782886 /*
28792887 * Translate UMC channel address to Physical address
28802888 */
2881− channel_index =
2882− adev->umc.channel_idx_tbl[umc_inst * adev->umc.channel_inst_num
2883− + ch_inst];
2884−
2885− retired_page = ADDR_OF_8KB_BLOCK(m->addr) |
2886− ADDR_OF_256B_BLOCK(channel_index) |
2887− OFFSET_IN_256B_BLOCK(m->addr);
2888−
2889− memset(&err_rec, 0x0, sizeof(struct eeprom_table_record));
2890− err_data.err_addr = &err_rec;
2891− amdgpu_umc_fill_error_record(&err_data, m->addr,
2892− retired_page, channel_index, umc_inst);
2889+ if (adev->umc.ras &&
2890+ adev->umc.ras->convert_ras_error_address)
2891+ adev->umc.ras->convert_ras_error_address(adev,
2892+ &err_data, 0, ch_inst, umc_inst, m->addr);
28932893
28942894 if (amdgpu_bad_page_threshold != 0) {
28952895 amdgpu_ras_add_bad_pages(adev, err_data.err_addr,
@@ -2897,6 +2897,7 @@ static int amdgpu_bad_page_notifier(struct notifier_block *nb, · 1 unmodified line
28972897 amdgpu_ras_save_bad_pages(adev);
28982898 }
28992899
2900+ kfree(err_data.err_addr);
29002901 return NOTIFY_OK;
29012902 }
29022903
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c+10−0
@@ -38,6 +38,7 @@ · 37 unmodified lines
3838 #define EEPROM_I2C_MADDR_ARCTURUS_D342 0x0
3939 #define EEPROM_I2C_MADDR_SIENNA_CICHLID 0x0
4040 #define EEPROM_I2C_MADDR_ALDEBARAN 0x0
41+#define EEPROM_I2C_MADDR_SMU_13_0_0 (0x54UL << 16)
4142
4243 /*
4344 * The 2 macros bellow represent the actual size in bytes that
@@ -156,6 +157,15 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, · 112 unmodified lines
156157 return false;
157158 }
158159
160+ switch (adev->ip_versions[MP1_HWIP][0]) {
161+ case IP_VERSION(13, 0, 0):
162+ control->i2c_address = EEPROM_I2C_MADDR_SMU_13_0_0;
163+ break;
164+
165+ default:
166+ break;
167+ }
168+
159169 return true;
160170 }
161171
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c+21−0
@@ -23,6 +23,7 @@ · 22 unmodified lines
2323
2424 #include "amdgpu_reset.h"
2525 #include "aldebaran.h"
26+#include "sienna_cichlid.h"
2627
2728 int amdgpu_reset_add_handler(struct amdgpu_reset_control *reset_ctl,
2829 struct amdgpu_reset_handler *handler)
@@ -36,10 +37,15 @@ int amdgpu_reset_init(struct amdgpu_device *adev) · 7 unmodified lines
3637 {
3738 int ret = 0;
3839
40+ adev->amdgpu_reset_level_mask = 0x1;
41+
3942 switch (adev->ip_versions[MP1_HWIP][0]) {
4043 case IP_VERSION(13, 0, 2):
4144 ret = aldebaran_reset_init(adev);
4245 break;
46+ case IP_VERSION(11, 0, 7):
47+ ret = sienna_cichlid_reset_init(adev);
48+ break;
4349 default:
4450 break;
4551 }
@@ -55,6 +61,9 @@ int amdgpu_reset_fini(struct amdgpu_device *adev) · 9 unmodified lines
5561 case IP_VERSION(13, 0, 2):
5662 ret = aldebaran_reset_fini(adev);
5763 break;
64+ case IP_VERSION(11, 0, 7):
65+ ret = sienna_cichlid_reset_fini(adev);
66+ break;
5867 default:
5968 break;
6069 }
@@ -67,6 +76,12 @@ int amdgpu_reset_prepare_hwcontext(struct amdgpu_device *adev, · 6 unmodified lines
6776 {
6877 struct amdgpu_reset_handler *reset_handler = NULL;
6978
79+ if (!(adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_MODE2))
80+ return -ENOSYS;
81+
82+ if (test_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context->flags))
83+ return -ENOSYS;
84+
7085 if (adev->reset_cntl && adev->reset_cntl->get_reset_handler)
7186 reset_handler = adev->reset_cntl->get_reset_handler(
7287 adev->reset_cntl, reset_context);
@@ -83,6 +98,12 @@ int amdgpu_reset_perform_reset(struct amdgpu_device *adev, · 10 unmodified lines
8398 int ret;
8499 struct amdgpu_reset_handler *reset_handler = NULL;
85100
101+ if (!(adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_MODE2))
102+ return -ENOSYS;
103+
104+ if (test_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context->flags))
105+ return -ENOSYS;
106+
86107 if (adev->reset_cntl)
87108 reset_handler = adev->reset_cntl->get_reset_handler(
88109 adev->reset_cntl, reset_context);
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h+4−1
@@ -30,6 +30,8 @@ enum AMDGPU_RESET_FLAGS { · 29 unmodified lines
3030
3131 AMDGPU_NEED_FULL_RESET = 0,
3232 AMDGPU_SKIP_HW_RESET = 1,
33+ AMDGPU_SKIP_MODE2_RESET = 2,
34+ AMDGPU_RESET_FOR_DEVICE_REMOVE = 3,
3335 };
3436
3537 struct amdgpu_reset_context {
@@ -111,7 +113,8 @@ static inline bool amdgpu_reset_get_reset_domain(struct amdgpu_reset_domain *dom · 75 unmodified lines
111113
112114 static inline void amdgpu_reset_put_reset_domain(struct amdgpu_reset_domain *domain)
113115 {
114− kref_put(&domain->refcount, amdgpu_reset_destroy_reset_domain);
116+ if (domain)
117+ kref_put(&domain->refcount, amdgpu_reset_destroy_reset_domain);
115118 }
116119
117120 static inline bool amdgpu_reset_domain_schedule(struct amdgpu_reset_domain *domain,
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c+3−0
@@ -405,6 +405,9 @@ bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid, · 404 unmodified lines
405405 {
406406 ktime_t deadline = ktime_add_us(ktime_get(), 10000);
407407
408+ if (!(ring->adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_SOFT_RECOVERY))
409+ return false;
410+
408411 if (amdgpu_sriov_vf(ring->adev) || !ring->funcs->soft_recovery || !fence)
409412 return false;
410413
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c+8−0
@@ -359,6 +359,14 @@ static void amdgpu_gfx_rlc_init_microcode_v2_1(struct amdgpu_device *adev) · 358 unmodified lines
359359 le32_to_cpu(rlc_hdr->reg_list_format_direct_reg_list_length);
360360
361361 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
362+ if (adev->gfx.rlc.save_restore_list_cntl_size_bytes) {
363+ info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL];
364+ info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL;
365+ info->fw = adev->gfx.rlc_fw;
366+ adev->firmware.fw_size +=
367+ ALIGN(adev->gfx.rlc.save_restore_list_cntl_size_bytes, PAGE_SIZE);
368+ }
369+
362370 if (adev->gfx.rlc.save_restore_list_gpm_size_bytes) {
363371 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM];
364372 info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM;
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c+133−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
2121 *
2222 */
2323
24+#include <linux/firmware.h>
2425 #include "amdgpu.h"
2526 #include "amdgpu_sdma.h"
2627 #include "amdgpu_ras.h"
@@ -150,3 +151,135 @@ int amdgpu_sdma_process_ecc_irq(struct amdgpu_device *adev, · 123 unmodified lines
150151 amdgpu_ras_interrupt_dispatch(adev, &ih_data);
151152 return 0;
152153 }
154+
155+static int amdgpu_sdma_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
156+{
157+ int err = 0;
158+ uint16_t version_major;
159+ const struct common_firmware_header *header = NULL;
160+ const struct sdma_firmware_header_v1_0 *hdr;
161+ const struct sdma_firmware_header_v2_0 *hdr_v2;
162+
163+ err = amdgpu_ucode_validate(sdma_inst->fw);
164+ if (err)
165+ return err;
166+
167+ header = (const struct common_firmware_header *)
168+ sdma_inst->fw->data;
169+ version_major = le16_to_cpu(header->header_version_major);
170+
171+ switch (version_major) {
172+ case 1:
173+ hdr = (const struct sdma_firmware_header_v1_0 *)sdma_inst->fw->data;
174+ sdma_inst->fw_version = le32_to_cpu(hdr->header.ucode_version);
175+ sdma_inst->feature_version = le32_to_cpu(hdr->ucode_feature_version);
176+ break;
177+ case 2:
178+ hdr_v2 = (const struct sdma_firmware_header_v2_0 *)sdma_inst->fw->data;
179+ sdma_inst->fw_version = le32_to_cpu(hdr_v2->header.ucode_version);
180+ sdma_inst->feature_version = le32_to_cpu(hdr_v2->ucode_feature_version);
181+ break;
182+ default:
183+ return -EINVAL;
184+ }
185+
186+ if (sdma_inst->feature_version >= 20)
187+ sdma_inst->burst_nop = true;
188+
189+ return 0;
190+}
191+
192+void amdgpu_sdma_destroy_inst_ctx(struct amdgpu_device *adev,
193+ bool duplicate)
194+{
195+ int i;
196+
197+ for (i = 0; i < adev->sdma.num_instances; i++) {
198+ release_firmware(adev->sdma.instance[i].fw);
199+ if (duplicate)
200+ break;
201+ }
202+
203+ memset((void *)adev->sdma.instance, 0,
204+ sizeof(struct amdgpu_sdma_instance) * AMDGPU_MAX_SDMA_INSTANCES);
205+}
206+
207+int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
208+ char *fw_name, u32 instance,
209+ bool duplicate)
210+{
211+ struct amdgpu_firmware_info *info = NULL;
212+ const struct common_firmware_header *header = NULL;
213+ int err = 0, i;
214+ const struct sdma_firmware_header_v2_0 *sdma_hdr;
215+ uint16_t version_major;
216+
217+ err = request_firmware(&adev->sdma.instance[instance].fw, fw_name, adev->dev);
218+ if (err)
219+ goto out;
220+
221+ header = (const struct common_firmware_header *)
222+ adev->sdma.instance[instance].fw->data;
223+ version_major = le16_to_cpu(header->header_version_major);
224+
225+ if ((duplicate && instance) || (!duplicate && version_major > 1))
226+ return -EINVAL;
227+
228+ err = amdgpu_sdma_init_inst_ctx(&adev->sdma.instance[instance]);
229+ if (err)
230+ goto out;
231+
232+ if (duplicate) {
233+ for (i = 1; i < adev->sdma.num_instances; i++)
234+ memcpy((void *)&adev->sdma.instance[i],
235+ (void *)&adev->sdma.instance[0],
236+ sizeof(struct amdgpu_sdma_instance));
237+ }
238+
239+ if (amdgpu_sriov_vf(adev))
240+ return 0;
241+
242+ DRM_DEBUG("psp_load == '%s'\n",
243+ adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
244+
245+ if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
246+ switch (version_major) {
247+ case 1:
248+ for (i = 0; i < adev->sdma.num_instances; i++) {
249+ if (!duplicate && (instance != i))
250+ continue;
251+ else {
252+ info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
253+ info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
254+ info->fw = adev->sdma.instance[i].fw;
255+ adev->firmware.fw_size +=
256+ ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
257+ }
258+ }
259+ break;
260+ case 2:
261+ sdma_hdr = (const struct sdma_firmware_header_v2_0 *)
262+ adev->sdma.instance[0].fw->data;
263+ info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA_UCODE_TH0];
264+ info->ucode_id = AMDGPU_UCODE_ID_SDMA_UCODE_TH0;
265+ info->fw = adev->sdma.instance[0].fw;
266+ adev->firmware.fw_size +=
267+ ALIGN(le32_to_cpu(sdma_hdr->ctx_ucode_size_bytes), PAGE_SIZE);
268+ info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA_UCODE_TH1];
269+ info->ucode_id = AMDGPU_UCODE_ID_SDMA_UCODE_TH1;
270+ info->fw = adev->sdma.instance[0].fw;
271+ adev->firmware.fw_size +=
272+ ALIGN(le32_to_cpu(sdma_hdr->ctl_ucode_size_bytes), PAGE_SIZE);
273+ break;
274+ default:
275+ return -EINVAL;
276+ }
277+ }
278+
279+out:
280+ if (err) {
281+ DRM_ERROR("SDMA: Failed to init firmware \"%s\"\n", fw_name);
282+ amdgpu_sdma_destroy_inst_ctx(adev, duplicate);
283+ }
284+ return err;
285+}
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h+4−0
@@ -124,4 +124,8 @@ int amdgpu_sdma_process_ras_data_cb(struct amdgpu_device *adev, · 123 unmodified lines
124124 int amdgpu_sdma_process_ecc_irq(struct amdgpu_device *adev,
125125 struct amdgpu_irq_src *source,
126126 struct amdgpu_iv_entry *entry);
127+int amdgpu_sdma_init_microcode(struct amdgpu_device *adev,
128+ char *fw_name, u32 instance, bool duplicate);
129+void amdgpu_sdma_destroy_inst_ctx(struct amdgpu_device *adev,
130+ bool duplicate);
127131 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c+3−1
@@ -1,3 +1,4 @@
1+// SPDX-License-Identifier: MIT
12 /*
23 * Copyright 2014 Advanced Micro Devices, Inc.
34 * All Rights Reserved.
@@ -315,6 +316,7 @@ struct dma_fence *amdgpu_sync_get_fence(struct amdgpu_sync *sync) · 311 unmodified lines
315316 struct hlist_node *tmp;
316317 struct dma_fence *f;
317318 int i;
319+
318320 hash_for_each_safe(sync->fences, i, tmp, e, node) {
319321
320322 f = e->fence;
@@ -392,7 +394,7 @@ void amdgpu_sync_free(struct amdgpu_sync *sync) · 71 unmodified lines
392394 {
393395 struct amdgpu_sync_entry *e;
394396 struct hlist_node *tmp;
395− unsigned i;
397+ unsigned int i;
396398
397399 hash_for_each_safe(sync->fences, i, tmp, e, node) {
398400 hash_del(&e->node);
drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h+7−5
@@ -140,8 +140,10 @@ TRACE_EVENT(amdgpu_bo_create, · 139 unmodified lines
140140 );
141141
142142 TRACE_EVENT(amdgpu_cs,
143− TP_PROTO(struct amdgpu_cs_parser *p, int i),
144− TP_ARGS(p, i),
143+ TP_PROTO(struct amdgpu_cs_parser *p,
144+ struct amdgpu_job *job,
145+ struct amdgpu_ib *ib),
146+ TP_ARGS(p, job, ib),
145147 TP_STRUCT__entry(
146148 __field(struct amdgpu_bo_list *, bo_list)
147149 __field(u32, ring)
@@ -151,10 +153,10 @@ TRACE_EVENT(amdgpu_cs, · 3 unmodified lines
151153
152154 TP_fast_assign(
153155 __entry->bo_list = p->bo_list;
154− __entry->ring = to_amdgpu_ring(p->entity->rq->sched)->idx;
155− __entry->dw = p->job->ibs[i].length_dw;
156+ __entry->ring = to_amdgpu_ring(job->base.sched)->idx;
157+ __entry->dw = ib->length_dw;
156158 __entry->fences = amdgpu_fence_count_emitted(
157− to_amdgpu_ring(p->entity->rq->sched));
159+ to_amdgpu_ring(job->base.sched));
158160 ),
159161 TP_printk("bo_list=%p, ring=%u, dw=%u, fences=%u",
160162 __entry->bo_list, __entry->ring, __entry->dw,
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+15−33
@@ -471,7 +471,8 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 470 unmodified lines
471471
472472 adev = amdgpu_ttm_adev(bo->bdev);
473473
474− if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) {
474+ if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
475+ bo->ttm == NULL)) {
475476 ttm_bo_move_null(bo, new_mem);
476477 goto out;
477478 }
@@ -1329,11 +1330,12 @@ uint64_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm, · 851 unmodified lines
13291330 static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
13301331 const struct ttm_place *place)
13311332 {
1332− unsigned long num_pages = bo->resource->num_pages;
13331333 struct dma_resv_iter resv_cursor;
1334− struct amdgpu_res_cursor cursor;
13351334 struct dma_fence *f;
13361335
1336+ if (!amdgpu_bo_is_amdgpu_bo(bo))
1337+ return ttm_bo_eviction_valuable(bo, place);
1338+
13371339 /* Swapout? */
13381340 if (bo->resource->mem_type == TTM_PL_SYSTEM)
13391341 return true;
@@ -1352,40 +1354,20 @@ static bool amdgpu_ttm_bo_eviction_valuable(struct ttm_buffer_object *bo, · 12 unmodified lines
13521354 return false;
13531355 }
13541356
1355− switch (bo->resource->mem_type) {
1356− case AMDGPU_PL_PREEMPT:
1357− /* Preemptible BOs don't own system resources managed by the
1358− * driver (pages, VRAM, GART space). They point to resources
1359− * owned by someone else (e.g. pageable memory in user mode
1360− * or a DMABuf). They are used in a preemptible context so we
1361− * can guarantee no deadlocks and good QoS in case of MMU
1362− * notifiers or DMABuf move notifiers from the resource owner.
1363− */
1357+ /* Preemptible BOs don't own system resources managed by the
1358+ * driver (pages, VRAM, GART space). They point to resources
1359+ * owned by someone else (e.g. pageable memory in user mode
1360+ * or a DMABuf). They are used in a preemptible context so we
1361+ * can guarantee no deadlocks and good QoS in case of MMU
1362+ * notifiers or DMABuf move notifiers from the resource owner.
1363+ */
1364+ if (bo->resource->mem_type == AMDGPU_PL_PREEMPT)
13641365 return false;
1365− case TTM_PL_TT:
1366− if (amdgpu_bo_is_amdgpu_bo(bo) &&
1367− amdgpu_bo_encrypted(ttm_to_amdgpu_bo(bo)))
1368− return false;
1369− return true;
13701366
1371− case TTM_PL_VRAM:
1372− /* Check each drm MM node individually */
1373− amdgpu_res_first(bo->resource, 0, (u64)num_pages << PAGE_SHIFT,
1374− &cursor);
1375− while (cursor.remaining) {
1376− if (place->fpfn < PFN_DOWN(cursor.start + cursor.size)
1377− && !(place->lpfn &&
1378− place->lpfn <= PFN_DOWN(cursor.start)))
1379− return true;
1380−
1381− amdgpu_res_next(&cursor, cursor.size);
1382− }
1367+ if (bo->resource->mem_type == TTM_PL_TT &&
1368+ amdgpu_bo_encrypted(ttm_to_amdgpu_bo(bo)))
13831369 return false;
13841370
1385− default:
1386− break;
1387− }
1388−
13891371 return ttm_bo_eviction_valuable(bo, place);
13901372 }
13911373
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c+118−50
@@ -164,70 +164,138 @@ void amdgpu_ucode_print_rlc_hdr(const struct common_firmware_header *hdr) · 163 unmodified lines
164164 } else if (version_major == 2) {
165165 const struct rlc_firmware_header_v2_0 *rlc_hdr =
166166 container_of(hdr, struct rlc_firmware_header_v2_0, header);
167+ const struct rlc_firmware_header_v2_1 *rlc_hdr_v2_1 =
168+ container_of(rlc_hdr, struct rlc_firmware_header_v2_1, v2_0);
169+ const struct rlc_firmware_header_v2_2 *rlc_hdr_v2_2 =
170+ container_of(rlc_hdr_v2_1, struct rlc_firmware_header_v2_2, v2_1);
171+ const struct rlc_firmware_header_v2_3 *rlc_hdr_v2_3 =
172+ container_of(rlc_hdr_v2_2, struct rlc_firmware_header_v2_3, v2_2);
173+ const struct rlc_firmware_header_v2_4 *rlc_hdr_v2_4 =
174+ container_of(rlc_hdr_v2_3, struct rlc_firmware_header_v2_4, v2_3);
167175
168− DRM_DEBUG("ucode_feature_version: %u\n",
169− le32_to_cpu(rlc_hdr->ucode_feature_version));
170− DRM_DEBUG("jt_offset: %u\n", le32_to_cpu(rlc_hdr->jt_offset));
171− DRM_DEBUG("jt_size: %u\n", le32_to_cpu(rlc_hdr->jt_size));
172− DRM_DEBUG("save_and_restore_offset: %u\n",
173− le32_to_cpu(rlc_hdr->save_and_restore_offset));
174− DRM_DEBUG("clear_state_descriptor_offset: %u\n",
175− le32_to_cpu(rlc_hdr->clear_state_descriptor_offset));
176− DRM_DEBUG("avail_scratch_ram_locations: %u\n",
177− le32_to_cpu(rlc_hdr->avail_scratch_ram_locations));
178− DRM_DEBUG("reg_restore_list_size: %u\n",
179− le32_to_cpu(rlc_hdr->reg_restore_list_size));
180− DRM_DEBUG("reg_list_format_start: %u\n",
181− le32_to_cpu(rlc_hdr->reg_list_format_start));
182− DRM_DEBUG("reg_list_format_separate_start: %u\n",
183− le32_to_cpu(rlc_hdr->reg_list_format_separate_start));
184− DRM_DEBUG("starting_offsets_start: %u\n",
185− le32_to_cpu(rlc_hdr->starting_offsets_start));
186− DRM_DEBUG("reg_list_format_size_bytes: %u\n",
187− le32_to_cpu(rlc_hdr->reg_list_format_size_bytes));
188− DRM_DEBUG("reg_list_format_array_offset_bytes: %u\n",
189− le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes));
190− DRM_DEBUG("reg_list_size_bytes: %u\n",
191− le32_to_cpu(rlc_hdr->reg_list_size_bytes));
192− DRM_DEBUG("reg_list_array_offset_bytes: %u\n",
193− le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes));
194− DRM_DEBUG("reg_list_format_separate_size_bytes: %u\n",
195− le32_to_cpu(rlc_hdr->reg_list_format_separate_size_bytes));
196− DRM_DEBUG("reg_list_format_separate_array_offset_bytes: %u\n",
197− le32_to_cpu(rlc_hdr->reg_list_format_separate_array_offset_bytes));
198− DRM_DEBUG("reg_list_separate_size_bytes: %u\n",
199− le32_to_cpu(rlc_hdr->reg_list_separate_size_bytes));
200− DRM_DEBUG("reg_list_separate_array_offset_bytes: %u\n",
201− le32_to_cpu(rlc_hdr->reg_list_separate_array_offset_bytes));
202− if (version_minor == 1) {
203− const struct rlc_firmware_header_v2_1 *v2_1 =
204− container_of(rlc_hdr, struct rlc_firmware_header_v2_1, v2_0);
176+ switch (version_minor) {
177+ case 0:
178+ /* rlc_hdr v2_0 */
179+ DRM_DEBUG("ucode_feature_version: %u\n",
180+ le32_to_cpu(rlc_hdr->ucode_feature_version));
181+ DRM_DEBUG("jt_offset: %u\n", le32_to_cpu(rlc_hdr->jt_offset));
182+ DRM_DEBUG("jt_size: %u\n", le32_to_cpu(rlc_hdr->jt_size));
183+ DRM_DEBUG("save_and_restore_offset: %u\n",
184+ le32_to_cpu(rlc_hdr->save_and_restore_offset));
185+ DRM_DEBUG("clear_state_descriptor_offset: %u\n",
186+ le32_to_cpu(rlc_hdr->clear_state_descriptor_offset));
187+ DRM_DEBUG("avail_scratch_ram_locations: %u\n",
188+ le32_to_cpu(rlc_hdr->avail_scratch_ram_locations));
189+ DRM_DEBUG("reg_restore_list_size: %u\n",
190+ le32_to_cpu(rlc_hdr->reg_restore_list_size));
191+ DRM_DEBUG("reg_list_format_start: %u\n",
192+ le32_to_cpu(rlc_hdr->reg_list_format_start));
193+ DRM_DEBUG("reg_list_format_separate_start: %u\n",
194+ le32_to_cpu(rlc_hdr->reg_list_format_separate_start));
195+ DRM_DEBUG("starting_offsets_start: %u\n",
196+ le32_to_cpu(rlc_hdr->starting_offsets_start));
197+ DRM_DEBUG("reg_list_format_size_bytes: %u\n",
198+ le32_to_cpu(rlc_hdr->reg_list_format_size_bytes));
199+ DRM_DEBUG("reg_list_format_array_offset_bytes: %u\n",
200+ le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes));
201+ DRM_DEBUG("reg_list_size_bytes: %u\n",
202+ le32_to_cpu(rlc_hdr->reg_list_size_bytes));
203+ DRM_DEBUG("reg_list_array_offset_bytes: %u\n",
204+ le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes));
205+ DRM_DEBUG("reg_list_format_separate_size_bytes: %u\n",
206+ le32_to_cpu(rlc_hdr->reg_list_format_separate_size_bytes));
207+ DRM_DEBUG("reg_list_format_separate_array_offset_bytes: %u\n",
208+ le32_to_cpu(rlc_hdr->reg_list_format_separate_array_offset_bytes));
209+ DRM_DEBUG("reg_list_separate_size_bytes: %u\n",
210+ le32_to_cpu(rlc_hdr->reg_list_separate_size_bytes));
211+ DRM_DEBUG("reg_list_separate_array_offset_bytes: %u\n",
212+ le32_to_cpu(rlc_hdr->reg_list_separate_array_offset_bytes));
213+ break;
214+ case 1:
215+ /* rlc_hdr v2_1 */
205216 DRM_DEBUG("reg_list_format_direct_reg_list_length: %u\n",
206− le32_to_cpu(v2_1->reg_list_format_direct_reg_list_length));
217+ le32_to_cpu(rlc_hdr_v2_1->reg_list_format_direct_reg_list_length));
207218 DRM_DEBUG("save_restore_list_cntl_ucode_ver: %u\n",
208− le32_to_cpu(v2_1->save_restore_list_cntl_ucode_ver));
219+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_cntl_ucode_ver));
209220 DRM_DEBUG("save_restore_list_cntl_feature_ver: %u\n",
210− le32_to_cpu(v2_1->save_restore_list_cntl_feature_ver));
221+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_cntl_feature_ver));
211222 DRM_DEBUG("save_restore_list_cntl_size_bytes %u\n",
212− le32_to_cpu(v2_1->save_restore_list_cntl_size_bytes));
223+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_cntl_size_bytes));
213224 DRM_DEBUG("save_restore_list_cntl_offset_bytes: %u\n",
214− le32_to_cpu(v2_1->save_restore_list_cntl_offset_bytes));
225+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_cntl_offset_bytes));
215226 DRM_DEBUG("save_restore_list_gpm_ucode_ver: %u\n",
216− le32_to_cpu(v2_1->save_restore_list_gpm_ucode_ver));
227+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_gpm_ucode_ver));
217228 DRM_DEBUG("save_restore_list_gpm_feature_ver: %u\n",
218− le32_to_cpu(v2_1->save_restore_list_gpm_feature_ver));
229+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_gpm_feature_ver));
219230 DRM_DEBUG("save_restore_list_gpm_size_bytes %u\n",
220− le32_to_cpu(v2_1->save_restore_list_gpm_size_bytes));
231+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_gpm_size_bytes));
221232 DRM_DEBUG("save_restore_list_gpm_offset_bytes: %u\n",
222− le32_to_cpu(v2_1->save_restore_list_gpm_offset_bytes));
233+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_gpm_offset_bytes));
223234 DRM_DEBUG("save_restore_list_srm_ucode_ver: %u\n",
224− le32_to_cpu(v2_1->save_restore_list_srm_ucode_ver));
235+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_srm_ucode_ver));
225236 DRM_DEBUG("save_restore_list_srm_feature_ver: %u\n",
226− le32_to_cpu(v2_1->save_restore_list_srm_feature_ver));
237+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_srm_feature_ver));
227238 DRM_DEBUG("save_restore_list_srm_size_bytes %u\n",
228− le32_to_cpu(v2_1->save_restore_list_srm_size_bytes));
239+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_srm_size_bytes));
229240 DRM_DEBUG("save_restore_list_srm_offset_bytes: %u\n",
230− le32_to_cpu(v2_1->save_restore_list_srm_offset_bytes));
241+ le32_to_cpu(rlc_hdr_v2_1->save_restore_list_srm_offset_bytes));
242+ break;
243+ case 2:
244+ /* rlc_hdr v2_2 */
245+ DRM_DEBUG("rlc_iram_ucode_size_bytes: %u\n",
246+ le32_to_cpu(rlc_hdr_v2_2->rlc_iram_ucode_size_bytes));
247+ DRM_DEBUG("rlc_iram_ucode_offset_bytes: %u\n",
248+ le32_to_cpu(rlc_hdr_v2_2->rlc_iram_ucode_offset_bytes));
249+ DRM_DEBUG("rlc_dram_ucode_size_bytes: %u\n",
250+ le32_to_cpu(rlc_hdr_v2_2->rlc_dram_ucode_size_bytes));
251+ DRM_DEBUG("rlc_dram_ucode_offset_bytes: %u\n",
252+ le32_to_cpu(rlc_hdr_v2_2->rlc_dram_ucode_offset_bytes));
253+ break;
254+ case 3:
255+ /* rlc_hdr v2_3 */
256+ DRM_DEBUG("rlcp_ucode_version: %u\n",
257+ le32_to_cpu(rlc_hdr_v2_3->rlcp_ucode_version));
258+ DRM_DEBUG("rlcp_ucode_feature_version: %u\n",
259+ le32_to_cpu(rlc_hdr_v2_3->rlcp_ucode_feature_version));
260+ DRM_DEBUG("rlcp_ucode_size_bytes: %u\n",
261+ le32_to_cpu(rlc_hdr_v2_3->rlcp_ucode_size_bytes));
262+ DRM_DEBUG("rlcp_ucode_offset_bytes: %u\n",
263+ le32_to_cpu(rlc_hdr_v2_3->rlcp_ucode_offset_bytes));
264+ DRM_DEBUG("rlcv_ucode_version: %u\n",
265+ le32_to_cpu(rlc_hdr_v2_3->rlcv_ucode_version));
266+ DRM_DEBUG("rlcv_ucode_feature_version: %u\n",
267+ le32_to_cpu(rlc_hdr_v2_3->rlcv_ucode_feature_version));
268+ DRM_DEBUG("rlcv_ucode_size_bytes: %u\n",
269+ le32_to_cpu(rlc_hdr_v2_3->rlcv_ucode_size_bytes));
270+ DRM_DEBUG("rlcv_ucode_offset_bytes: %u\n",
271+ le32_to_cpu(rlc_hdr_v2_3->rlcv_ucode_offset_bytes));
272+ break;
273+ case 4:
274+ /* rlc_hdr v2_4 */
275+ DRM_DEBUG("global_tap_delays_ucode_size_bytes :%u\n",
276+ le32_to_cpu(rlc_hdr_v2_4->global_tap_delays_ucode_size_bytes));
277+ DRM_DEBUG("global_tap_delays_ucode_offset_bytes: %u\n",
278+ le32_to_cpu(rlc_hdr_v2_4->global_tap_delays_ucode_offset_bytes));
279+ DRM_DEBUG("se0_tap_delays_ucode_size_bytes :%u\n",
280+ le32_to_cpu(rlc_hdr_v2_4->se0_tap_delays_ucode_size_bytes));
281+ DRM_DEBUG("se0_tap_delays_ucode_offset_bytes: %u\n",
282+ le32_to_cpu(rlc_hdr_v2_4->se0_tap_delays_ucode_offset_bytes));
283+ DRM_DEBUG("se1_tap_delays_ucode_size_bytes :%u\n",
284+ le32_to_cpu(rlc_hdr_v2_4->se1_tap_delays_ucode_size_bytes));
285+ DRM_DEBUG("se1_tap_delays_ucode_offset_bytes: %u\n",
286+ le32_to_cpu(rlc_hdr_v2_4->se1_tap_delays_ucode_offset_bytes));
287+ DRM_DEBUG("se2_tap_delays_ucode_size_bytes :%u\n",
288+ le32_to_cpu(rlc_hdr_v2_4->se2_tap_delays_ucode_size_bytes));
289+ DRM_DEBUG("se2_tap_delays_ucode_offset_bytes: %u\n",
290+ le32_to_cpu(rlc_hdr_v2_4->se2_tap_delays_ucode_offset_bytes));
291+ DRM_DEBUG("se3_tap_delays_ucode_size_bytes :%u\n",
292+ le32_to_cpu(rlc_hdr_v2_4->se3_tap_delays_ucode_size_bytes));
293+ DRM_DEBUG("se3_tap_delays_ucode_offset_bytes: %u\n",
294+ le32_to_cpu(rlc_hdr_v2_4->se3_tap_delays_ucode_offset_bytes));
295+ break;
296+ default:
297+ DRM_ERROR("Unknown RLC v2 ucode: v2.%u\n", version_minor);
298+ break;
231299 }
232300 } else {
233301 DRM_ERROR("Unknown RLC ucode version: %u.%u\n", version_major, version_minor);
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h+1−0
@@ -124,6 +124,7 @@ enum psp_fw_type { · 123 unmodified lines
124124 PSP_FW_TYPE_PSP_SOC_DRV,
125125 PSP_FW_TYPE_PSP_INTF_DRV,
126126 PSP_FW_TYPE_PSP_DBG_DRV,
127+ PSP_FW_TYPE_PSP_RAS_DRV,
127128 };
128129
129130 /* version_major=2, version_minor=0 */
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h+6−0
@@ -22,6 +22,8 @@ · 21 unmodified lines
2222 #define __AMDGPU_UMC_H__
2323 #include "amdgpu_ras.h"
2424
25+#define UMC_INVALID_ADDR 0x1ULL
26+
2527 /*
2628 * (addr / 256) * 4096, the higher 26 bits in ErrorAddr
2729 * is the index of 4KB block
@@ -51,6 +53,10 @@ struct amdgpu_umc_ras { · 23 unmodified lines
5153 struct amdgpu_ras_block_object ras_block;
5254 void (*err_cnt_init)(struct amdgpu_device *adev);
5355 bool (*query_ras_poison_mode)(struct amdgpu_device *adev);
56+ void (*convert_ras_error_address)(struct amdgpu_device *adev,
57+ struct ras_err_data *err_data,
58+ uint32_t umc_reg_offset, uint32_t ch_inst,
59+ uint32_t umc_inst, uint64_t mca_addr);
5460 void (*ecc_info_query_ras_error_count)(struct amdgpu_device *adev,
5561 void *ras_error_status);
5662 void (*ecc_info_query_ras_error_address)(struct amdgpu_device *adev,
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h+19−0
@@ -161,6 +161,8 @@ · 160 unmodified lines
161161 #define AMDGPU_VCN_SW_RING_FLAG (1 << 9)
162162 #define AMDGPU_VCN_FW_LOGGING_FLAG (1 << 10)
163163 #define AMDGPU_VCN_SMU_VERSION_INFO_FLAG (1 << 11)
164+#define AMDGPU_VCN_SMU_DPM_INTERFACE_FLAG (1 << 11)
165+#define AMDGPU_VCN_VF_RB_SETUP_FLAG (1 << 14)
164166
165167 #define AMDGPU_VCN_IB_FLAG_DECODE_BUFFER 0x00000001
166168 #define AMDGPU_VCN_CMD_FLAG_MSG_BUFFER 0x00000001
@@ -170,6 +172,9 @@ · 3 unmodified lines
170172 #define VCN_CODEC_DISABLE_MASK_HEVC (1 << 2)
171173 #define VCN_CODEC_DISABLE_MASK_H264 (1 << 3)
172174
175+#define AMDGPU_VCN_SMU_DPM_INTERFACE_DGPU (0)
176+#define AMDGPU_VCN_SMU_DPM_INTERFACE_APU (1)
177+
173178 enum fw_queue_mode {
174179 FW_QUEUE_RING_RESET = 1,
175180 FW_QUEUE_DPG_HOLD_OFF = 2,
@@ -317,12 +322,26 @@ struct amdgpu_fw_shared { · 141 unmodified lines
317322 struct amdgpu_fw_shared_smu_interface_info smu_interface_info;
318323 };
319324
325+struct amdgpu_fw_shared_rb_setup {
326+ uint32_t is_rb_enabled_flags;
327+ uint32_t rb_addr_lo;
328+ uint32_t rb_addr_hi;
329+ uint32_t rb_size;
330+ uint32_t rb4_addr_lo;
331+ uint32_t rb4_addr_hi;
332+ uint32_t rb4_size;
333+ uint32_t reserved[6];
334+};
335+
320336 struct amdgpu_vcn4_fw_shared {
321337 uint32_t present_flag_0;
322338 uint8_t pad[12];
323339 struct amdgpu_fw_shared_unified_queue_struct sq;
324340 uint8_t pad1[8];
325341 struct amdgpu_fw_shared_fw_logging fw_log;
342+ uint8_t pad2[20];
343+ struct amdgpu_fw_shared_rb_setup rb_setup;
344+ struct amdgpu_fw_shared_smu_interface_info smu_dpm_interface;
326345 };
327346
328347 struct amdgpu_vcn_fwlog {
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c+56−1
@@ -690,7 +690,6 @@ void amdgpu_virt_exchange_data(struct amdgpu_device *adev) · 689 unmodified lines
690690 }
691691 }
692692
693−
694693 void amdgpu_detect_virtualization(struct amdgpu_device *adev)
695694 {
696695 uint32_t reg;
@@ -707,6 +706,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev) · 10 unmodified lines
707706 case CHIP_SIENNA_CICHLID:
708707 case CHIP_ARCTURUS:
709708 case CHIP_ALDEBARAN:
709+ case CHIP_IP_DISCOVERY:
710710 reg = RREG32(mmRCC_IOV_FUNC_IDENTIFIER);
711711 break;
712712 default: /* other chip doesn't support SRIOV */
@@ -750,6 +750,7 @@ void amdgpu_detect_virtualization(struct amdgpu_device *adev) · 37 unmodified lines
750750 case CHIP_NAVI10:
751751 case CHIP_NAVI12:
752752 case CHIP_SIENNA_CICHLID:
753+ case CHIP_IP_DISCOVERY:
753754 nv_set_virt_ops(adev);
754755 /* try send GPU_INIT_DATA request to host */
755756 amdgpu_virt_request_init_data(adev);
@@ -807,6 +808,60 @@ enum amdgpu_sriov_vf_mode amdgpu_virt_get_sriov_vf_mode(struct amdgpu_device *ad · 51 unmodified lines
807808 return mode;
808809 }
809810
811+bool amdgpu_virt_fw_load_skip_check(struct amdgpu_device *adev, uint32_t ucode_id)
812+{
813+ switch (adev->ip_versions[MP0_HWIP][0]) {
814+ case IP_VERSION(13, 0, 0):
815+ /* no vf autoload, white list */
816+ if (ucode_id == AMDGPU_UCODE_ID_VCN1 ||
817+ ucode_id == AMDGPU_UCODE_ID_VCN)
818+ return false;
819+ else
820+ return true;
821+ case IP_VERSION(13, 0, 10):
822+ /* white list */
823+ if (ucode_id == AMDGPU_UCODE_ID_CAP
824+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_PFP
825+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_ME
826+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_MEC
827+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_PFP_P0_STACK
828+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_PFP_P1_STACK
829+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK
830+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_ME_P1_STACK
831+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_MEC_P0_STACK
832+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_MEC_P1_STACK
833+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_MEC_P2_STACK
834+ || ucode_id == AMDGPU_UCODE_ID_CP_RS64_MEC_P3_STACK
835+ || ucode_id == AMDGPU_UCODE_ID_CP_MES
836+ || ucode_id == AMDGPU_UCODE_ID_CP_MES_DATA
837+ || ucode_id == AMDGPU_UCODE_ID_CP_MES1
838+ || ucode_id == AMDGPU_UCODE_ID_CP_MES1_DATA
839+ || ucode_id == AMDGPU_UCODE_ID_VCN1
840+ || ucode_id == AMDGPU_UCODE_ID_VCN)
841+ return false;
842+ else
843+ return true;
844+ default:
845+ /* lagacy black list */
846+ if (ucode_id == AMDGPU_UCODE_ID_SDMA0
847+ || ucode_id == AMDGPU_UCODE_ID_SDMA1
848+ || ucode_id == AMDGPU_UCODE_ID_SDMA2
849+ || ucode_id == AMDGPU_UCODE_ID_SDMA3
850+ || ucode_id == AMDGPU_UCODE_ID_SDMA4
851+ || ucode_id == AMDGPU_UCODE_ID_SDMA5
852+ || ucode_id == AMDGPU_UCODE_ID_SDMA6
853+ || ucode_id == AMDGPU_UCODE_ID_SDMA7
854+ || ucode_id == AMDGPU_UCODE_ID_RLC_G
855+ || ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL
856+ || ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM
857+ || ucode_id == AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM
858+ || ucode_id == AMDGPU_UCODE_ID_SMC)
859+ return true;
860+ else
861+ return false;
862+ }
863+}
864+
810865 void amdgpu_virt_update_sriov_video_codec(struct amdgpu_device *adev,
811866 struct amdgpu_video_codec_info *encode, uint32_t encode_array_size,
812867 struct amdgpu_video_codec_info *decode, uint32_t decode_array_size)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h+5−0
@@ -253,6 +253,9 @@ struct amdgpu_virt { · 252 unmodified lines
253253 uint32_t decode_max_frame_pixels;
254254 uint32_t encode_max_dimension_pixels;
255255 uint32_t encode_max_frame_pixels;
256+
257+ /* the ucode id to signal the autoload */
258+ uint32_t autoload_ucode_id;
256259 };
257260
258261 struct amdgpu_video_codec_info;
@@ -343,4 +346,6 @@ void amdgpu_sriov_wreg(struct amdgpu_device *adev, · 84 unmodified lines
343346 u32 acc_flags, u32 hwip);
344347 u32 amdgpu_sriov_rreg(struct amdgpu_device *adev,
345348 u32 offset, u32 acc_flags, u32 hwip);
349+bool amdgpu_virt_fw_load_skip_check(struct amdgpu_device *adev,
350+ uint32_t ucode_id);
346351 #endif
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c+2−2
@@ -282,8 +282,8 @@ static int amdgpu_vkms_plane_atomic_check(struct drm_plane *plane, · 281 unmodified lines
282282 return PTR_ERR(crtc_state);
283283
284284 ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
285− DRM_PLANE_HELPER_NO_SCALING,
286− DRM_PLANE_HELPER_NO_SCALING,
285+ DRM_PLANE_NO_SCALING,
286+ DRM_PLANE_NO_SCALING,
287287 false, true);
288288 if (ret != 0)
289289 return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+67−30
@@ -183,10 +183,12 @@ static void amdgpu_vm_bo_evicted(struct amdgpu_vm_bo_base *vm_bo) · 182 unmodified lines
183183 struct amdgpu_bo *bo = vm_bo->bo;
184184
185185 vm_bo->moved = true;
186+ spin_lock(&vm_bo->vm->status_lock);
186187 if (bo->tbo.type == ttm_bo_type_kernel)
187188 list_move(&vm_bo->vm_status, &vm->evicted);
188189 else
189190 list_move_tail(&vm_bo->vm_status, &vm->evicted);
191+ spin_unlock(&vm_bo->vm->status_lock);
190192 }
191193 /**
192194 * amdgpu_vm_bo_moved - vm_bo is moved
@@ -198,7 +200,9 @@ static void amdgpu_vm_bo_evicted(struct amdgpu_vm_bo_base *vm_bo) · 5 unmodified lines
198200 */
199201 static void amdgpu_vm_bo_moved(struct amdgpu_vm_bo_base *vm_bo)
200202 {
203+ spin_lock(&vm_bo->vm->status_lock);
201204 list_move(&vm_bo->vm_status, &vm_bo->vm->moved);
205+ spin_unlock(&vm_bo->vm->status_lock);
202206 }
203207
204208 /**
@@ -211,7 +215,9 @@ static void amdgpu_vm_bo_moved(struct amdgpu_vm_bo_base *vm_bo) · 6 unmodified lines
211215 */
212216 static void amdgpu_vm_bo_idle(struct amdgpu_vm_bo_base *vm_bo)
213217 {
218+ spin_lock(&vm_bo->vm->status_lock);
214219 list_move(&vm_bo->vm_status, &vm_bo->vm->idle);
220+ spin_unlock(&vm_bo->vm->status_lock);
215221 vm_bo->moved = false;
216222 }
217223
@@ -225,9 +231,9 @@ static void amdgpu_vm_bo_idle(struct amdgpu_vm_bo_base *vm_bo) · 7 unmodified lines
225231 */
226232 static void amdgpu_vm_bo_invalidated(struct amdgpu_vm_bo_base *vm_bo)
227233 {
228− spin_lock(&vm_bo->vm->invalidated_lock);
234+ spin_lock(&vm_bo->vm->status_lock);
229235 list_move(&vm_bo->vm_status, &vm_bo->vm->invalidated);
230− spin_unlock(&vm_bo->vm->invalidated_lock);
236+ spin_unlock(&vm_bo->vm->status_lock);
231237 }
232238
233239 /**
@@ -240,10 +246,13 @@ static void amdgpu_vm_bo_invalidated(struct amdgpu_vm_bo_base *vm_bo) · 6 unmodified lines
240246 */
241247 static void amdgpu_vm_bo_relocated(struct amdgpu_vm_bo_base *vm_bo)
242248 {
243− if (vm_bo->bo->parent)
249+ if (vm_bo->bo->parent) {
250+ spin_lock(&vm_bo->vm->status_lock);
244251 list_move(&vm_bo->vm_status, &vm_bo->vm->relocated);
245− else
252+ spin_unlock(&vm_bo->vm->status_lock);
253+ } else {
246254 amdgpu_vm_bo_idle(vm_bo);
255+ }
247256 }
248257
249258 /**
@@ -256,9 +265,9 @@ static void amdgpu_vm_bo_relocated(struct amdgpu_vm_bo_base *vm_bo) · 6 unmodified lines
256265 */
257266 static void amdgpu_vm_bo_done(struct amdgpu_vm_bo_base *vm_bo)
258267 {
259− spin_lock(&vm_bo->vm->invalidated_lock);
268+ spin_lock(&vm_bo->vm->status_lock);
260269 list_move(&vm_bo->vm_status, &vm_bo->vm->done);
261− spin_unlock(&vm_bo->vm->invalidated_lock);
270+ spin_unlock(&vm_bo->vm->status_lock);
262271 }
263272
264273 /**
@@ -363,12 +372,20 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, · 98 unmodified lines
363372 int (*validate)(void *p, struct amdgpu_bo *bo),
364373 void *param)
365374 {
366− struct amdgpu_vm_bo_base *bo_base, *tmp;
375+ struct amdgpu_vm_bo_base *bo_base;
376+ struct amdgpu_bo *shadow;
377+ struct amdgpu_bo *bo;
367378 int r;
368379
369− list_for_each_entry_safe(bo_base, tmp, &vm->evicted, vm_status) {
370− struct amdgpu_bo *bo = bo_base->bo;
371− struct amdgpu_bo *shadow = amdgpu_bo_shadowed(bo);
380+ spin_lock(&vm->status_lock);
381+ while (!list_empty(&vm->evicted)) {
382+ bo_base = list_first_entry(&vm->evicted,
383+ struct amdgpu_vm_bo_base,
384+ vm_status);
385+ spin_unlock(&vm->status_lock);
386+
387+ bo = bo_base->bo;
388+ shadow = amdgpu_bo_shadowed(bo);
372389
373390 r = validate(param, bo);
374391 if (r)
@@ -385,7 +402,9 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, · 10 unmodified lines
385402 vm->update_funcs->map_table(to_amdgpu_bo_vm(bo));
386403 amdgpu_vm_bo_relocated(bo_base);
387404 }
405+ spin_lock(&vm->status_lock);
388406 }
407+ spin_unlock(&vm->status_lock);
389408
390409 amdgpu_vm_eviction_lock(vm);
391410 vm->evicting = false;
@@ -406,13 +425,18 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, · 14 unmodified lines
406425 */
407426 bool amdgpu_vm_ready(struct amdgpu_vm *vm)
408427 {
428+ bool empty;
409429 bool ret;
410430
411431 amdgpu_vm_eviction_lock(vm);
412432 ret = !vm->evicting;
413433 amdgpu_vm_eviction_unlock(vm);
414434
415− return ret && list_empty(&vm->evicted);
435+ spin_lock(&vm->status_lock);
436+ empty = list_empty(&vm->evicted);
437+ spin_unlock(&vm->status_lock);
438+
439+ return ret && empty;
416440 }
417441
418442 /**
@@ -680,9 +704,14 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev, · 261 unmodified lines
680704 struct amdgpu_vm_update_params params;
681705 struct amdgpu_vm_bo_base *entry;
682706 bool flush_tlb_needed = false;
707+ LIST_HEAD(relocated);
683708 int r, idx;
684709
685− if (list_empty(&vm->relocated))
710+ spin_lock(&vm->status_lock);
711+ list_splice_init(&vm->relocated, &relocated);
712+ spin_unlock(&vm->status_lock);
713+
714+ if (list_empty(&relocated))
686715 return 0;
687716
688717 if (!drm_dev_enter(adev_to_drm(adev), &idx))
@@ -697,7 +726,7 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev, · 8 unmodified lines
697726 if (r)
698727 goto error;
699728
700− list_for_each_entry(entry, &vm->relocated, vm_status) {
729+ list_for_each_entry(entry, &relocated, vm_status) {
701730 /* vm_flush_needed after updating moved PDEs */
702731 flush_tlb_needed |= entry->moved;
703732
@@ -713,9 +742,8 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev, · 9 unmodified lines
713742 if (flush_tlb_needed)
714743 atomic64_inc(&vm->tlb_seq);
715744
716− while (!list_empty(&vm->relocated)) {
717− entry = list_first_entry(&vm->relocated,
718− struct amdgpu_vm_bo_base,
745+ while (!list_empty(&relocated)) {
746+ entry = list_first_entry(&relocated, struct amdgpu_vm_bo_base,
719747 vm_status);
720748 amdgpu_vm_bo_idle(entry);
721749 }
@@ -912,6 +940,7 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem, · 190 unmodified lines
912940 {
913941 struct amdgpu_bo_va *bo_va, *tmp;
914942
943+ spin_lock(&vm->status_lock);
915944 list_for_each_entry_safe(bo_va, tmp, &vm->idle, base.vm_status) {
916945 if (!bo_va->base.bo)
917946 continue;
@@ -936,7 +965,6 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem, · 18 unmodified lines
936965 amdgpu_bo_get_memory(bo_va->base.bo, vram_mem,
937966 gtt_mem, cpu_mem);
938967 }
939− spin_lock(&vm->invalidated_lock);
940968 list_for_each_entry_safe(bo_va, tmp, &vm->invalidated, base.vm_status) {
941969 if (!bo_va->base.bo)
942970 continue;
@@ -949,7 +977,7 @@ void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem, · 6 unmodified lines
949977 amdgpu_bo_get_memory(bo_va->base.bo, vram_mem,
950978 gtt_mem, cpu_mem);
951979 }
952− spin_unlock(&vm->invalidated_lock);
980+ spin_unlock(&vm->status_lock);
953981 }
954982 /**
955983 * amdgpu_vm_bo_update - update all BO mappings in the vm page table
@@ -1278,24 +1306,29 @@ int amdgpu_vm_clear_freed(struct amdgpu_device *adev, · 322 unmodified lines
12781306 int amdgpu_vm_handle_moved(struct amdgpu_device *adev,
12791307 struct amdgpu_vm *vm)
12801308 {
1281− struct amdgpu_bo_va *bo_va, *tmp;
1309+ struct amdgpu_bo_va *bo_va;
12821310 struct dma_resv *resv;
12831311 bool clear;
12841312 int r;
12851313
1286− list_for_each_entry_safe(bo_va, tmp, &vm->moved, base.vm_status) {
1314+ spin_lock(&vm->status_lock);
1315+ while (!list_empty(&vm->moved)) {
1316+ bo_va = list_first_entry(&vm->moved, struct amdgpu_bo_va,
1317+ base.vm_status);
1318+ spin_unlock(&vm->status_lock);
1319+
12871320 /* Per VM BOs never need to bo cleared in the page tables */
12881321 r = amdgpu_vm_bo_update(adev, bo_va, false);
12891322 if (r)
12901323 return r;
1324+ spin_lock(&vm->status_lock);
12911325 }
12921326
1293− spin_lock(&vm->invalidated_lock);
12941327 while (!list_empty(&vm->invalidated)) {
12951328 bo_va = list_first_entry(&vm->invalidated, struct amdgpu_bo_va,
12961329 base.vm_status);
12971330 resv = bo_va->base.bo->tbo.base.resv;
1298− spin_unlock(&vm->invalidated_lock);
1331+ spin_unlock(&vm->status_lock);
12991332
13001333 /* Try to reserve the BO to avoid clearing its ptes */
13011334 if (!amdgpu_vm_debug && dma_resv_trylock(resv))
@@ -1310,9 +1343,9 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev, · 8 unmodified lines
13101343
13111344 if (!clear)
13121345 dma_resv_unlock(resv);
1313− spin_lock(&vm->invalidated_lock);
1346+ spin_lock(&vm->status_lock);
13141347 }
1315− spin_unlock(&vm->invalidated_lock);
1348+ spin_unlock(&vm->status_lock);
13161349
13171350 return 0;
13181351 }
@@ -1387,7 +1420,7 @@ static void amdgpu_vm_bo_insert_map(struct amdgpu_device *adev, · 68 unmodified lines
13871420
13881421 if (bo && bo->tbo.base.resv == vm->root.bo->tbo.base.resv &&
13891422 !bo_va->base.moved) {
1390− list_move(&bo_va->base.vm_status, &vm->moved);
1423+ amdgpu_vm_bo_moved(&bo_va->base);
13911424 }
13921425 trace_amdgpu_vm_bo_map(bo_va, mapping);
13931426 }
@@ -1763,9 +1796,9 @@ void amdgpu_vm_bo_del(struct amdgpu_device *adev, · 369 unmodified lines
17631796 }
17641797 }
17651798
1766− spin_lock(&vm->invalidated_lock);
1799+ spin_lock(&vm->status_lock);
17671800 list_del(&bo_va->base.vm_status);
1768− spin_unlock(&vm->invalidated_lock);
1801+ spin_unlock(&vm->status_lock);
17691802
17701803 list_for_each_entry_safe(mapping, next, &bo_va->valids, list) {
17711804 list_del(&mapping->list);
@@ -2019,9 +2052,11 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm) · 247 unmodified lines
20192052 INIT_LIST_HEAD(&vm->moved);
20202053 INIT_LIST_HEAD(&vm->idle);
20212054 INIT_LIST_HEAD(&vm->invalidated);
2022− spin_lock_init(&vm->invalidated_lock);
2055+ spin_lock_init(&vm->status_lock);
20232056 INIT_LIST_HEAD(&vm->freed);
20242057 INIT_LIST_HEAD(&vm->done);
2058+ INIT_LIST_HEAD(&vm->pt_freed);
2059+ INIT_WORK(&vm->pt_free_work, amdgpu_vm_pt_free_work);
20252060
20262061 /* create scheduler entities for page table updates */
20272062 r = drm_sched_entity_init(&vm->immediate, DRM_SCHED_PRIORITY_NORMAL,
@@ -2223,6 +2258,8 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) · 195 unmodified lines
22232258
22242259 amdgpu_amdkfd_gpuvm_destroy_cb(adev, vm);
22252260
2261+ flush_work(&vm->pt_free_work);
2262+
22262263 root = amdgpu_bo_ref(vm->root.bo);
22272264 amdgpu_bo_reserve(root, true);
22282265 amdgpu_vm_set_pasid(adev, vm, 0);
@@ -2547,6 +2584,7 @@ void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m) · 318 unmodified lines
25472584 unsigned int total_done_objs = 0;
25482585 unsigned int id = 0;
25492586
2587+ spin_lock(&vm->status_lock);
25502588 seq_puts(m, "\tIdle BOs:\n");
25512589 list_for_each_entry_safe(bo_va, tmp, &vm->idle, base.vm_status) {
25522590 if (!bo_va->base.bo)
@@ -2584,7 +2622,6 @@ void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m) · 31 unmodified lines
25842622 id = 0;
25852623
25862624 seq_puts(m, "\tInvalidated BOs:\n");
2587− spin_lock(&vm->invalidated_lock);
25882625 list_for_each_entry_safe(bo_va, tmp, &vm->invalidated, base.vm_status) {
25892626 if (!bo_va->base.bo)
25902627 continue;
@@ -2599,7 +2636,7 @@ void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m) · 8 unmodified lines
25992636 continue;
26002637 total_done += amdgpu_bo_print_info(id++, bo_va->base.bo, m);
26012638 }
2602− spin_unlock(&vm->invalidated_lock);
2639+ spin_unlock(&vm->status_lock);
26032640 total_done_objs = id;
26042641
26052642 seq_printf(m, "\tTotal idle size: %12lld\tobjs:\t%d\n", total_idle,
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h+8−1
@@ -254,6 +254,9 @@ struct amdgpu_vm { · 253 unmodified lines
254254 bool evicting;
255255 unsigned int saved_flags;
256256
257+ /* Lock to protect vm_bo add/del/move on all lists of vm */
258+ spinlock_t status_lock;
259+
257260 /* BOs who needs a validation */
258261 struct list_head evicted;
259262
@@ -268,7 +271,6 @@ struct amdgpu_vm { · 8 unmodified lines
268271
269272 /* regular invalidated BOs, but not yet updated in the PT */
270273 struct list_head invalidated;
271− spinlock_t invalidated_lock;
272274
273275 /* BO mappings freed, but not yet updated in the PT */
274276 struct list_head freed;
@@ -276,6 +278,10 @@ struct amdgpu_vm { · 1 unmodified line
276278 /* BOs which are invalidated, has been updated in the PTs */
277279 struct list_head done;
278280
281+ /* PT BOs scheduled to free and fill with zero if vm_resv is not hold */
282+ struct list_head pt_freed;
283+ struct work_struct pt_free_work;
284+
279285 /* contains the page directory */
280286 struct amdgpu_vm_bo_base root;
281287 struct dma_fence *last_update;
@@ -471,6 +477,7 @@ int amdgpu_vm_pde_update(struct amdgpu_vm_update_params *params, · 189 unmodified lines
471477 int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params,
472478 uint64_t start, uint64_t end,
473479 uint64_t dst, uint64_t flags);
480+void amdgpu_vm_pt_free_work(struct work_struct *work);
474481
475482 #if defined(CONFIG_DEBUG_FS)
476483 void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m);
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c+41−3
@@ -637,10 +637,34 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry) · 636 unmodified lines
637637 }
638638 ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
639639 entry->bo->vm_bo = NULL;
640+
641+ spin_lock(&entry->vm->status_lock);
640642 list_del(&entry->vm_status);
643+ spin_unlock(&entry->vm->status_lock);
641644 amdgpu_bo_unref(&entry->bo);
642645 }
643646
647+void amdgpu_vm_pt_free_work(struct work_struct *work)
648+{
649+ struct amdgpu_vm_bo_base *entry, *next;
650+ struct amdgpu_vm *vm;
651+ LIST_HEAD(pt_freed);
652+
653+ vm = container_of(work, struct amdgpu_vm, pt_free_work);
654+
655+ spin_lock(&vm->status_lock);
656+ list_splice_init(&vm->pt_freed, &pt_freed);
657+ spin_unlock(&vm->status_lock);
658+
659+ /* flush_work in amdgpu_vm_fini ensure vm->root.bo is valid. */
660+ amdgpu_bo_reserve(vm->root.bo, true);
661+
662+ list_for_each_entry_safe(entry, next, &pt_freed, vm_status)
663+ amdgpu_vm_pt_free(entry);
664+
665+ amdgpu_bo_unreserve(vm->root.bo);
666+}
667+
644668 /**
645669 * amdgpu_vm_pt_free_dfs - free PD/PT levels
646670 *
@@ -652,11 +676,24 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry) · 5 unmodified lines
652676 */
653677 static void amdgpu_vm_pt_free_dfs(struct amdgpu_device *adev,
654678 struct amdgpu_vm *vm,
655− struct amdgpu_vm_pt_cursor *start)
679+ struct amdgpu_vm_pt_cursor *start,
680+ bool unlocked)
656681 {
657682 struct amdgpu_vm_pt_cursor cursor;
658683 struct amdgpu_vm_bo_base *entry;
659684
685+ if (unlocked) {
686+ spin_lock(&vm->status_lock);
687+ for_each_amdgpu_vm_pt_dfs_safe(adev, vm, start, cursor, entry)
688+ list_move(&entry->vm_status, &vm->pt_freed);
689+
690+ if (start)
691+ list_move(&start->entry->vm_status, &vm->pt_freed);
692+ spin_unlock(&vm->status_lock);
693+ schedule_work(&vm->pt_free_work);
694+ return;
695+ }
696+
660697 for_each_amdgpu_vm_pt_dfs_safe(adev, vm, start, cursor, entry)
661698 amdgpu_vm_pt_free(entry);
662699
@@ -673,7 +710,7 @@ static void amdgpu_vm_pt_free_dfs(struct amdgpu_device *adev, · 10 unmodified lines
673710 */
674711 void amdgpu_vm_pt_free_root(struct amdgpu_device *adev, struct amdgpu_vm *vm)
675712 {
676− amdgpu_vm_pt_free_dfs(adev, vm, NULL);
713+ amdgpu_vm_pt_free_dfs(adev, vm, NULL, false);
677714 }
678715
679716 /**
@@ -966,7 +1003,8 @@ int amdgpu_vm_ptes_update(struct amdgpu_vm_update_params *params, · 286 unmodified lines
9661003 if (cursor.entry->bo) {
9671004 params->table_freed = true;
9681005 amdgpu_vm_pt_free_dfs(adev, params->vm,
969− &cursor);
1006+ &cursor,
1007+ params->unlocked);
9701008 }
9711009 amdgpu_vm_pt_next(adev, &cursor);
9721010 }
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c+8−4
@@ -112,7 +112,8 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p, · 111 unmodified lines
112112 swap(p->vm->last_unlocked, tmp);
113113 dma_fence_put(tmp);
114114 } else {
115− amdgpu_bo_fence(p->vm->root.bo, f, true);
115+ dma_resv_add_fence(p->vm->root.bo->tbo.base.resv, f,
116+ DMA_RESV_USAGE_BOOKKEEP);
116117 }
117118
118119 if (fence && !p->immediate)
@@ -211,12 +212,15 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p, · 92 unmodified lines
211212 int r;
212213
213214 /* Wait for PD/PT moves to be completed */
214− dma_resv_for_each_fence(&cursor, bo->tbo.base.resv,
215− DMA_RESV_USAGE_KERNEL, fence) {
215+ dma_resv_iter_begin(&cursor, bo->tbo.base.resv, DMA_RESV_USAGE_KERNEL);
216+ dma_resv_for_each_fence_unlocked(&cursor, fence) {
216217 r = amdgpu_sync_fence(&p->job->sync, fence);
217− if (r)
218+ if (r) {
219+ dma_resv_iter_end(&cursor);
218220 return r;
221+ }
219222 }
223+ dma_resv_iter_end(&cursor);
220224
221225 do {
222226 ndw = p->num_dw_left;
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c+68−0
@@ -720,6 +720,72 @@ uint64_t amdgpu_vram_mgr_vis_usage(struct amdgpu_vram_mgr *mgr) · 719 unmodified lines
720720 return atomic64_read(&mgr->vis_usage);
721721 }
722722
723+/**
724+ * amdgpu_vram_mgr_intersects - test each drm buddy block for intersection
725+ *
726+ * @man: TTM memory type manager
727+ * @res: The resource to test
728+ * @place: The place to test against
729+ * @size: Size of the new allocation
730+ *
731+ * Test each drm buddy block for intersection for eviction decision.
732+ */
733+static bool amdgpu_vram_mgr_intersects(struct ttm_resource_manager *man,
734+ struct ttm_resource *res,
735+ const struct ttm_place *place,
736+ size_t size)
737+{
738+ struct amdgpu_vram_mgr_resource *mgr = to_amdgpu_vram_mgr_resource(res);
739+ struct drm_buddy_block *block;
740+
741+ /* Check each drm buddy block individually */
742+ list_for_each_entry(block, &mgr->blocks, link) {
743+ unsigned long fpfn =
744+ amdgpu_vram_mgr_block_start(block) >> PAGE_SHIFT;
745+ unsigned long lpfn = fpfn +
746+ (amdgpu_vram_mgr_block_size(block) >> PAGE_SHIFT);
747+
748+ if (place->fpfn < lpfn &&
749+ (!place->lpfn || place->lpfn > fpfn))
750+ return true;
751+ }
752+
753+ return false;
754+}
755+
756+/**
757+ * amdgpu_vram_mgr_compatible - test each drm buddy block for compatibility
758+ *
759+ * @man: TTM memory type manager
760+ * @res: The resource to test
761+ * @place: The place to test against
762+ * @size: Size of the new allocation
763+ *
764+ * Test each drm buddy block for placement compatibility.
765+ */
766+static bool amdgpu_vram_mgr_compatible(struct ttm_resource_manager *man,
767+ struct ttm_resource *res,
768+ const struct ttm_place *place,
769+ size_t size)
770+{
771+ struct amdgpu_vram_mgr_resource *mgr = to_amdgpu_vram_mgr_resource(res);
772+ struct drm_buddy_block *block;
773+
774+ /* Check each drm buddy block individually */
775+ list_for_each_entry(block, &mgr->blocks, link) {
776+ unsigned long fpfn =
777+ amdgpu_vram_mgr_block_start(block) >> PAGE_SHIFT;
778+ unsigned long lpfn = fpfn +
779+ (amdgpu_vram_mgr_block_size(block) >> PAGE_SHIFT);
780+
781+ if (fpfn < place->fpfn ||
782+ (place->lpfn && lpfn > place->lpfn))
783+ return false;
784+ }
785+
786+ return true;
787+}
788+
723789 /**
724790 * amdgpu_vram_mgr_debug - dump VRAM table
725791 *
@@ -753,6 +819,8 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, · 27 unmodified lines
753819 static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = {
754820 .alloc = amdgpu_vram_mgr_new,
755821 .free = amdgpu_vram_mgr_del,
822+ .intersects = amdgpu_vram_mgr_intersects,
823+ .compatible = amdgpu_vram_mgr_compatible,
756824 .debug = amdgpu_vram_mgr_debug
757825 };
758826
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c+18−6
@@ -391,13 +391,21 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev) · 390 unmodified lines
391391 goto pro_end;
392392 }
393393
394+ /**
395+ * Only init hive->reset_domain for none SRIOV configuration. For SRIOV,
396+ * Host driver decide how to reset the GPU either through FLR or chain reset.
397+ * Guest side will get individual notifications from the host for the FLR
398+ * if necessary.
399+ */
400+ if (!amdgpu_sriov_vf(adev)) {
394401 /**
395402 * Avoid recreating reset domain when hive is reconstructed for the case
396− * of reset the devices in the XGMI hive during probe for SRIOV
403+ * of reset the devices in the XGMI hive during probe for passthrough GPU
397404 * See https://www.spinics.net/lists/amd-gfx/msg58836.html
398405 */
399− if (adev->reset_domain->type != XGMI_HIVE) {
400− hive->reset_domain = amdgpu_reset_create_reset_domain(XGMI_HIVE, "amdgpu-reset-hive");
406+ if (adev->reset_domain->type != XGMI_HIVE) {
407+ hive->reset_domain =
408+ amdgpu_reset_create_reset_domain(XGMI_HIVE, "amdgpu-reset-hive");
401409 if (!hive->reset_domain) {
402410 dev_err(adev->dev, "XGMI: failed initializing reset domain for xgmi hive\n");
403411 ret = -ENOMEM;
@@ -406,9 +414,10 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev) · 2 unmodified lines
406414 hive = NULL;
407415 goto pro_end;
408416 }
409− } else {
410− amdgpu_reset_get_reset_domain(adev->reset_domain);
411− hive->reset_domain = adev->reset_domain;
417+ } else {
418+ amdgpu_reset_get_reset_domain(adev->reset_domain);
419+ hive->reset_domain = adev->reset_domain;
420+ }
412421 }
413422
414423 hive->hive_id = adev->gmc.xgmi.hive_id;
@@ -504,6 +513,9 @@ int amdgpu_xgmi_update_topology(struct amdgpu_hive_info *hive, struct amdgpu_dev · 89 unmodified lines
504513 {
505514 int ret;
506515
516+ if (amdgpu_sriov_vf(adev))
517+ return 0;
518+
507519 /* Each psp need to set the latest topology */
508520 ret = psp_xgmi_set_topology_info(&adev->psp,
509521 atomic_read(&hive->number_devices),
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h+1−0
@@ -43,6 +43,7 @@ struct amdgpu_hive_info { · 42 unmodified lines
4343 } pstate;
4444
4545 struct amdgpu_reset_domain *reset_domain;
46+ uint32_t device_remove_count;
4647 };
4748
4849 struct amdgpu_pcs_ras_field {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c+24−267
@@ -3943,56 +3943,6 @@ static void gfx_v10_0_check_fw_write_wait(struct amdgpu_device *adev) · 3942 unmodified lines
39433943 DRM_WARN_ONCE("CP firmware version too old, please update!");
39443944 }
39453945
3946−
3947−static void gfx_v10_0_init_rlc_ext_microcode(struct amdgpu_device *adev)
3948−{
3949− const struct rlc_firmware_header_v2_1 *rlc_hdr;
3950−
3951− rlc_hdr = (const struct rlc_firmware_header_v2_1 *)adev->gfx.rlc_fw->data;
3952− adev->gfx.rlc_srlc_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_ucode_ver);
3953− adev->gfx.rlc_srlc_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_feature_ver);
3954− adev->gfx.rlc.save_restore_list_cntl_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_cntl_size_bytes);
3955− adev->gfx.rlc.save_restore_list_cntl = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_cntl_offset_bytes);
3956− adev->gfx.rlc_srlg_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_ucode_ver);
3957− adev->gfx.rlc_srlg_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_feature_ver);
3958− adev->gfx.rlc.save_restore_list_gpm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_gpm_size_bytes);
3959− adev->gfx.rlc.save_restore_list_gpm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_gpm_offset_bytes);
3960− adev->gfx.rlc_srls_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_ucode_ver);
3961− adev->gfx.rlc_srls_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_feature_ver);
3962− adev->gfx.rlc.save_restore_list_srm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_srm_size_bytes);
3963− adev->gfx.rlc.save_restore_list_srm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_srm_offset_bytes);
3964− adev->gfx.rlc.reg_list_format_direct_reg_list_length =
3965− le32_to_cpu(rlc_hdr->reg_list_format_direct_reg_list_length);
3966−}
3967−
3968−static void gfx_v10_0_init_rlc_iram_dram_microcode(struct amdgpu_device *adev)
3969−{
3970− const struct rlc_firmware_header_v2_2 *rlc_hdr;
3971−
3972− rlc_hdr = (const struct rlc_firmware_header_v2_2 *)adev->gfx.rlc_fw->data;
3973− adev->gfx.rlc.rlc_iram_ucode_size_bytes = le32_to_cpu(rlc_hdr->rlc_iram_ucode_size_bytes);
3974− adev->gfx.rlc.rlc_iram_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->rlc_iram_ucode_offset_bytes);
3975− adev->gfx.rlc.rlc_dram_ucode_size_bytes = le32_to_cpu(rlc_hdr->rlc_dram_ucode_size_bytes);
3976− adev->gfx.rlc.rlc_dram_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->rlc_dram_ucode_offset_bytes);
3977−}
3978−
3979−static void gfx_v10_0_init_tap_delays_microcode(struct amdgpu_device *adev)
3980−{
3981− const struct rlc_firmware_header_v2_4 *rlc_hdr;
3982−
3983− rlc_hdr = (const struct rlc_firmware_header_v2_4 *)adev->gfx.rlc_fw->data;
3984− adev->gfx.rlc.global_tap_delays_ucode_size_bytes = le32_to_cpu(rlc_hdr->global_tap_delays_ucode_size_bytes);
3985− adev->gfx.rlc.global_tap_delays_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->global_tap_delays_ucode_offset_bytes);
3986− adev->gfx.rlc.se0_tap_delays_ucode_size_bytes = le32_to_cpu(rlc_hdr->se0_tap_delays_ucode_size_bytes);
3987− adev->gfx.rlc.se0_tap_delays_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->se0_tap_delays_ucode_offset_bytes);
3988− adev->gfx.rlc.se1_tap_delays_ucode_size_bytes = le32_to_cpu(rlc_hdr->se1_tap_delays_ucode_size_bytes);
3989− adev->gfx.rlc.se1_tap_delays_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->se1_tap_delays_ucode_offset_bytes);
3990− adev->gfx.rlc.se2_tap_delays_ucode_size_bytes = le32_to_cpu(rlc_hdr->se2_tap_delays_ucode_size_bytes);
3991− adev->gfx.rlc.se2_tap_delays_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->se2_tap_delays_ucode_offset_bytes);
3992− adev->gfx.rlc.se3_tap_delays_ucode_size_bytes = le32_to_cpu(rlc_hdr->se3_tap_delays_ucode_size_bytes);
3993− adev->gfx.rlc.se3_tap_delays_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->se3_tap_delays_ucode_offset_bytes);
3994−}
3995−
39963946 static bool gfx_v10_0_navi10_gfxoff_should_enable(struct amdgpu_device *adev)
39973947 {
39983948 bool ret = false;
@@ -4028,12 +3978,7 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 29 unmodified lines
40283978 char fw_name[40];
40293979 char *wks = "";
40303980 int err;
4031− struct amdgpu_firmware_info *info = NULL;
4032− const struct common_firmware_header *header = NULL;
4033− const struct gfx_firmware_header_v1_0 *cp_hdr;
40343981 const struct rlc_firmware_header_v2_0 *rlc_hdr;
4035− unsigned int *tmp = NULL;
4036− unsigned int i = 0;
40373982 uint16_t version_major;
40383983 uint16_t version_minor;
40393984
@@ -4091,9 +4036,7 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 51 unmodified lines
40914036 err = amdgpu_ucode_validate(adev->gfx.pfp_fw);
40924037 if (err)
40934038 goto out;
4094− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data;
4095− adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4096− adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4039+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_PFP);
40974040
40984041 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me%s.bin", chip_name, wks);
40994042 err = request_firmware(&adev->gfx.me_fw, fw_name, adev->dev);
@@ -4102,9 +4045,7 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 2 unmodified lines
41024045 err = amdgpu_ucode_validate(adev->gfx.me_fw);
41034046 if (err)
41044047 goto out;
4105− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
4106− adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4107− adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4048+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_ME);
41084049
41094050 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce%s.bin", chip_name, wks);
41104051 err = request_firmware(&adev->gfx.ce_fw, fw_name, adev->dev);
@@ -4113,69 +4054,27 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 2 unmodified lines
41134054 err = amdgpu_ucode_validate(adev->gfx.ce_fw);
41144055 if (err)
41154056 goto out;
4116− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data;
4117− adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4118− adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4057+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_CE);
41194058
41204059 if (!amdgpu_sriov_vf(adev)) {
41214060 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);
41224061 err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
41234062 if (err)
41244063 goto out;
4064+ /* don't check this. There are apparently firmwares in the wild with
4065+ * incorrect size in the header
4066+ */
41254067 err = amdgpu_ucode_validate(adev->gfx.rlc_fw);
4068+ if (err)
4069+ dev_dbg(adev->dev,
4070+ "gfx10: amdgpu_ucode_validate() failed \"%s\"\n",
4071+ fw_name);
41264072 rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;
41274073 version_major = le16_to_cpu(rlc_hdr->header.header_version_major);
41284074 version_minor = le16_to_cpu(rlc_hdr->header.header_version_minor);
4129−
4130− adev->gfx.rlc_fw_version = le32_to_cpu(rlc_hdr->header.ucode_version);
4131− adev->gfx.rlc_feature_version = le32_to_cpu(rlc_hdr->ucode_feature_version);
4132− adev->gfx.rlc.save_and_restore_offset =
4133− le32_to_cpu(rlc_hdr->save_and_restore_offset);
4134− adev->gfx.rlc.clear_state_descriptor_offset =
4135− le32_to_cpu(rlc_hdr->clear_state_descriptor_offset);
4136− adev->gfx.rlc.avail_scratch_ram_locations =
4137− le32_to_cpu(rlc_hdr->avail_scratch_ram_locations);
4138− adev->gfx.rlc.reg_restore_list_size =
4139− le32_to_cpu(rlc_hdr->reg_restore_list_size);
4140− adev->gfx.rlc.reg_list_format_start =
4141− le32_to_cpu(rlc_hdr->reg_list_format_start);
4142− adev->gfx.rlc.reg_list_format_separate_start =
4143− le32_to_cpu(rlc_hdr->reg_list_format_separate_start);
4144− adev->gfx.rlc.starting_offsets_start =
4145− le32_to_cpu(rlc_hdr->starting_offsets_start);
4146− adev->gfx.rlc.reg_list_format_size_bytes =
4147− le32_to_cpu(rlc_hdr->reg_list_format_size_bytes);
4148− adev->gfx.rlc.reg_list_size_bytes =
4149− le32_to_cpu(rlc_hdr->reg_list_size_bytes);
4150− adev->gfx.rlc.register_list_format =
4151− kmalloc(adev->gfx.rlc.reg_list_format_size_bytes +
4152− adev->gfx.rlc.reg_list_size_bytes, GFP_KERNEL);
4153− if (!adev->gfx.rlc.register_list_format) {
4154− err = -ENOMEM;
4075+ err = amdgpu_gfx_rlc_init_microcode(adev, version_major, version_minor);
4076+ if (err)
41554077 goto out;
4156− }
4157−
4158− tmp = (unsigned int *)((uintptr_t)rlc_hdr +
4159− le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes));
4160− for (i = 0 ; i < (rlc_hdr->reg_list_format_size_bytes >> 2); i++)
4161− adev->gfx.rlc.register_list_format[i] = le32_to_cpu(tmp[i]);
4162−
4163− adev->gfx.rlc.register_restore = adev->gfx.rlc.register_list_format + i;
4164−
4165− tmp = (unsigned int *)((uintptr_t)rlc_hdr +
4166− le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes));
4167− for (i = 0 ; i < (rlc_hdr->reg_list_size_bytes >> 2); i++)
4168− adev->gfx.rlc.register_restore[i] = le32_to_cpu(tmp[i]);
4169−
4170− if (version_major == 2) {
4171− if (version_minor >= 1)
4172− gfx_v10_0_init_rlc_ext_microcode(adev);
4173− if (version_minor >= 2)
4174− gfx_v10_0_init_rlc_iram_dram_microcode(adev);
4175− if (version_minor == 4) {
4176− gfx_v10_0_init_tap_delays_microcode(adev);
4177− }
4178− }
41794078 }
41804079
41814080 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec%s.bin", chip_name, wks);
@@ -4185,9 +4084,8 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 3 unmodified lines
41854084 err = amdgpu_ucode_validate(adev->gfx.mec_fw);
41864085 if (err)
41874086 goto out;
4188− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
4189− adev->gfx.mec_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4190− adev->gfx.mec_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4087+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1);
4088+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1_JT);
41914089
41924090 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec2%s.bin", chip_name, wks);
41934091 err = request_firmware(&adev->gfx.mec2_fw, fw_name, adev->dev);
@@ -4195,164 +4093,18 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev) · 1 unmodified line
41954093 err = amdgpu_ucode_validate(adev->gfx.mec2_fw);
41964094 if (err)
41974095 goto out;
4198− cp_hdr = (const struct gfx_firmware_header_v1_0 *)
4199− adev->gfx.mec2_fw->data;
4200− adev->gfx.mec2_fw_version =
4201− le32_to_cpu(cp_hdr->header.ucode_version);
4202− adev->gfx.mec2_feature_version =
4203− le32_to_cpu(cp_hdr->ucode_feature_version);
4096+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC2);
4097+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC2_JT);
42044098 } else {
42054099 err = 0;
42064100 adev->gfx.mec2_fw = NULL;
42074101 }
42084102
4209− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
4210− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_PFP];
4211− info->ucode_id = AMDGPU_UCODE_ID_CP_PFP;
4212− info->fw = adev->gfx.pfp_fw;
4213− header = (const struct common_firmware_header *)info->fw->data;
4214− adev->firmware.fw_size +=
4215− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4216−
4217− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_ME];
4218− info->ucode_id = AMDGPU_UCODE_ID_CP_ME;
4219− info->fw = adev->gfx.me_fw;
4220− header = (const struct common_firmware_header *)info->fw->data;
4221− adev->firmware.fw_size +=
4222− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4223−
4224− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_CE];
4225− info->ucode_id = AMDGPU_UCODE_ID_CP_CE;
4226− info->fw = adev->gfx.ce_fw;
4227− header = (const struct common_firmware_header *)info->fw->data;
4228− adev->firmware.fw_size +=
4229− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4230−
4231− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_G];
4232− info->ucode_id = AMDGPU_UCODE_ID_RLC_G;
4233− info->fw = adev->gfx.rlc_fw;
4234− if (info->fw) {
4235− header = (const struct common_firmware_header *)info->fw->data;
4236− adev->firmware.fw_size +=
4237− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4238− }
4239− if (adev->gfx.rlc.save_restore_list_cntl_size_bytes &&
4240− adev->gfx.rlc.save_restore_list_gpm_size_bytes &&
4241− adev->gfx.rlc.save_restore_list_srm_size_bytes) {
4242− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL];
4243− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL;
4244− info->fw = adev->gfx.rlc_fw;
4245− adev->firmware.fw_size +=
4246− ALIGN(adev->gfx.rlc.save_restore_list_cntl_size_bytes, PAGE_SIZE);
4247−
4248− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM];
4249− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM;
4250− info->fw = adev->gfx.rlc_fw;
4251− adev->firmware.fw_size +=
4252− ALIGN(adev->gfx.rlc.save_restore_list_gpm_size_bytes, PAGE_SIZE);
4253−
4254− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM];
4255− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM;
4256− info->fw = adev->gfx.rlc_fw;
4257− adev->firmware.fw_size +=
4258− ALIGN(adev->gfx.rlc.save_restore_list_srm_size_bytes, PAGE_SIZE);
4259−
4260− if (adev->gfx.rlc.rlc_iram_ucode_size_bytes &&
4261− adev->gfx.rlc.rlc_dram_ucode_size_bytes) {
4262− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_IRAM];
4263− info->ucode_id = AMDGPU_UCODE_ID_RLC_IRAM;
4264− info->fw = adev->gfx.rlc_fw;
4265− adev->firmware.fw_size +=
4266− ALIGN(adev->gfx.rlc.rlc_iram_ucode_size_bytes, PAGE_SIZE);
4267−
4268− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_DRAM];
4269− info->ucode_id = AMDGPU_UCODE_ID_RLC_DRAM;
4270− info->fw = adev->gfx.rlc_fw;
4271− adev->firmware.fw_size +=
4272− ALIGN(adev->gfx.rlc.rlc_dram_ucode_size_bytes, PAGE_SIZE);
4273− }
4274−
4275− }
4276−
4277− if (adev->gfx.rlc.global_tap_delays_ucode_size_bytes) {
4278− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_GLOBAL_TAP_DELAYS];
4279− info->ucode_id = AMDGPU_UCODE_ID_GLOBAL_TAP_DELAYS;
4280− info->fw = adev->gfx.rlc_fw;
4281− adev->firmware.fw_size +=
4282− ALIGN(adev->gfx.rlc.global_tap_delays_ucode_size_bytes, PAGE_SIZE);
4283− }
4284−
4285− if (adev->gfx.rlc.se0_tap_delays_ucode_size_bytes) {
4286− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SE0_TAP_DELAYS];
4287− info->ucode_id = AMDGPU_UCODE_ID_SE0_TAP_DELAYS;
4288− info->fw = adev->gfx.rlc_fw;
4289− adev->firmware.fw_size +=
4290− ALIGN(adev->gfx.rlc.se0_tap_delays_ucode_size_bytes, PAGE_SIZE);
4291− }
4292−
4293− if (adev->gfx.rlc.se1_tap_delays_ucode_size_bytes) {
4294− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SE1_TAP_DELAYS];
4295− info->ucode_id = AMDGPU_UCODE_ID_SE1_TAP_DELAYS;
4296− info->fw = adev->gfx.rlc_fw;
4297− adev->firmware.fw_size +=
4298− ALIGN(adev->gfx.rlc.se1_tap_delays_ucode_size_bytes, PAGE_SIZE);
4299− }
4300−
4301− if (adev->gfx.rlc.se2_tap_delays_ucode_size_bytes) {
4302− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SE2_TAP_DELAYS];
4303− info->ucode_id = AMDGPU_UCODE_ID_SE2_TAP_DELAYS;
4304− info->fw = adev->gfx.rlc_fw;
4305− adev->firmware.fw_size +=
4306− ALIGN(adev->gfx.rlc.se2_tap_delays_ucode_size_bytes, PAGE_SIZE);
4307− }
4308−
4309− if (adev->gfx.rlc.se3_tap_delays_ucode_size_bytes) {
4310− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SE3_TAP_DELAYS];
4311− info->ucode_id = AMDGPU_UCODE_ID_SE3_TAP_DELAYS;
4312− info->fw = adev->gfx.rlc_fw;
4313− adev->firmware.fw_size +=
4314− ALIGN(adev->gfx.rlc.se3_tap_delays_ucode_size_bytes, PAGE_SIZE);
4315− }
4316−
4317− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1];
4318− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1;
4319− info->fw = adev->gfx.mec_fw;
4320− header = (const struct common_firmware_header *)info->fw->data;
4321− cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
4322− adev->firmware.fw_size +=
4323− ALIGN(le32_to_cpu(header->ucode_size_bytes) -
4324− le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
4325−
4326− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1_JT];
4327− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1_JT;
4328− info->fw = adev->gfx.mec_fw;
4329− adev->firmware.fw_size +=
4330− ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
4331−
4332− if (adev->gfx.mec2_fw) {
4333− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2];
4334− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
4335− info->fw = adev->gfx.mec2_fw;
4336− header = (const struct common_firmware_header *)info->fw->data;
4337− cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
4338− adev->firmware.fw_size +=
4339− ALIGN(le32_to_cpu(header->ucode_size_bytes) -
4340− le32_to_cpu(cp_hdr->jt_size) * 4,
4341− PAGE_SIZE);
4342− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2_JT];
4343− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2_JT;
4344− info->fw = adev->gfx.mec2_fw;
4345− adev->firmware.fw_size +=
4346− ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4,
4347− PAGE_SIZE);
4348− }
4349− }
4350−
43514103 gfx_v10_0_check_fw_write_wait(adev);
43524104 out:
43534105 if (err) {
43544106 dev_err(adev->dev,
4355− "gfx10: Failed to load firmware \"%s\"\n",
4107+ "gfx10: Failed to init firmware \"%s\"\n",
43564108 fw_name);
43574109 release_firmware(adev->gfx.pfp_fw);
43584110 adev->gfx.pfp_fw = NULL;
@@ -5981,6 +5733,9 @@ static int gfx_v10_0_cp_gfx_enable(struct amdgpu_device *adev, bool enable) · 1622 unmodified lines
59815733 WREG32_SOC15(GC, 0, mmCP_ME_CNTL, tmp);
59825734 }
59835735
5736+ if (adev->job_hang && !enable)
5737+ return 0;
5738+
59845739 for (i = 0; i < adev->usec_timeout; i++) {
59855740 if (RREG32_SOC15(GC, 0, mmCP_STAT) == 0)
59865741 break;
@@ -7579,8 +7334,10 @@ static int gfx_v10_0_kiq_disable_kgq(struct amdgpu_device *adev) · 1592 unmodified lines
75797334 for (i = 0; i < adev->gfx.num_gfx_rings; i++)
75807335 kiq->pmf->kiq_unmap_queues(kiq_ring, &adev->gfx.gfx_ring[i],
75817336 PREEMPT_QUEUES, 0, 0);
7582−
7583− return amdgpu_ring_test_helper(kiq_ring);
7337+ if (!adev->job_hang)
7338+ return amdgpu_ring_test_helper(kiq_ring);
7339+ else
7340+ return 0;
75847341 }
75857342 #endif
75867343
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c+37−180
@@ -73,21 +73,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_2_pfp.bin"); · 72 unmodified lines
7373 MODULE_FIRMWARE("amdgpu/gc_11_0_2_me.bin");
7474 MODULE_FIRMWARE("amdgpu/gc_11_0_2_mec.bin");
7575 MODULE_FIRMWARE("amdgpu/gc_11_0_2_rlc.bin");
76−
77−static const struct soc15_reg_golden golden_settings_gc_11_0[] =
78−{
79− /* Pending on emulation bring up */
80−};
81−
82−static const struct soc15_reg_golden golden_settings_gc_11_0_0[] =
83−{
84− /* Pending on emulation bring up */
85−};
86−
87−static const struct soc15_reg_golden golden_settings_gc_rlc_spm_11_0[] =
88−{
89− /* Pending on emulation bring up */
90−};
76+MODULE_FIRMWARE("amdgpu/gc_11_0_3_pfp.bin");
77+MODULE_FIRMWARE("amdgpu/gc_11_0_3_me.bin");
78+MODULE_FIRMWARE("amdgpu/gc_11_0_3_mec.bin");
79+MODULE_FIRMWARE("amdgpu/gc_11_0_3_rlc.bin");
9180
9281 static const struct soc15_reg_golden golden_settings_gc_11_0_1[] =
9382 {
@@ -269,34 +258,10 @@ static void gfx_v11_0_set_kiq_pm4_funcs(struct amdgpu_device *adev) · 175 unmodified lines
269258 adev->gfx.kiq.pmf = &gfx_v11_0_kiq_pm4_funcs;
270259 }
271260
272−static void gfx_v11_0_init_spm_golden_registers(struct amdgpu_device *adev)
273−{
274− switch (adev->ip_versions[GC_HWIP][0]) {
275− case IP_VERSION(11, 0, 0):
276− soc15_program_register_sequence(adev,
277− golden_settings_gc_rlc_spm_11_0,
278− (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_11_0));
279− break;
280− default:
281− break;
282− }
283−}
284−
285261 static void gfx_v11_0_init_golden_registers(struct amdgpu_device *adev)
286262 {
287263 switch (adev->ip_versions[GC_HWIP][0]) {
288− case IP_VERSION(11, 0, 0):
289− soc15_program_register_sequence(adev,
290− golden_settings_gc_11_0,
291− (const u32)ARRAY_SIZE(golden_settings_gc_11_0));
292− soc15_program_register_sequence(adev,
293− golden_settings_gc_11_0_0,
294− (const u32)ARRAY_SIZE(golden_settings_gc_11_0_0));
295− break;
296264 case IP_VERSION(11, 0, 1):
297− soc15_program_register_sequence(adev,
298− golden_settings_gc_11_0,
299− (const u32)ARRAY_SIZE(golden_settings_gc_11_0));
300265 soc15_program_register_sequence(adev,
301266 golden_settings_gc_11_0_1,
302267 (const u32)ARRAY_SIZE(golden_settings_gc_11_0_1));
@@ -304,7 +269,6 @@ static void gfx_v11_0_init_golden_registers(struct amdgpu_device *adev) · 1 unmodified line
304269 default:
305270 break;
306271 }
307− gfx_v11_0_init_spm_golden_registers(adev);
308272 }
309273
310274 static void gfx_v11_0_write_data_to_reg(struct amdgpu_ring *ring, int eng_sel,
@@ -479,10 +443,6 @@ static int gfx_v11_0_init_microcode(struct amdgpu_device *adev) · 168 unmodified lines
479443 char fw_name[40];
480444 char ucode_prefix[30];
481445 int err;
482− struct amdgpu_firmware_info *info = NULL;
483− const struct common_firmware_header *header = NULL;
484− const struct gfx_firmware_header_v1_0 *cp_hdr;
485− const struct gfx_firmware_header_v2_0 *cp_hdr_v2_0;
486446 const struct rlc_firmware_header_v2_0 *rlc_hdr;
487447 uint16_t version_major;
488448 uint16_t version_minor;
@@ -504,14 +464,11 @@ static int gfx_v11_0_init_microcode(struct amdgpu_device *adev) · 15 unmodified lines
504464 adev->gfx.pfp_fw->data, 2, 0);
505465 if (adev->gfx.rs64_enable) {
506466 dev_info(adev->dev, "CP RS64 enable\n");
507− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.pfp_fw->data;
508− adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
509− adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
510−
467+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_PFP);
468+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_PFP_P0_STACK);
469+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_PFP_P1_STACK);
511470 } else {
512− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data;
513− adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
514− adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
471+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_PFP);
515472 }
516473
517474 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me.bin", ucode_prefix);
@@ -522,14 +479,11 @@ static int gfx_v11_0_init_microcode(struct amdgpu_device *adev) · 4 unmodified lines
522479 if (err)
523480 goto out;
524481 if (adev->gfx.rs64_enable) {
525− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.me_fw->data;
526− adev->gfx.me_fw_version = le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
527− adev->gfx.me_feature_version = le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
528−
482+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_ME);
483+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK);
484+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_ME_P1_STACK);
529485 } else {
530− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
531− adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
532− adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
486+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_ME);
533487 }
534488
535489 if (!amdgpu_sriov_vf(adev)) {
@@ -556,136 +510,23 @@ static int gfx_v11_0_init_microcode(struct amdgpu_device *adev) · 20 unmodified lines
556510 if (err)
557511 goto out;
558512 if (adev->gfx.rs64_enable) {
559− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.mec_fw->data;
560− adev->gfx.mec_fw_version = le32_to_cpu(cp_hdr_v2_0->header.ucode_version);
561− adev->gfx.mec_feature_version = le32_to_cpu(cp_hdr_v2_0->ucode_feature_version);
562−
513+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_MEC);
514+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_MEC_P0_STACK);
515+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_MEC_P1_STACK);
516+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_MEC_P2_STACK);
517+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_MEC_P3_STACK);
563518 } else {
564− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
565− adev->gfx.mec_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
566− adev->gfx.mec_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
519+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1);
520+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1_JT);
567521 }
568522
569523 /* only one MEC for gfx 11.0.0. */
570524 adev->gfx.mec2_fw = NULL;
571525
572− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
573− if (adev->gfx.rs64_enable) {
574− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.pfp_fw->data;
575− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_PFP];
576− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_PFP;
577− info->fw = adev->gfx.pfp_fw;
578− header = (const struct common_firmware_header *)info->fw->data;
579− adev->firmware.fw_size +=
580− ALIGN(le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes), PAGE_SIZE);
581−
582− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_PFP_P0_STACK];
583− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_PFP_P0_STACK;
584− info->fw = adev->gfx.pfp_fw;
585− header = (const struct common_firmware_header *)info->fw->data;
586− adev->firmware.fw_size +=
587− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
588−
589− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_PFP_P1_STACK];
590− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_PFP_P1_STACK;
591− info->fw = adev->gfx.pfp_fw;
592− header = (const struct common_firmware_header *)info->fw->data;
593− adev->firmware.fw_size +=
594− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
595−
596− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.me_fw->data;
597− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_ME];
598− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_ME;
599− info->fw = adev->gfx.me_fw;
600− header = (const struct common_firmware_header *)info->fw->data;
601− adev->firmware.fw_size +=
602− ALIGN(le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes), PAGE_SIZE);
603−
604− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK];
605− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK;
606− info->fw = adev->gfx.me_fw;
607− header = (const struct common_firmware_header *)info->fw->data;
608− adev->firmware.fw_size +=
609− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
610−
611− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_ME_P1_STACK];
612− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_ME_P1_STACK;
613− info->fw = adev->gfx.me_fw;
614− header = (const struct common_firmware_header *)info->fw->data;
615− adev->firmware.fw_size +=
616− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
617−
618− cp_hdr_v2_0 = (const struct gfx_firmware_header_v2_0 *)adev->gfx.mec_fw->data;
619− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_MEC];
620− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_MEC;
621− info->fw = adev->gfx.mec_fw;
622− header = (const struct common_firmware_header *)info->fw->data;
623− adev->firmware.fw_size +=
624− ALIGN(le32_to_cpu(cp_hdr_v2_0->ucode_size_bytes), PAGE_SIZE);
625−
626− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_MEC_P0_STACK];
627− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_MEC_P0_STACK;
628− info->fw = adev->gfx.mec_fw;
629− header = (const struct common_firmware_header *)info->fw->data;
630− adev->firmware.fw_size +=
631− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
632−
633− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_MEC_P1_STACK];
634− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_MEC_P1_STACK;
635− info->fw = adev->gfx.mec_fw;
636− header = (const struct common_firmware_header *)info->fw->data;
637− adev->firmware.fw_size +=
638− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
639−
640− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_MEC_P2_STACK];
641− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_MEC_P2_STACK;
642− info->fw = adev->gfx.mec_fw;
643− header = (const struct common_firmware_header *)info->fw->data;
644− adev->firmware.fw_size +=
645− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
646−
647− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_RS64_MEC_P3_STACK];
648− info->ucode_id = AMDGPU_UCODE_ID_CP_RS64_MEC_P3_STACK;
649− info->fw = adev->gfx.mec_fw;
650− header = (const struct common_firmware_header *)info->fw->data;
651− adev->firmware.fw_size +=
652− ALIGN(le32_to_cpu(cp_hdr_v2_0->data_size_bytes), PAGE_SIZE);
653− } else {
654− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_PFP];
655− info->ucode_id = AMDGPU_UCODE_ID_CP_PFP;
656− info->fw = adev->gfx.pfp_fw;
657− header = (const struct common_firmware_header *)info->fw->data;
658− adev->firmware.fw_size +=
659− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
660−
661− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_ME];
662− info->ucode_id = AMDGPU_UCODE_ID_CP_ME;
663− info->fw = adev->gfx.me_fw;
664− header = (const struct common_firmware_header *)info->fw->data;
665− adev->firmware.fw_size +=
666− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
667−
668− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1];
669− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1;
670− info->fw = adev->gfx.mec_fw;
671− header = (const struct common_firmware_header *)info->fw->data;
672− cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
673− adev->firmware.fw_size +=
674− ALIGN(le32_to_cpu(header->ucode_size_bytes) -
675− le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
676−
677− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1_JT];
678− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1_JT;
679− info->fw = adev->gfx.mec_fw;
680− adev->firmware.fw_size +=
681− ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
682− }
683− }
684−
685526 out:
686527 if (err) {
687528 dev_err(adev->dev,
688− "gfx11: Failed to load firmware \"%s\"\n",
529+ "gfx11: Failed to init firmware \"%s\"\n",
689530 fw_name);
690531 release_firmware(adev->gfx.pfp_fw);
691532 adev->gfx.pfp_fw = NULL;
@@ -997,7 +838,6 @@ static const struct amdgpu_gfx_funcs gfx_v11_0_gfx_funcs = { · 305 unmodified lines
997838 .read_wave_sgprs = &gfx_v11_0_read_wave_sgprs,
998839 .read_wave_vgprs = &gfx_v11_0_read_wave_vgprs,
999840 .select_me_pipe_q = &gfx_v11_0_select_me_pipe_q,
1000− .init_spm_golden = &gfx_v11_0_init_spm_golden_registers,
1001841 .update_perfmon_mgcg = &gfx_v11_0_update_perf_clk,
1002842 };
1003843
@@ -1008,6 +848,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev) · 4 unmodified lines
1008848 switch (adev->ip_versions[GC_HWIP][0]) {
1009849 case IP_VERSION(11, 0, 0):
1010850 case IP_VERSION(11, 0, 2):
851+ case IP_VERSION(11, 0, 3):
1011852 adev->gfx.config.max_hw_contexts = 8;
1012853 adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
1013854 adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
@@ -1443,6 +1284,7 @@ static int gfx_v11_0_sw_init(void *handle) · 429 unmodified lines
14431284 case IP_VERSION(11, 0, 0):
14441285 case IP_VERSION(11, 0, 1):
14451286 case IP_VERSION(11, 0, 2):
1287+ case IP_VERSION(11, 0, 3):
14461288 adev->gfx.me.num_me = 1;
14471289 adev->gfx.me.num_pipe_per_me = 1;
14481290 adev->gfx.me.num_queue_per_pipe = 1;
@@ -2617,6 +2459,21 @@ static void gfx_v11_0_config_gfx_rs64(struct amdgpu_device *adev) · 1168 unmodified lines
26172459 mec_hdr->ucode_start_addr_hi >> 2);
26182460 }
26192461 soc21_grbm_select(adev, 0, 0, 0, 0);
2462+
2463+ /* reset mec pipe */
2464+ tmp = RREG32_SOC15(GC, 0, regCP_MEC_RS64_CNTL);
2465+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE0_RESET, 1);
2466+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE1_RESET, 1);
2467+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE2_RESET, 1);
2468+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE3_RESET, 1);
2469+ WREG32_SOC15(GC, 0, regCP_MEC_RS64_CNTL, tmp);
2470+
2471+ /* clear mec pipe reset */
2472+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE0_RESET, 0);
2473+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE1_RESET, 0);
2474+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE2_RESET, 0);
2475+ tmp = REG_SET_FIELD(tmp, CP_MEC_RS64_CNTL, MEC_PIPE3_RESET, 0);
2476+ WREG32_SOC15(GC, 0, regCP_MEC_RS64_CNTL, tmp);
26202477 }
26212478
26222479 static int gfx_v11_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c+25−193
@@ -126,6 +126,8 @@ MODULE_FIRMWARE("amdgpu/green_sardine_rlc.bin"); · 125 unmodified lines
126126 MODULE_FIRMWARE("amdgpu/aldebaran_mec.bin");
127127 MODULE_FIRMWARE("amdgpu/aldebaran_mec2.bin");
128128 MODULE_FIRMWARE("amdgpu/aldebaran_rlc.bin");
129+MODULE_FIRMWARE("amdgpu/aldebaran_sjt_mec.bin");
130+MODULE_FIRMWARE("amdgpu/aldebaran_sjt_mec2.bin");
129131
130132 #define mmTCP_CHAN_STEER_0_ARCT 0x0b03
131133 #define mmTCP_CHAN_STEER_0_ARCT_BASE_IDX 0
@@ -1089,27 +1091,6 @@ static void gfx_v9_0_free_microcode(struct amdgpu_device *adev) · 957 unmodified lines
10891091 kfree(adev->gfx.rlc.register_list_format);
10901092 }
10911093
1092−static void gfx_v9_0_init_rlc_ext_microcode(struct amdgpu_device *adev)
1093−{
1094− const struct rlc_firmware_header_v2_1 *rlc_hdr;
1095−
1096− rlc_hdr = (const struct rlc_firmware_header_v2_1 *)adev->gfx.rlc_fw->data;
1097− adev->gfx.rlc_srlc_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_ucode_ver);
1098− adev->gfx.rlc_srlc_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_feature_ver);
1099− adev->gfx.rlc.save_restore_list_cntl_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_cntl_size_bytes);
1100− adev->gfx.rlc.save_restore_list_cntl = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_cntl_offset_bytes);
1101− adev->gfx.rlc_srlg_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_ucode_ver);
1102− adev->gfx.rlc_srlg_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_feature_ver);
1103− adev->gfx.rlc.save_restore_list_gpm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_gpm_size_bytes);
1104− adev->gfx.rlc.save_restore_list_gpm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_gpm_offset_bytes);
1105− adev->gfx.rlc_srls_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_ucode_ver);
1106− adev->gfx.rlc_srls_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_feature_ver);
1107− adev->gfx.rlc.save_restore_list_srm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_srm_size_bytes);
1108− adev->gfx.rlc.save_restore_list_srm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_srm_offset_bytes);
1109− adev->gfx.rlc.reg_list_format_direct_reg_list_length =
1110− le32_to_cpu(rlc_hdr->reg_list_format_direct_reg_list_length);
1111−}
1112−
11131094 static void gfx_v9_0_check_fw_write_wait(struct amdgpu_device *adev)
11141095 {
11151096 adev->gfx.me_fw_write_wait = false;
@@ -1271,9 +1252,6 @@ static int gfx_v9_0_init_cp_gfx_microcode(struct amdgpu_device *adev, · 155 unmodified lines
12711252 {
12721253 char fw_name[30];
12731254 int err;
1274− struct amdgpu_firmware_info *info = NULL;
1275− const struct common_firmware_header *header = NULL;
1276− const struct gfx_firmware_header_v1_0 *cp_hdr;
12771255
12781256 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp.bin", chip_name);
12791257 err = request_firmware(&adev->gfx.pfp_fw, fw_name, adev->dev);
@@ -1282,9 +1260,7 @@ static int gfx_v9_0_init_cp_gfx_microcode(struct amdgpu_device *adev, · 2 unmodified lines
12821260 err = amdgpu_ucode_validate(adev->gfx.pfp_fw);
12831261 if (err)
12841262 goto out;
1285− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data;
1286− adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
1287− adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
1263+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_PFP);
12881264
12891265 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me.bin", chip_name);
12901266 err = request_firmware(&adev->gfx.me_fw, fw_name, adev->dev);
@@ -1293,9 +1269,7 @@ static int gfx_v9_0_init_cp_gfx_microcode(struct amdgpu_device *adev, · 2 unmodified lines
12931269 err = amdgpu_ucode_validate(adev->gfx.me_fw);
12941270 if (err)
12951271 goto out;
1296− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
1297− adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
1298− adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
1272+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_ME);
12991273
13001274 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin", chip_name);
13011275 err = request_firmware(&adev->gfx.ce_fw, fw_name, adev->dev);
@@ -1304,37 +1278,12 @@ static int gfx_v9_0_init_cp_gfx_microcode(struct amdgpu_device *adev, · 2 unmodified lines
13041278 err = amdgpu_ucode_validate(adev->gfx.ce_fw);
13051279 if (err)
13061280 goto out;
1307− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data;
1308− adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
1309− adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
1310−
1311− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1312− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_PFP];
1313− info->ucode_id = AMDGPU_UCODE_ID_CP_PFP;
1314− info->fw = adev->gfx.pfp_fw;
1315− header = (const struct common_firmware_header *)info->fw->data;
1316− adev->firmware.fw_size +=
1317− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
1318−
1319− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_ME];
1320− info->ucode_id = AMDGPU_UCODE_ID_CP_ME;
1321− info->fw = adev->gfx.me_fw;
1322− header = (const struct common_firmware_header *)info->fw->data;
1323− adev->firmware.fw_size +=
1324− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
1325−
1326− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_CE];
1327− info->ucode_id = AMDGPU_UCODE_ID_CP_CE;
1328− info->fw = adev->gfx.ce_fw;
1329− header = (const struct common_firmware_header *)info->fw->data;
1330− adev->firmware.fw_size +=
1331− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
1332− }
1281+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_CE);
13331282
13341283 out:
13351284 if (err) {
13361285 dev_err(adev->dev,
1337− "gfx9: Failed to load firmware \"%s\"\n",
1286+ "gfx9: Failed to init firmware \"%s\"\n",
13381287 fw_name);
13391288 release_firmware(adev->gfx.pfp_fw);
13401289 adev->gfx.pfp_fw = NULL;
@@ -1351,11 +1300,7 @@ static int gfx_v9_0_init_rlc_microcode(struct amdgpu_device *adev, · 10 unmodified lines
13511300 {
13521301 char fw_name[30];
13531302 int err;
1354− struct amdgpu_firmware_info *info = NULL;
1355− const struct common_firmware_header *header = NULL;
13561303 const struct rlc_firmware_header_v2_0 *rlc_hdr;
1357− unsigned int *tmp = NULL;
1358− unsigned int i = 0;
13591304 uint16_t version_major;
13601305 uint16_t version_minor;
13611306 uint32_t smu_version;
@@ -1384,92 +1329,17 @@ static int gfx_v9_0_init_rlc_microcode(struct amdgpu_device *adev, · 22 unmodified lines
13841329 if (err)
13851330 goto out;
13861331 err = amdgpu_ucode_validate(adev->gfx.rlc_fw);
1332+ if (err)
1333+ goto out;
13871334 rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;
13881335
13891336 version_major = le16_to_cpu(rlc_hdr->header.header_version_major);
13901337 version_minor = le16_to_cpu(rlc_hdr->header.header_version_minor);
1391− if (version_major == 2 && version_minor == 1)
1392− adev->gfx.rlc.is_rlc_v2_1 = true;
1393−
1394− adev->gfx.rlc_fw_version = le32_to_cpu(rlc_hdr->header.ucode_version);
1395− adev->gfx.rlc_feature_version = le32_to_cpu(rlc_hdr->ucode_feature_version);
1396− adev->gfx.rlc.save_and_restore_offset =
1397− le32_to_cpu(rlc_hdr->save_and_restore_offset);
1398− adev->gfx.rlc.clear_state_descriptor_offset =
1399− le32_to_cpu(rlc_hdr->clear_state_descriptor_offset);
1400− adev->gfx.rlc.avail_scratch_ram_locations =
1401− le32_to_cpu(rlc_hdr->avail_scratch_ram_locations);
1402− adev->gfx.rlc.reg_restore_list_size =
1403− le32_to_cpu(rlc_hdr->reg_restore_list_size);
1404− adev->gfx.rlc.reg_list_format_start =
1405− le32_to_cpu(rlc_hdr->reg_list_format_start);
1406− adev->gfx.rlc.reg_list_format_separate_start =
1407− le32_to_cpu(rlc_hdr->reg_list_format_separate_start);
1408− adev->gfx.rlc.starting_offsets_start =
1409− le32_to_cpu(rlc_hdr->starting_offsets_start);
1410− adev->gfx.rlc.reg_list_format_size_bytes =
1411− le32_to_cpu(rlc_hdr->reg_list_format_size_bytes);
1412− adev->gfx.rlc.reg_list_size_bytes =
1413− le32_to_cpu(rlc_hdr->reg_list_size_bytes);
1414− adev->gfx.rlc.register_list_format =
1415− kmalloc(adev->gfx.rlc.reg_list_format_size_bytes +
1416− adev->gfx.rlc.reg_list_size_bytes, GFP_KERNEL);
1417− if (!adev->gfx.rlc.register_list_format) {
1418− err = -ENOMEM;
1419− goto out;
1420− }
1421−
1422− tmp = (unsigned int *)((uintptr_t)rlc_hdr +
1423− le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes));
1424− for (i = 0 ; i < (adev->gfx.rlc.reg_list_format_size_bytes >> 2); i++)
1425− adev->gfx.rlc.register_list_format[i] = le32_to_cpu(tmp[i]);
1426−
1427− adev->gfx.rlc.register_restore = adev->gfx.rlc.register_list_format + i;
1428−
1429− tmp = (unsigned int *)((uintptr_t)rlc_hdr +
1430− le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes));
1431− for (i = 0 ; i < (adev->gfx.rlc.reg_list_size_bytes >> 2); i++)
1432− adev->gfx.rlc.register_restore[i] = le32_to_cpu(tmp[i]);
1433−
1434− if (adev->gfx.rlc.is_rlc_v2_1)
1435− gfx_v9_0_init_rlc_ext_microcode(adev);
1436−
1437− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1438− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_G];
1439− info->ucode_id = AMDGPU_UCODE_ID_RLC_G;
1440− info->fw = adev->gfx.rlc_fw;
1441− header = (const struct common_firmware_header *)info->fw->data;
1442− adev->firmware.fw_size +=
1443− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
1444−
1445− if (adev->gfx.rlc.is_rlc_v2_1 &&
1446− adev->gfx.rlc.save_restore_list_cntl_size_bytes &&
1447− adev->gfx.rlc.save_restore_list_gpm_size_bytes &&
1448− adev->gfx.rlc.save_restore_list_srm_size_bytes) {
1449− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL];
1450− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL;
1451− info->fw = adev->gfx.rlc_fw;
1452− adev->firmware.fw_size +=
1453− ALIGN(adev->gfx.rlc.save_restore_list_cntl_size_bytes, PAGE_SIZE);
1454−
1455− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM];
1456− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM;
1457− info->fw = adev->gfx.rlc_fw;
1458− adev->firmware.fw_size +=
1459− ALIGN(adev->gfx.rlc.save_restore_list_gpm_size_bytes, PAGE_SIZE);
1460−
1461− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM];
1462− info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM;
1463− info->fw = adev->gfx.rlc_fw;
1464− adev->firmware.fw_size +=
1465− ALIGN(adev->gfx.rlc.save_restore_list_srm_size_bytes, PAGE_SIZE);
1466− }
1467− }
1468−
1338+ err = amdgpu_gfx_rlc_init_microcode(adev, version_major, version_minor);
14691339 out:
14701340 if (err) {
14711341 dev_err(adev->dev,
1472− "gfx9: Failed to load firmware \"%s\"\n",
1342+ "gfx9: Failed to init firmware \"%s\"\n",
14731343 fw_name);
14741344 release_firmware(adev->gfx.rlc_fw);
14751345 adev->gfx.rlc_fw = NULL;
@@ -1492,35 +1362,34 @@ static int gfx_v9_0_init_cp_compute_microcode(struct amdgpu_device *adev, · 16 unmodified lines
14921362 {
14931363 char fw_name[30];
14941364 int err;
1495− struct amdgpu_firmware_info *info = NULL;
1496− const struct common_firmware_header *header = NULL;
1497− const struct gfx_firmware_header_v1_0 *cp_hdr;
14981365
1499− snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name);
1366+ if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_ALDEBARAN))
1367+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sjt_mec.bin", chip_name);
1368+ else
1369+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name);
1370+
15001371 err = request_firmware(&adev->gfx.mec_fw, fw_name, adev->dev);
15011372 if (err)
15021373 goto out;
15031374 err = amdgpu_ucode_validate(adev->gfx.mec_fw);
15041375 if (err)
15051376 goto out;
1506− cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
1507− adev->gfx.mec_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
1508− adev->gfx.mec_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
1509−
1377+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1);
1378+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1_JT);
15101379
15111380 if (gfx_v9_0_load_mec2_fw_bin_support(adev)) {
1512− snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec2.bin", chip_name);
1381+ if (amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_ALDEBARAN))
1382+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sjt_mec2.bin", chip_name);
1383+ else
1384+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec2.bin", chip_name);
1385+
15131386 err = request_firmware(&adev->gfx.mec2_fw, fw_name, adev->dev);
15141387 if (!err) {
15151388 err = amdgpu_ucode_validate(adev->gfx.mec2_fw);
15161389 if (err)
15171390 goto out;
1518− cp_hdr = (const struct gfx_firmware_header_v1_0 *)
1519− adev->gfx.mec2_fw->data;
1520− adev->gfx.mec2_fw_version =
1521− le32_to_cpu(cp_hdr->header.ucode_version);
1522− adev->gfx.mec2_feature_version =
1523− le32_to_cpu(cp_hdr->ucode_feature_version);
1391+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC2);
1392+ amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC2_JT);
15241393 } else {
15251394 err = 0;
15261395 adev->gfx.mec2_fw = NULL;
@@ -1530,49 +1399,12 @@ static int gfx_v9_0_init_cp_compute_microcode(struct amdgpu_device *adev, · 3 unmodified lines
15301399 adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version;
15311400 }
15321401
1533− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1534− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1];
1535− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1;
1536− info->fw = adev->gfx.mec_fw;
1537− header = (const struct common_firmware_header *)info->fw->data;
1538− cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
1539− adev->firmware.fw_size +=
1540− ALIGN(le32_to_cpu(header->ucode_size_bytes) - le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
1541−
1542− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1_JT];
1543− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1_JT;
1544− info->fw = adev->gfx.mec_fw;
1545− adev->firmware.fw_size +=
1546− ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
1547−
1548− if (adev->gfx.mec2_fw) {
1549− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2];
1550− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
1551− info->fw = adev->gfx.mec2_fw;
1552− header = (const struct common_firmware_header *)info->fw->data;
1553− cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
1554− adev->firmware.fw_size +=
1555− ALIGN(le32_to_cpu(header->ucode_size_bytes) - le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
1556−
1557− /* TODO: Determine if MEC2 JT FW loading can be removed
1558− for all GFX V9 asic and above */
1559− if (gfx_v9_0_load_mec2_fw_bin_support(adev)) {
1560− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2_JT];
1561− info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2_JT;
1562− info->fw = adev->gfx.mec2_fw;
1563− adev->firmware.fw_size +=
1564− ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4,
1565− PAGE_SIZE);
1566− }
1567− }
1568− }
1569−
15701402 out:
15711403 gfx_v9_0_check_if_need_gfxoff(adev);
15721404 gfx_v9_0_check_fw_write_wait(adev);
15731405 if (err) {
15741406 dev_err(adev->dev,
1575− "gfx9: Failed to load firmware \"%s\"\n",
1407+ "gfx9: Failed to init firmware \"%s\"\n",
15761408 fw_name);
15771409 release_firmware(adev->gfx.mec_fw);
15781410 adev->gfx.mec_fw = NULL;
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c+108−0
@@ -576,6 +576,111 @@ static void gfxhub_v2_1_utcl2_harvest(struct amdgpu_device *adev) · 575 unmodified lines
576576 }
577577 }
578578
579+static void gfxhub_v2_1_save_regs(struct amdgpu_device *adev)
580+{
581+ int i;
582+ adev->gmc.VM_L2_CNTL = RREG32_SOC15(GC, 0, mmGCVM_L2_CNTL);
583+ adev->gmc.VM_L2_CNTL2 = RREG32_SOC15(GC, 0, mmGCVM_L2_CNTL2);
584+ adev->gmc.VM_DUMMY_PAGE_FAULT_CNTL = RREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_CNTL);
585+ adev->gmc.VM_DUMMY_PAGE_FAULT_ADDR_LO32 = RREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_ADDR_LO32);
586+ adev->gmc.VM_DUMMY_PAGE_FAULT_ADDR_HI32 = RREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_ADDR_HI32);
587+ adev->gmc.VM_L2_PROTECTION_FAULT_CNTL = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_CNTL);
588+ adev->gmc.VM_L2_PROTECTION_FAULT_CNTL2 = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_CNTL2);
589+ adev->gmc.VM_L2_PROTECTION_FAULT_MM_CNTL3 = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_MM_CNTL3);
590+ adev->gmc.VM_L2_PROTECTION_FAULT_MM_CNTL4 = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_MM_CNTL4);
591+ adev->gmc.VM_L2_PROTECTION_FAULT_ADDR_LO32 = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_ADDR_LO32);
592+ adev->gmc.VM_L2_PROTECTION_FAULT_ADDR_HI32 = RREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_ADDR_HI32);
593+ adev->gmc.VM_DEBUG = RREG32_SOC15(GC, 0, mmGCVM_DEBUG);
594+ adev->gmc.VM_L2_MM_GROUP_RT_CLASSES = RREG32_SOC15(GC, 0, mmGCVM_L2_MM_GROUP_RT_CLASSES);
595+ adev->gmc.VM_L2_BANK_SELECT_RESERVED_CID = RREG32_SOC15(GC, 0, mmGCVM_L2_BANK_SELECT_RESERVED_CID);
596+ adev->gmc.VM_L2_BANK_SELECT_RESERVED_CID2 = RREG32_SOC15(GC, 0, mmGCVM_L2_BANK_SELECT_RESERVED_CID2);
597+ adev->gmc.VM_L2_CACHE_PARITY_CNTL = RREG32_SOC15(GC, 0, mmGCVM_L2_CACHE_PARITY_CNTL);
598+ adev->gmc.VM_L2_IH_LOG_CNTL = RREG32_SOC15(GC, 0, mmGCVM_L2_IH_LOG_CNTL);
599+
600+ for (i = 0; i <= 15; i++) {
601+ adev->gmc.VM_CONTEXT_CNTL[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_CNTL, i);
602+ adev->gmc.VM_CONTEXT_PAGE_TABLE_BASE_ADDR_LO32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, i * 2);
603+ adev->gmc.VM_CONTEXT_PAGE_TABLE_BASE_ADDR_HI32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, i * 2);
604+ adev->gmc.VM_CONTEXT_PAGE_TABLE_START_ADDR_LO32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32, i * 2);
605+ adev->gmc.VM_CONTEXT_PAGE_TABLE_START_ADDR_HI32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32, i * 2);
606+ adev->gmc.VM_CONTEXT_PAGE_TABLE_END_ADDR_LO32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32, i * 2);
607+ adev->gmc.VM_CONTEXT_PAGE_TABLE_END_ADDR_HI32[i] = RREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32, i * 2);
608+ }
609+
610+ adev->gmc.MC_VM_MX_L1_TLB_CNTL = RREG32_SOC15(GC, 0, mmGCMC_VM_MX_L1_TLB_CNTL);
611+}
612+
613+static void gfxhub_v2_1_restore_regs(struct amdgpu_device *adev)
614+{
615+ int i;
616+ WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL, adev->gmc.VM_L2_CNTL);
617+ WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL2, adev->gmc.VM_L2_CNTL2);
618+ WREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_CNTL, adev->gmc.VM_DUMMY_PAGE_FAULT_CNTL);
619+ WREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_ADDR_LO32, adev->gmc.VM_DUMMY_PAGE_FAULT_ADDR_LO32);
620+ WREG32_SOC15(GC, 0, mmGCVM_DUMMY_PAGE_FAULT_ADDR_HI32, adev->gmc.VM_DUMMY_PAGE_FAULT_ADDR_HI32);
621+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_CNTL, adev->gmc.VM_L2_PROTECTION_FAULT_CNTL);
622+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_CNTL2, adev->gmc.VM_L2_PROTECTION_FAULT_CNTL2);
623+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_MM_CNTL3, adev->gmc.VM_L2_PROTECTION_FAULT_MM_CNTL3);
624+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_MM_CNTL4, adev->gmc.VM_L2_PROTECTION_FAULT_MM_CNTL4);
625+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_ADDR_LO32, adev->gmc.VM_L2_PROTECTION_FAULT_ADDR_LO32);
626+ WREG32_SOC15(GC, 0, mmGCVM_L2_PROTECTION_FAULT_ADDR_HI32, adev->gmc.VM_L2_PROTECTION_FAULT_ADDR_HI32);
627+ WREG32_SOC15(GC, 0, mmGCVM_DEBUG, adev->gmc.VM_DEBUG);
628+ WREG32_SOC15(GC, 0, mmGCVM_L2_MM_GROUP_RT_CLASSES, adev->gmc.VM_L2_MM_GROUP_RT_CLASSES);
629+ WREG32_SOC15(GC, 0, mmGCVM_L2_BANK_SELECT_RESERVED_CID, adev->gmc.VM_L2_BANK_SELECT_RESERVED_CID);
630+ WREG32_SOC15(GC, 0, mmGCVM_L2_BANK_SELECT_RESERVED_CID2, adev->gmc.VM_L2_BANK_SELECT_RESERVED_CID2);
631+ WREG32_SOC15(GC, 0, mmGCVM_L2_CACHE_PARITY_CNTL, adev->gmc.VM_L2_CACHE_PARITY_CNTL);
632+ WREG32_SOC15(GC, 0, mmGCVM_L2_IH_LOG_CNTL, adev->gmc.VM_L2_IH_LOG_CNTL);
633+
634+ for (i = 0; i <= 15; i++) {
635+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_CNTL, i, adev->gmc.VM_CONTEXT_CNTL[i]);
636+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_BASE_ADDR_LO32[i]);
637+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_BASE_ADDR_HI32[i]);
638+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_START_ADDR_LO32[i]);
639+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_START_ADDR_HI32[i]);
640+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_END_ADDR_LO32[i]);
641+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32, i * 2, adev->gmc.VM_CONTEXT_PAGE_TABLE_END_ADDR_HI32[i]);
642+ }
643+
644+ WREG32_SOC15(GC, 0, mmGCMC_VM_FB_LOCATION_BASE, adev->gmc.vram_start >> 24);
645+ WREG32_SOC15(GC, 0, mmGCMC_VM_FB_LOCATION_TOP, adev->gmc.vram_end >> 24);
646+ WREG32_SOC15(GC, 0, mmGCMC_VM_MX_L1_TLB_CNTL, adev->gmc.MC_VM_MX_L1_TLB_CNTL);
647+}
648+
649+static void gfxhub_v2_1_halt(struct amdgpu_device *adev)
650+{
651+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
652+ int i;
653+ uint32_t tmp;
654+ int time = 1000;
655+
656+ gfxhub_v2_1_set_fault_enable_default(adev, false);
657+
658+ for (i = 0; i <= 14; i++) {
659+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32,
660+ i * hub->ctx_addr_distance, ~0);
661+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32,
662+ i * hub->ctx_addr_distance, ~0);
663+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_LO32,
664+ i * hub->ctx_addr_distance,
665+ 0);
666+ WREG32_SOC15_OFFSET(GC, 0, mmGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_HI32,
667+ i * hub->ctx_addr_distance,
668+ 0);
669+ }
670+ tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS2);
671+ while ((tmp & (GRBM_STATUS2__EA_BUSY_MASK |
672+ GRBM_STATUS2__EA_LINK_BUSY_MASK)) != 0 &&
673+ time) {
674+ udelay(100);
675+ time--;
676+ tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS2);
677+ }
678+
679+ if (!time) {
680+ DRM_WARN("failed to wait for GRBM(EA) idle\n");
681+ }
682+}
683+
579684 const struct amdgpu_gfxhub_funcs gfxhub_v2_1_funcs = {
580685 .get_fb_location = gfxhub_v2_1_get_fb_location,
581686 .get_mc_fb_offset = gfxhub_v2_1_get_mc_fb_offset,
@@ -586,4 +691,7 @@ const struct amdgpu_gfxhub_funcs gfxhub_v2_1_funcs = { · 4 unmodified lines
586691 .init = gfxhub_v2_1_init,
587692 .get_xgmi_info = gfxhub_v2_1_get_xgmi_info,
588693 .utcl2_harvest = gfxhub_v2_1_utcl2_harvest,
694+ .mode2_save_regs = gfxhub_v2_1_save_regs,
695+ .mode2_restore_regs = gfxhub_v2_1_restore_regs,
696+ .halt = gfxhub_v2_1_halt,
589697 };
drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.c+511−0
@@ -0,0 +1,511 @@
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+ */
23+
24+#include "amdgpu.h"
25+#include "gfxhub_v3_0_3.h"
26+
27+#include "gc/gc_11_0_3_offset.h"
28+#include "gc/gc_11_0_3_sh_mask.h"
29+#include "navi10_enum.h"
30+#include "soc15_common.h"
31+
32+#define regGCVM_L2_CNTL3_DEFAULT 0x80100007
33+#define regGCVM_L2_CNTL4_DEFAULT 0x000000c1
34+#define regGCVM_L2_CNTL5_DEFAULT 0x00003fe0
35+
36+static const char *gfxhub_client_ids[] = {
37+ "CB/DB",
38+ "Reserved",
39+ "GE1",
40+ "GE2",
41+ "CPF",
42+ "CPC",
43+ "CPG",
44+ "RLC",
45+ "TCP",
46+ "SQC (inst)",
47+ "SQC (data)",
48+ "SQG",
49+ "Reserved",
50+ "SDMA0",
51+ "SDMA1",
52+ "GCR",
53+ "SDMA2",
54+ "SDMA3",
55+};
56+
57+static uint32_t gfxhub_v3_0_3_get_invalidate_req(unsigned int vmid,
58+ uint32_t flush_type)
59+{
60+ u32 req = 0;
61+
62+ /* invalidate using legacy mode on vmid*/
63+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ,
64+ PER_VMID_INVALIDATE_REQ, 1 << vmid);
65+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, FLUSH_TYPE, flush_type);
66+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, INVALIDATE_L2_PTES, 1);
67+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, INVALIDATE_L2_PDE0, 1);
68+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, INVALIDATE_L2_PDE1, 1);
69+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, INVALIDATE_L2_PDE2, 1);
70+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ, INVALIDATE_L1_PTES, 1);
71+ req = REG_SET_FIELD(req, GCVM_INVALIDATE_ENG0_REQ,
72+ CLEAR_PROTECTION_FAULT_STATUS_ADDR, 0);
73+
74+ return req;
75+}
76+
77+static void
78+gfxhub_v3_0_3_print_l2_protection_fault_status(struct amdgpu_device *adev,
79+ uint32_t status)
80+{
81+ u32 cid = REG_GET_FIELD(status,
82+ GCVM_L2_PROTECTION_FAULT_STATUS, CID);
83+
84+ dev_err(adev->dev,
85+ "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
86+ status);
87+ dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n",
88+ cid >= ARRAY_SIZE(gfxhub_client_ids) ? "unknown" : gfxhub_client_ids[cid],
89+ cid);
90+ dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",
91+ REG_GET_FIELD(status,
92+ GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));
93+ dev_err(adev->dev, "\t WALKER_ERROR: 0x%lx\n",
94+ REG_GET_FIELD(status,
95+ GCVM_L2_PROTECTION_FAULT_STATUS, WALKER_ERROR));
96+ dev_err(adev->dev, "\t PERMISSION_FAULTS: 0x%lx\n",
97+ REG_GET_FIELD(status,
98+ GCVM_L2_PROTECTION_FAULT_STATUS, PERMISSION_FAULTS));
99+ dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n",
100+ REG_GET_FIELD(status,
101+ GCVM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR));
102+ dev_err(adev->dev, "\t RW: 0x%lx\n",
103+ REG_GET_FIELD(status,
104+ GCVM_L2_PROTECTION_FAULT_STATUS, RW));
105+}
106+
107+static u64 gfxhub_v3_0_3_get_fb_location(struct amdgpu_device *adev)
108+{
109+ u64 base = RREG32_SOC15(GC, 0, regGCMC_VM_FB_LOCATION_BASE);
110+
111+ base &= GCMC_VM_FB_LOCATION_BASE__FB_BASE_MASK;
112+ base <<= 24;
113+
114+ return base;
115+}
116+
117+static u64 gfxhub_v3_0_3_get_mc_fb_offset(struct amdgpu_device *adev)
118+{
119+ return (u64)RREG32_SOC15(GC, 0, regGCMC_VM_FB_OFFSET) << 24;
120+}
121+
122+static void gfxhub_v3_0_3_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
123+ uint64_t page_table_base)
124+{
125+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
126+
127+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32,
128+ hub->ctx_addr_distance * vmid,
129+ lower_32_bits(page_table_base));
130+
131+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32,
132+ hub->ctx_addr_distance * vmid,
133+ upper_32_bits(page_table_base));
134+}
135+
136+static void gfxhub_v3_0_3_init_gart_aperture_regs(struct amdgpu_device *adev)
137+{
138+ uint64_t pt_base = amdgpu_gmc_pd_addr(adev->gart.bo);
139+
140+ gfxhub_v3_0_3_setup_vm_pt_regs(adev, 0, pt_base);
141+
142+ WREG32_SOC15(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_LO32,
143+ (u32)(adev->gmc.gart_start >> 12));
144+ WREG32_SOC15(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_START_ADDR_HI32,
145+ (u32)(adev->gmc.gart_start >> 44));
146+
147+ WREG32_SOC15(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_LO32,
148+ (u32)(adev->gmc.gart_end >> 12));
149+ WREG32_SOC15(GC, 0, regGCVM_CONTEXT0_PAGE_TABLE_END_ADDR_HI32,
150+ (u32)(adev->gmc.gart_end >> 44));
151+}
152+
153+static void gfxhub_v3_0_3_init_system_aperture_regs(struct amdgpu_device *adev)
154+{
155+ uint64_t value;
156+
157+ /* Disable AGP. */
158+ WREG32_SOC15(GC, 0, regGCMC_VM_AGP_BASE, 0);
159+ WREG32_SOC15(GC, 0, regGCMC_VM_AGP_TOP, 0);
160+ WREG32_SOC15(GC, 0, regGCMC_VM_AGP_BOT, 0x00FFFFFF);
161+
162+ /* Program the system aperture low logical page number. */
163+ WREG32_SOC15(GC, 0, regGCMC_VM_SYSTEM_APERTURE_LOW_ADDR,
164+ adev->gmc.vram_start >> 18);
165+ WREG32_SOC15(GC, 0, regGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR,
166+ adev->gmc.vram_end >> 18);
167+
168+ /* Set default page address. */
169+ value = adev->vram_scratch.gpu_addr - adev->gmc.vram_start
170+ + adev->vm_manager.vram_base_offset;
171+ WREG32_SOC15(GC, 0, regGCMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_LSB,
172+ (u32)(value >> 12));
173+ WREG32_SOC15(GC, 0, regGCMC_VM_SYSTEM_APERTURE_DEFAULT_ADDR_MSB,
174+ (u32)(value >> 44));
175+
176+ /* Program "protection fault". */
177+ WREG32_SOC15(GC, 0, regGCVM_L2_PROTECTION_FAULT_DEFAULT_ADDR_LO32,
178+ (u32)(adev->dummy_page_addr >> 12));
179+ WREG32_SOC15(GC, 0, regGCVM_L2_PROTECTION_FAULT_DEFAULT_ADDR_HI32,
180+ (u32)((u64)adev->dummy_page_addr >> 44));
181+
182+ WREG32_FIELD15_PREREG(GC, 0, GCVM_L2_PROTECTION_FAULT_CNTL2,
183+ ACTIVE_PAGE_MIGRATION_PTE_READ_RETRY, 1);
184+}
185+
186+
187+static void gfxhub_v3_0_3_init_tlb_regs(struct amdgpu_device *adev)
188+{
189+ uint32_t tmp;
190+
191+ /* Setup TLB control */
192+ tmp = RREG32_SOC15(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL);
193+
194+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, ENABLE_L1_TLB, 1);
195+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, SYSTEM_ACCESS_MODE, 3);
196+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
197+ ENABLE_ADVANCED_DRIVER_MODEL, 1);
198+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
199+ SYSTEM_APERTURE_UNMAPPED_ACCESS, 0);
200+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, ECO_BITS, 0);
201+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
202+ MTYPE, MTYPE_UC); /* UC, uncached */
203+
204+ WREG32_SOC15(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL, tmp);
205+}
206+
207+static void gfxhub_v3_0_3_init_cache_regs(struct amdgpu_device *adev)
208+{
209+ uint32_t tmp;
210+
211+ /* These registers are not accessible to VF-SRIOV.
212+ * The PF will program them instead.
213+ */
214+ if (amdgpu_sriov_vf(adev))
215+ return;
216+
217+ /* Setup L2 cache */
218+ tmp = RREG32_SOC15(GC, 0, regGCVM_L2_CNTL);
219+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, ENABLE_L2_CACHE, 1);
220+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, ENABLE_L2_FRAGMENT_PROCESSING, 0);
221+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL,
222+ ENABLE_DEFAULT_PAGE_OUT_TO_SYSTEM_MEMORY, 1);
223+ /* XXX for emulation, Refer to closed source code.*/
224+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL,
225+ L2_PDE0_CACHE_TAG_GENERATION_MODE, 0);
226+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, PDE_FAULT_CLASSIFICATION, 0);
227+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, CONTEXT1_IDENTITY_ACCESS_MODE, 1);
228+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, IDENTITY_MODE_FRAGMENT_SIZE, 0);
229+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL, tmp);
230+
231+ tmp = RREG32_SOC15(GC, 0, regGCVM_L2_CNTL2);
232+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL2, INVALIDATE_ALL_L1_TLBS, 1);
233+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL2, INVALIDATE_L2_CACHE, 1);
234+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL2, tmp);
235+
236+ tmp = regGCVM_L2_CNTL3_DEFAULT;
237+ if (adev->gmc.translate_further) {
238+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL3, BANK_SELECT, 12);
239+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL3,
240+ L2_CACHE_BIGK_FRAGMENT_SIZE, 9);
241+ } else {
242+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL3, BANK_SELECT, 9);
243+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL3,
244+ L2_CACHE_BIGK_FRAGMENT_SIZE, 6);
245+ }
246+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL3, tmp);
247+
248+ tmp = regGCVM_L2_CNTL4_DEFAULT;
249+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL4, VMC_TAP_PDE_REQUEST_PHYSICAL, 0);
250+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL4, VMC_TAP_PTE_REQUEST_PHYSICAL, 0);
251+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL4, tmp);
252+
253+ tmp = regGCVM_L2_CNTL5_DEFAULT;
254+ tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
255+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL5, tmp);
256+}
257+
258+static void gfxhub_v3_0_3_enable_system_domain(struct amdgpu_device *adev)
259+{
260+ uint32_t tmp;
261+
262+ tmp = RREG32_SOC15(GC, 0, regGCVM_CONTEXT0_CNTL);
263+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT0_CNTL, ENABLE_CONTEXT, 1);
264+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT0_CNTL, PAGE_TABLE_DEPTH, 0);
265+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT0_CNTL,
266+ RETRY_PERMISSION_OR_INVALID_PAGE_FAULT, 0);
267+ WREG32_SOC15(GC, 0, regGCVM_CONTEXT0_CNTL, tmp);
268+}
269+
270+static void gfxhub_v3_0_3_disable_identity_aperture(struct amdgpu_device *adev)
271+{
272+ /* These registers are not accessible to VF-SRIOV.
273+ * The PF will program them instead.
274+ */
275+ if (amdgpu_sriov_vf(adev))
276+ return;
277+
278+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT1_IDENTITY_APERTURE_LOW_ADDR_LO32,
279+ 0xFFFFFFFF);
280+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT1_IDENTITY_APERTURE_LOW_ADDR_HI32,
281+ 0x0000000F);
282+
283+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT1_IDENTITY_APERTURE_HIGH_ADDR_LO32,
284+ 0);
285+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT1_IDENTITY_APERTURE_HIGH_ADDR_HI32,
286+ 0);
287+
288+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT_IDENTITY_PHYSICAL_OFFSET_LO32, 0);
289+ WREG32_SOC15(GC, 0, regGCVM_L2_CONTEXT_IDENTITY_PHYSICAL_OFFSET_HI32, 0);
290+
291+}
292+
293+static void gfxhub_v3_0_3_setup_vmid_config(struct amdgpu_device *adev)
294+{
295+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
296+ int i;
297+ uint32_t tmp;
298+
299+ for (i = 0; i <= 14; i++) {
300+ tmp = RREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_CNTL, i);
301+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL, ENABLE_CONTEXT, 1);
302+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL, PAGE_TABLE_DEPTH,
303+ adev->vm_manager.num_level);
304+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
305+ RANGE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
306+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
307+ DUMMY_PAGE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
308+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
309+ PDE0_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
310+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
311+ VALID_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
312+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
313+ READ_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
314+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
315+ WRITE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
316+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
317+ EXECUTE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
318+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
319+ PAGE_TABLE_BLOCK_SIZE,
320+ adev->vm_manager.block_size - 9);
321+ /* Send no-retry XNACK on fault to suppress VM fault storm. */
322+ tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
323+ RETRY_PERMISSION_OR_INVALID_PAGE_FAULT,
324+ !amdgpu_noretry);
325+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_CNTL,
326+ i * hub->ctx_distance, tmp);
327+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32,
328+ i * hub->ctx_addr_distance, 0);
329+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32,
330+ i * hub->ctx_addr_distance, 0);
331+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_LO32,
332+ i * hub->ctx_addr_distance,
333+ lower_32_bits(adev->vm_manager.max_pfn - 1));
334+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT1_PAGE_TABLE_END_ADDR_HI32,
335+ i * hub->ctx_addr_distance,
336+ upper_32_bits(adev->vm_manager.max_pfn - 1));
337+ }
338+
339+ hub->vm_cntx_cntl = tmp;
340+}
341+
342+static void gfxhub_v3_0_3_program_invalidation(struct amdgpu_device *adev)
343+{
344+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
345+ unsigned i;
346+
347+ for (i = 0 ; i < 18; ++i) {
348+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_INVALIDATE_ENG0_ADDR_RANGE_LO32,
349+ i * hub->eng_addr_distance, 0xffffffff);
350+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_INVALIDATE_ENG0_ADDR_RANGE_HI32,
351+ i * hub->eng_addr_distance, 0x1f);
352+ }
353+}
354+
355+static int gfxhub_v3_0_3_gart_enable(struct amdgpu_device *adev)
356+{
357+ if (amdgpu_sriov_vf(adev)) {
358+ /*
359+ * GCMC_VM_FB_LOCATION_BASE/TOP is NULL for VF, becuase they are
360+ * VF copy registers so vbios post doesn't program them, for
361+ * SRIOV driver need to program them
362+ */
363+ WREG32_SOC15(GC, 0, regGCMC_VM_FB_LOCATION_BASE,
364+ adev->gmc.vram_start >> 24);
365+ WREG32_SOC15(GC, 0, regGCMC_VM_FB_LOCATION_TOP,
366+ adev->gmc.vram_end >> 24);
367+ }
368+
369+ /* GART Enable. */
370+ gfxhub_v3_0_3_init_gart_aperture_regs(adev);
371+ gfxhub_v3_0_3_init_system_aperture_regs(adev);
372+ gfxhub_v3_0_3_init_tlb_regs(adev);
373+ gfxhub_v3_0_3_init_cache_regs(adev);
374+
375+ gfxhub_v3_0_3_enable_system_domain(adev);
376+ gfxhub_v3_0_3_disable_identity_aperture(adev);
377+ gfxhub_v3_0_3_setup_vmid_config(adev);
378+ gfxhub_v3_0_3_program_invalidation(adev);
379+
380+ return 0;
381+}
382+
383+static void gfxhub_v3_0_3_gart_disable(struct amdgpu_device *adev)
384+{
385+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
386+ u32 tmp;
387+ u32 i;
388+
389+ /* Disable all tables */
390+ for (i = 0; i < 16; i++)
391+ WREG32_SOC15_OFFSET(GC, 0, regGCVM_CONTEXT0_CNTL,
392+ i * hub->ctx_distance, 0);
393+
394+ /* Setup TLB control */
395+ tmp = RREG32_SOC15(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL);
396+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL, ENABLE_L1_TLB, 0);
397+ tmp = REG_SET_FIELD(tmp, GCMC_VM_MX_L1_TLB_CNTL,
398+ ENABLE_ADVANCED_DRIVER_MODEL, 0);
399+ WREG32_SOC15(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL, tmp);
400+
401+ /* Setup L2 cache */
402+ WREG32_FIELD15_PREREG(GC, 0, GCVM_L2_CNTL, ENABLE_L2_CACHE, 0);
403+ WREG32_SOC15(GC, 0, regGCVM_L2_CNTL3, 0);
404+}
405+
406+/**
407+ * gfxhub_v3_0_3_set_fault_enable_default - update GART/VM fault handling
408+ *
409+ * @adev: amdgpu_device pointer
410+ * @value: true redirects VM faults to the default page
411+ */
412+static void gfxhub_v3_0_3_set_fault_enable_default(struct amdgpu_device *adev,
413+ bool value)
414+{
415+ u32 tmp;
416+
417+ /* These registers are not accessible to VF-SRIOV.
418+ * The PF will program them instead.
419+ */
420+ if (amdgpu_sriov_vf(adev))
421+ return;
422+
423+ tmp = RREG32_SOC15(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL);
424+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
425+ RANGE_PROTECTION_FAULT_ENABLE_DEFAULT, value);
426+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
427+ PDE0_PROTECTION_FAULT_ENABLE_DEFAULT, value);
428+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
429+ PDE1_PROTECTION_FAULT_ENABLE_DEFAULT, value);
430+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
431+ PDE2_PROTECTION_FAULT_ENABLE_DEFAULT, value);
432+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
433+ TRANSLATE_FURTHER_PROTECTION_FAULT_ENABLE_DEFAULT,
434+ value);
435+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
436+ NACK_PROTECTION_FAULT_ENABLE_DEFAULT, value);
437+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
438+ DUMMY_PAGE_PROTECTION_FAULT_ENABLE_DEFAULT, value);
439+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
440+ VALID_PROTECTION_FAULT_ENABLE_DEFAULT, value);
441+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
442+ READ_PROTECTION_FAULT_ENABLE_DEFAULT, value);
443+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
444+ WRITE_PROTECTION_FAULT_ENABLE_DEFAULT, value);
445+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
446+ EXECUTE_PROTECTION_FAULT_ENABLE_DEFAULT, value);
447+ if (!value) {
448+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
449+ CRASH_ON_NO_RETRY_FAULT, 1);
450+ tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL,
451+ CRASH_ON_RETRY_FAULT, 1);
452+ }
453+ WREG32_SOC15(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL, tmp);
454+}
455+
456+static const struct amdgpu_vmhub_funcs gfxhub_v3_0_3_vmhub_funcs = {
457+ .print_l2_protection_fault_status = gfxhub_v3_0_3_print_l2_protection_fault_status,
458+ .get_invalidate_req = gfxhub_v3_0_3_get_invalidate_req,
459+};
460+
461+static void gfxhub_v3_0_3_init(struct amdgpu_device *adev)
462+{
463+ struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
464+
465+ hub->ctx0_ptb_addr_lo32 =
466+ SOC15_REG_OFFSET(GC, 0,
467+ regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32);
468+ hub->ctx0_ptb_addr_hi32 =
469+ SOC15_REG_OFFSET(GC, 0,
470+ regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32);
471+ hub->vm_inv_eng0_sem =
472+ SOC15_REG_OFFSET(GC, 0, regGCVM_INVALIDATE_ENG0_SEM);
473+ hub->vm_inv_eng0_req =
474+ SOC15_REG_OFFSET(GC, 0, regGCVM_INVALIDATE_ENG0_REQ);
475+ hub->vm_inv_eng0_ack =
476+ SOC15_REG_OFFSET(GC, 0, regGCVM_INVALIDATE_ENG0_ACK);
477+ hub->vm_context0_cntl =
478+ SOC15_REG_OFFSET(GC, 0, regGCVM_CONTEXT0_CNTL);
479+ hub->vm_l2_pro_fault_status =
480+ SOC15_REG_OFFSET(GC, 0, regGCVM_L2_PROTECTION_FAULT_STATUS);
481+ hub->vm_l2_pro_fault_cntl =
482+ SOC15_REG_OFFSET(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL);
483+
484+ hub->ctx_distance = regGCVM_CONTEXT1_CNTL - regGCVM_CONTEXT0_CNTL;
485+ hub->ctx_addr_distance = regGCVM_CONTEXT1_PAGE_TABLE_BASE_ADDR_LO32 -
486+ regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32;
487+ hub->eng_distance = regGCVM_INVALIDATE_ENG1_REQ -
488+ regGCVM_INVALIDATE_ENG0_REQ;
489+ hub->eng_addr_distance = regGCVM_INVALIDATE_ENG1_ADDR_RANGE_LO32 -
490+ regGCVM_INVALIDATE_ENG0_ADDR_RANGE_LO32;
491+
492+ hub->vm_cntx_cntl_vm_fault = GCVM_CONTEXT1_CNTL__RANGE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
493+ GCVM_CONTEXT1_CNTL__DUMMY_PAGE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
494+ GCVM_CONTEXT1_CNTL__PDE0_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
495+ GCVM_CONTEXT1_CNTL__VALID_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
496+ GCVM_CONTEXT1_CNTL__READ_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
497+ GCVM_CONTEXT1_CNTL__WRITE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK |
498+ GCVM_CONTEXT1_CNTL__EXECUTE_PROTECTION_FAULT_ENABLE_INTERRUPT_MASK;
499+
500+ hub->vmhub_funcs = &gfxhub_v3_0_3_vmhub_funcs;
501+}
502+
503+const struct amdgpu_gfxhub_funcs gfxhub_v3_0_3_funcs = {
504+ .get_fb_location = gfxhub_v3_0_3_get_fb_location,
505+ .get_mc_fb_offset = gfxhub_v3_0_3_get_mc_fb_offset,
506+ .setup_vm_pt_regs = gfxhub_v3_0_3_setup_vm_pt_regs,
507+ .gart_enable = gfxhub_v3_0_3_gart_enable,
508+ .gart_disable = gfxhub_v3_0_3_gart_disable,
509+ .set_fault_enable_default = gfxhub_v3_0_3_set_fault_enable_default,
510+ .init = gfxhub_v3_0_3_init,
511+};
drivers/gpu/drm/amd/amdgpu/gfxhub_v3_0_3.h+29−0
@@ -0,0 +1,29 @@
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+ */
23+
24+#ifndef __GFXHUB_V3_0_3_H__
25+#define __GFXHUB_V3_0_3_H__
26+
27+extern const struct amdgpu_gfxhub_funcs gfxhub_v3_0_3_funcs;
28+
29+#endif
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c+16−3
@@ -39,6 +39,7 @@ · 38 unmodified lines
3939 #include "soc15_common.h"
4040 #include "nbio_v4_3.h"
4141 #include "gfxhub_v3_0.h"
42+#include "gfxhub_v3_0_3.h"
4243 #include "mmhub_v3_0.h"
4344 #include "mmhub_v3_0_1.h"
4445 #include "mmhub_v3_0_2.h"
@@ -233,7 +234,8 @@ static void gmc_v11_0_flush_vm_hub(struct amdgpu_device *adev, uint32_t vmid, · 188 unmodified lines
233234
234235 /* Issue additional private vm invalidation to MMHUB */
235236 if ((vmhub != AMDGPU_GFXHUB_0) &&
236− (hub->vm_l2_bank_select_reserved_cid2)) {
237+ (hub->vm_l2_bank_select_reserved_cid2) &&
238+ !amdgpu_sriov_vf(adev)) {
237239 inv_req = RREG32_NO_KIQ(hub->vm_l2_bank_select_reserved_cid2);
238240 /* bit 25: RSERVED_CACHE_PRIVATE_INVALIDATION */
239241 inv_req |= (1 << 25);
@@ -590,7 +592,14 @@ static void gmc_v11_0_set_mmhub_funcs(struct amdgpu_device *adev) · 350 unmodified lines
590592
591593 static void gmc_v11_0_set_gfxhub_funcs(struct amdgpu_device *adev)
592594 {
593− adev->gfxhub.funcs = &gfxhub_v3_0_funcs;
595+ switch (adev->ip_versions[GC_HWIP][0]) {
596+ case IP_VERSION(11, 0, 3):
597+ adev->gfxhub.funcs = &gfxhub_v3_0_3_funcs;
598+ break;
599+ default:
600+ adev->gfxhub.funcs = &gfxhub_v3_0_funcs;
601+ break;
602+ }
594603 }
595604
596605 static int gmc_v11_0_early_init(void *handle)
@@ -640,7 +649,10 @@ static void gmc_v11_0_vram_gtt_location(struct amdgpu_device *adev, · 43 unmodified lines
640649 amdgpu_gmc_gart_location(adev, mc);
641650
642651 /* base offset of vram pages */
643− adev->vm_manager.vram_base_offset = adev->mmhub.funcs->get_mc_fb_offset(adev);
652+ if (amdgpu_sriov_vf(adev))
653+ adev->vm_manager.vram_base_offset = 0;
654+ else
655+ adev->vm_manager.vram_base_offset = adev->mmhub.funcs->get_mc_fb_offset(adev);
644656 }
645657
646658 /**
@@ -732,6 +744,7 @@ static int gmc_v11_0_sw_init(void *handle) · 85 unmodified lines
732744 case IP_VERSION(11, 0, 0):
733745 case IP_VERSION(11, 0, 1):
734746 case IP_VERSION(11, 0, 2):
747+ case IP_VERSION(11, 0, 3):
735748 adev->num_vmhubs = 2;
736749 /*
737750 * To fulfill 4-level page support,
drivers/gpu/drm/amd/amdgpu/ih_v6_0.c+23−3
@@ -105,7 +105,13 @@ force_update_wptr_for_self_int(struct amdgpu_device *adev, · 104 unmodified lines
105105 ih_rb_cntl = REG_SET_FIELD(ih_rb_cntl, IH_RB_CNTL_RING1,
106106 RB_USED_INT_THRESHOLD, threshold);
107107
108− WREG32_SOC15(OSSSYS, 0, regIH_RB_CNTL_RING1, ih_rb_cntl);
108+ if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
109+ if (psp_reg_program(&adev->psp, PSP_REG_IH_RB_CNTL_RING1, ih_rb_cntl))
110+ return;
111+ } else {
112+ WREG32_SOC15(OSSSYS, 0, regIH_RB_CNTL_RING1, ih_rb_cntl);
113+ }
114+
109115 WREG32_SOC15(OSSSYS, 0, regIH_CNTL2, ih_cntl);
110116 }
111117
@@ -132,7 +138,13 @@ static int ih_v6_0_toggle_ring_interrupts(struct amdgpu_device *adev, · 20 unmodified lines
132138 /* enable_intr field is only valid in ring0 */
133139 if (ih == &adev->irq.ih)
134140 tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, ENABLE_INTR, (enable ? 1 : 0));
135− WREG32(ih_regs->ih_rb_cntl, tmp);
141+
142+ if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
143+ if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp))
144+ return -ETIMEDOUT;
145+ } else {
146+ WREG32(ih_regs->ih_rb_cntl, tmp);
147+ }
136148
137149 if (enable) {
138150 ih->enabled = true;
@@ -242,7 +254,15 @@ static int ih_v6_0_enable_ring(struct amdgpu_device *adev, · 103 unmodified lines
242254 tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, WPTR_OVERFLOW_ENABLE, 0);
243255 tmp = REG_SET_FIELD(tmp, IH_RB_CNTL, RB_FULL_DRAIN_ENABLE, 1);
244256 }
245− WREG32(ih_regs->ih_rb_cntl, tmp);
257+
258+ if (amdgpu_sriov_vf(adev) && amdgpu_sriov_reg_indirect_ih(adev)) {
259+ if (psp_reg_program(&adev->psp, ih_regs->psp_reg_id, tmp)) {
260+ DRM_ERROR("PSP program IH_RB_CNTL failed!\n");
261+ return -ETIMEDOUT;
262+ }
263+ } else {
264+ WREG32(ih_regs->ih_rb_cntl, tmp);
265+ }
246266
247267 if (ih == &adev->irq.ih) {
248268 /* set the ih ring 0 writeback address whether it's enabled or not */
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c+6−0
@@ -26,12 +26,15 @@ · 25 unmodified lines
2626 #include "amdgpu_imu.h"
2727 #include "amdgpu_dpm.h"
2828
29+#include "imu_v11_0_3.h"
30+
2931 #include "gc/gc_11_0_0_offset.h"
3032 #include "gc/gc_11_0_0_sh_mask.h"
3133
3234 MODULE_FIRMWARE("amdgpu/gc_11_0_0_imu.bin");
3335 MODULE_FIRMWARE("amdgpu/gc_11_0_1_imu.bin");
3436 MODULE_FIRMWARE("amdgpu/gc_11_0_2_imu.bin");
37+MODULE_FIRMWARE("amdgpu/gc_11_0_3_imu.bin");
3538
3639 static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
3740 {
@@ -360,6 +363,9 @@ static void imu_v11_0_program_rlc_ram(struct amdgpu_device *adev) · 322 unmodified lines
360363 program_imu_rlc_ram(adev, imu_rlc_ram_golden_11_0_2,
361364 (const u32)ARRAY_SIZE(imu_rlc_ram_golden_11_0_2));
362365 break;
366+ case IP_VERSION(11, 0, 3):
367+ imu_v11_0_3_program_rlc_ram(adev);
368+ break;
363369 default:
364370 BUG();
365371 break;
drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.c+145−0
@@ -0,0 +1,145 @@
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+ */
23+#include "amdgpu.h"
24+#include "amdgpu_imu.h"
25+#include "imu_v11_0_3.h"
26+
27+#include "gc/gc_11_0_3_offset.h"
28+#include "gc/gc_11_0_3_sh_mask.h"
29+
30+static const struct imu_rlc_ram_golden imu_rlc_ram_golden_11_0_3[] = {
31+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_IO_RD_COMBINE_FLUSH, 0x00055555, 0xe0000000),
32+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_IO_WR_COMBINE_FLUSH, 0x00055555, 0xe0000000),
33+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_DRAM_COMBINE_FLUSH, 0x00555555, 0xe0000000),
34+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_MISC2, 0x00001ffe, 0xe0000000),
35+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_CREDITS, 0x003f3fff, 0xe0000000),
36+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_TAG_RESERVE1, 0x00000000, 0xe0000000),
37+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_VCC_RESERVE0, 0x00041000, 0xe0000000),
38+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_VCC_RESERVE1, 0x00000000, 0xe0000000),
39+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_VCD_RESERVE0, 0x00040000, 0xe0000000),
40+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_VCD_RESERVE1, 0x00000000, 0xe0000000),
41+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_MISC, 0x00000017, 0xe0000000),
42+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGUS_SDP_ENABLE, 0x00000001, 0xe0000000),
43+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_CREDITS, 0x003f3fbf, 0xe0000000),
44+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_TAG_RESERVE0, 0x10200800, 0xe0000000),
45+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_TAG_RESERVE1, 0x00000088, 0xe0000000),
46+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_VCC_RESERVE0, 0x1d041040, 0xe0000000),
47+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_VCC_RESERVE1, 0x80000000, 0xe0000000),
48+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_IO_PRIORITY, 0x88888888, 0xe0000000),
49+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_MAM_CTRL, 0x0000d800, 0xe0000000),
50+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_ARB_FINAL, 0x000007ff, 0xe0000000),
51+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_DRAM_PAGE_BURST, 0x20080200, 0xe0000000),
52+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_SDP_ENABLE, 0x00000001, 0xe0000000),
53+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL2, 0x00020000, 0xe0000000),
54+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_APT_CNTL, 0x0000000c, 0xe0000000),
55+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_CACHEABLE_DRAM_ADDRESS_END, 0x000fffff, 0xe0000000),
56+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCEA_MISC, 0x0c48bff0, 0xe0000000),
57+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SA_UNIT_DISABLE, 0x00fffc01, 0xe0000000),
58+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_PRIM_CONFIG, 0x000fffe1, 0xe0000000),
59+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_RB_BACKEND_DISABLE, 0xffffff01, 0xe0000000),
60+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xfffe0001, 0x40000000),
61+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xfffe0001, 0x42000000),
62+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xffff0001, 0x44000000),
63+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xffff0001, 0x46000000),
64+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xffff0001, 0x48000000),
65+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_ARRAY_CONFIG, 0xffff0001, 0x4A000000),
66+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCGTS_TCC_DISABLE, 0x00000001, 0x00000000),
67+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_SHADER_RATE_CONFIG, 0x00000001, 0x00000000),
68+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCC_GC_EDC_CONFIG, 0x00000001, 0x00000000),
69+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL, 0x00000500, 0xe0000000),
70+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_SYSTEM_APERTURE_LOW_ADDR, 0x00000001, 0xe0000000),
71+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_SYSTEM_APERTURE_HIGH_ADDR, 0x00000000, 0xe0000000),
72+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_LOCAL_FB_ADDRESS_START, 0x00000000, 0xe0000000),
73+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_LOCAL_FB_ADDRESS_END, 0x000005ff, 0xe0000000),
74+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_FB_LOCATION_BASE, 0x00006000, 0xe0000000),
75+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_FB_LOCATION_TOP, 0x000065ff, 0xe0000000),
76+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_CONTEXT0_CNTL, 0x00000000, 0xe0000000),
77+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_CONTEXT1_CNTL, 0x00000000, 0xe0000000),
78+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_NB_TOP_OF_DRAM_SLOT1, 0xff800000, 0xe0000000),
79+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_NB_LOWER_TOP_OF_DRAM2, 0x00000001, 0xe0000000),
80+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_NB_UPPER_TOP_OF_DRAM2, 0x00000fff, 0xe0000000),
81+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL, 0x00001ffc, 0xe0000000),
82+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_MX_L1_TLB_CNTL, 0x00000551, 0xe0000000),
83+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CNTL, 0x00080603, 0xe0000000),
84+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CNTL2, 0x00000003, 0xe0000000),
85+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CNTL3, 0x00100003, 0xe0000000),
86+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CNTL5, 0x00003fe0, 0xe0000000),
87+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_CONTEXT0_CNTL, 0x00000001, 0xe0000000),
88+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CONTEXT0_PER_PFVF_PTE_CACHE_FRAGMENT_SIZES, 0x00000c00, 0xe0000000),
89+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_CONTEXT1_CNTL, 0x00000001, 0xe0000000),
90+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_CONTEXT1_PER_PFVF_PTE_CACHE_FRAGMENT_SIZES, 0x00000c00, 0xe0000000),
91+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGB_ADDR_CONFIG, 0x00000444, 0xe0000000),
92+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGL2_PIPE_STEER_0, 0x54105410, 0xe0000000),
93+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGL2_PIPE_STEER_2, 0x76323276, 0xe0000000),
94+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGB_ADDR_CONFIG, 0x00000244, 0xe0000000),
95+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCUTCL2_HARVEST_BYPASS_GROUPS, 0x00000006, 0xe0000000),
96+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_APT_CNTL, 0x0000000c, 0xe0000000),
97+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_AGP_BASE, 0x00000000, 0xe0000000),
98+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_AGP_BOT, 0x00000002, 0xe0000000),
99+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCMC_VM_AGP_TOP, 0x00000000, 0xe0000000),
100+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regGCVM_L2_PROTECTION_FAULT_CNTL2, 0x00020000, 0xe0000000),
101+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA0_UCODE_SELFLOAD_CONTROL, 0x00000210, 0xe0000000),
102+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regSDMA1_UCODE_SELFLOAD_CONTROL, 0x00000210, 0xe0000000),
103+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCPC_PSP_DEBUG, CPC_PSP_DEBUG__GPA_OVERRIDE_MASK, 0xe0000000),
104+ IMU_RLC_RAM_GOLDEN_VALUE(GC, 0, regCPG_PSP_DEBUG, CPG_PSP_DEBUG__GPA_OVERRIDE_MASK, 0xe0000000),
105+};
106+
107+static void program_rlc_ram_register_setting(struct amdgpu_device *adev,
108+ const struct imu_rlc_ram_golden *regs,
109+ const u32 array_size)
110+{
111+ const struct imu_rlc_ram_golden *entry;
112+ u32 reg, data;
113+ int i;
114+
115+ for (i = 0; i < array_size; ++i) {
116+ entry = &regs[i];
117+ reg = adev->reg_offset[entry->hwip][entry->instance][entry->segment] + entry->reg;
118+ reg |= entry->addr_mask;
119+
120+ data = entry->data;
121+ if (entry->reg == regGCMC_VM_AGP_BASE)
122+ data = 0x00ffffff;
123+ else if (entry->reg == regGCMC_VM_AGP_TOP)
124+ data = 0x0;
125+ else if (entry->reg == regGCMC_VM_FB_LOCATION_BASE)
126+ data = adev->gmc.vram_start >> 24;
127+ else if (entry->reg == regGCMC_VM_FB_LOCATION_TOP)
128+ data = adev->gmc.vram_end >> 24;
129+
130+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_HIGH, 0);
131+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_LOW, reg);
132+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_DATA, data);
133+ }
134+ //Indicate the latest entry
135+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_HIGH, 0);
136+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_ADDR_LOW, 0);
137+ WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_DATA, 0);
138+}
139+
140+void imu_v11_0_3_program_rlc_ram(struct amdgpu_device *adev)
141+{
142+ program_rlc_ram_register_setting(adev,
143+ imu_rlc_ram_golden_11_0_3,
144+ (const u32)ARRAY_SIZE(imu_rlc_ram_golden_11_0_3));
145+}
drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.h+29−0
@@ -0,0 +1,29 @@
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+ */
23+
24+#ifndef __IMU_V11_0_3_H__
25+#define __IMU_V11_0_3_H__
26+
27+void imu_v11_0_3_program_rlc_ram(struct amdgpu_device *adev);
28+
29+#endif
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c+11−0
@@ -38,6 +38,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes.bin"); · 37 unmodified lines
3838 MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes1.bin");
3939 MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes.bin");
4040 MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes1.bin");
41+MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes.bin");
42+MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes1.bin");
4143
4244 static int mes_v11_0_hw_fini(void *handle);
4345 static int mes_v11_0_kiq_hw_init(struct amdgpu_device *adev);
@@ -189,6 +191,15 @@ static int mes_v11_0_add_hw_queue(struct amdgpu_mes *mes, · 145 unmodified lines
189191 mes_add_queue_pkt.is_aql_queue = input->is_aql_queue;
190192 mes_add_queue_pkt.gds_size = input->queue_size;
191193
194+ if (!(((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 4) &&
195+ (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0)) &&
196+ (adev->ip_versions[GC_HWIP][0] <= IP_VERSION(11, 0, 3))))
197+ mes_add_queue_pkt.trap_en = 1;
198+
199+ /* For KFD, gds_size is re-used for queue size (needed in MES for AQL queues) */
200+ mes_add_queue_pkt.is_aql_queue = input->is_aql_queue;
201+ mes_add_queue_pkt.gds_size = input->queue_size;
202+
192203 return mes_v11_0_submit_pkt_and_poll_completion(mes,
193204 &mes_add_queue_pkt, sizeof(mes_add_queue_pkt),
194205 offsetof(union MESAPI__ADD_QUEUE, api_status));
drivers/gpu/drm/amd/amdgpu/mmhub_v3_0.c+5−5
@@ -169,17 +169,17 @@ static void mmhub_v3_0_init_system_aperture_regs(struct amdgpu_device *adev) · 168 unmodified lines
169169 uint64_t value;
170170 uint32_t tmp;
171171
172− /* Disable AGP. */
173− WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_BASE, 0);
174− WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_TOP, 0);
175− WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_BOT, 0x00FFFFFF);
176−
177172 if (!amdgpu_sriov_vf(adev)) {
178173 /*
179174 * the new L1 policy will block SRIOV guest from writing
180175 * these regs, and they will be programed at host.
181176 * so skip programing these regs.
182177 */
178+ /* Disable AGP. */
179+ WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_BASE, 0);
180+ WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_TOP, 0);
181+ WREG32_SOC15(MMHUB, 0, regMMMC_VM_AGP_BOT, 0x00FFFFFF);
182+
183183 /* Program the system aperture low logical page number. */
184184 WREG32_SOC15(MMHUB, 0, regMMMC_VM_SYSTEM_APERTURE_LOW_ADDR,
185185 adev->gmc.vram_start >> 18);
drivers/gpu/drm/amd/amdgpu/mmsch_v4_0.h+140−0
@@ -0,0 +1,140 @@
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+ */
23+
24+#ifndef __MMSCH_V4_0_H__
25+#define __MMSCH_V4_0_H__
26+
27+#include "amdgpu_vcn.h"
28+
29+#define MMSCH_VERSION_MAJOR 4
30+#define MMSCH_VERSION_MINOR 0
31+#define MMSCH_VERSION (MMSCH_VERSION_MAJOR << 16 | MMSCH_VERSION_MINOR)
32+
33+#define RB_ENABLED (1 << 0)
34+#define RB4_ENABLED (1 << 1)
35+#define MMSCH_DOORBELL_OFFSET 0x8
36+
37+#define MMSCH_VF_ENGINE_STATUS__PASS 0x1
38+
39+#define MMSCH_VF_MAILBOX_RESP__OK 0x1
40+#define MMSCH_VF_MAILBOX_RESP__INCOMPLETE 0x2
41+
42+enum mmsch_v4_0_command_type {
43+ MMSCH_COMMAND__DIRECT_REG_WRITE = 0,
44+ MMSCH_COMMAND__DIRECT_REG_POLLING = 2,
45+ MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE = 3,
46+ MMSCH_COMMAND__INDIRECT_REG_WRITE = 8,
47+ MMSCH_COMMAND__END = 0xf
48+};
49+
50+struct mmsch_v4_0_table_info {
51+ uint32_t init_status;
52+ uint32_t table_offset;
53+ uint32_t table_size;
54+};
55+
56+struct mmsch_v4_0_init_header {
57+ uint32_t version;
58+ uint32_t total_size;
59+ struct mmsch_v4_0_table_info inst[AMDGPU_MAX_VCN_INSTANCES];
60+ struct mmsch_v4_0_table_info jpegdec;
61+};
62+
63+struct mmsch_v4_0_cmd_direct_reg_header {
64+ uint32_t reg_offset : 28;
65+ uint32_t command_type : 4;
66+};
67+
68+struct mmsch_v4_0_cmd_indirect_reg_header {
69+ uint32_t reg_offset : 20;
70+ uint32_t reg_idx_space : 8;
71+ uint32_t command_type : 4;
72+};
73+
74+struct mmsch_v4_0_cmd_direct_write {
75+ struct mmsch_v4_0_cmd_direct_reg_header cmd_header;
76+ uint32_t reg_value;
77+};
78+
79+struct mmsch_v4_0_cmd_direct_read_modify_write {
80+ struct mmsch_v4_0_cmd_direct_reg_header cmd_header;
81+ uint32_t write_data;
82+ uint32_t mask_value;
83+};
84+
85+struct mmsch_v4_0_cmd_direct_polling {
86+ struct mmsch_v4_0_cmd_direct_reg_header cmd_header;
87+ uint32_t mask_value;
88+ uint32_t wait_value;
89+};
90+
91+struct mmsch_v4_0_cmd_end {
92+ struct mmsch_v4_0_cmd_direct_reg_header cmd_header;
93+};
94+
95+struct mmsch_v4_0_cmd_indirect_write {
96+ struct mmsch_v4_0_cmd_indirect_reg_header cmd_header;
97+ uint32_t reg_value;
98+};
99+
100+#define MMSCH_V4_0_INSERT_DIRECT_RD_MOD_WT(reg, mask, data) { \
101+ size = sizeof(struct mmsch_v4_0_cmd_direct_read_modify_write); \
102+ size_dw = size / 4; \
103+ direct_rd_mod_wt.cmd_header.reg_offset = reg; \
104+ direct_rd_mod_wt.mask_value = mask; \
105+ direct_rd_mod_wt.write_data = data; \
106+ memcpy((void *)table_loc, &direct_rd_mod_wt, size); \
107+ table_loc += size_dw; \
108+ table_size += size_dw; \
109+}
110+
111+#define MMSCH_V4_0_INSERT_DIRECT_WT(reg, value) { \
112+ size = sizeof(struct mmsch_v4_0_cmd_direct_write); \
113+ size_dw = size / 4; \
114+ direct_wt.cmd_header.reg_offset = reg; \
115+ direct_wt.reg_value = value; \
116+ memcpy((void *)table_loc, &direct_wt, size); \
117+ table_loc += size_dw; \
118+ table_size += size_dw; \
119+}
120+
121+#define MMSCH_V4_0_INSERT_DIRECT_POLL(reg, mask, wait) { \
122+ size = sizeof(struct mmsch_v4_0_cmd_direct_polling); \
123+ size_dw = size / 4; \
124+ direct_poll.cmd_header.reg_offset = reg; \
125+ direct_poll.mask_value = mask; \
126+ direct_poll.wait_value = wait; \
127+ memcpy((void *)table_loc, &direct_poll, size); \
128+ table_loc += size_dw; \
129+ table_size += size_dw; \
130+}
131+
132+#define MMSCH_V4_0_INSERT_END() { \
133+ size = sizeof(struct mmsch_v4_0_cmd_end); \
134+ size_dw = size / 4; \
135+ memcpy((void *)table_loc, &end, size); \
136+ table_loc += size_dw; \
137+ table_size += size_dw; \
138+}
139+
140+#endif
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c+1−0
@@ -290,6 +290,7 @@ flr_done: · 289 unmodified lines
290290 reset_context.method = AMD_RESET_METHOD_NONE;
291291 reset_context.reset_req_dev = adev;
292292 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
293+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
293294
294295 amdgpu_device_gpu_recover(adev, NULL, &reset_context);
295296 }
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c+1−0
@@ -317,6 +317,7 @@ flr_done: · 316 unmodified lines
317317 reset_context.method = AMD_RESET_METHOD_NONE;
318318 reset_context.reset_req_dev = adev;
319319 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
320+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
320321
321322 amdgpu_device_gpu_recover(adev, NULL, &reset_context);
322323 }
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c+1−0
@@ -529,6 +529,7 @@ static void xgpu_vi_mailbox_flr_work(struct work_struct *work) · 528 unmodified lines
529529 reset_context.method = AMD_RESET_METHOD_NONE;
530530 reset_context.reset_req_dev = adev;
531531 clear_bit(AMDGPU_NEED_FULL_RESET, &reset_context.flags);
532+ clear_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context.flags);
532533
533534 amdgpu_device_gpu_recover(adev, NULL, &reset_context);
534535 }
drivers/gpu/drm/amd/amdgpu/nbio_v4_3.c+44−0
@@ -488,3 +488,47 @@ const struct amdgpu_nbio_funcs nbio_v4_3_funcs = { · 487 unmodified lines
488488 .get_rom_offset = nbio_v4_3_get_rom_offset,
489489 .program_aspm = nbio_v4_3_program_aspm,
490490 };
491+
492+
493+static void nbio_v4_3_sriov_ih_doorbell_range(struct amdgpu_device *adev,
494+ bool use_doorbell, int doorbell_index)
495+{
496+}
497+
498+static void nbio_v4_3_sriov_sdma_doorbell_range(struct amdgpu_device *adev, int instance,
499+ bool use_doorbell, int doorbell_index,
500+ int doorbell_size)
501+{
502+}
503+
504+static void nbio_v4_3_sriov_vcn_doorbell_range(struct amdgpu_device *adev, bool use_doorbell,
505+ int doorbell_index, int instance)
506+{
507+}
508+
509+static void nbio_v4_3_sriov_gc_doorbell_init(struct amdgpu_device *adev)
510+{
511+}
512+
513+const struct amdgpu_nbio_funcs nbio_v4_3_sriov_funcs = {
514+ .get_hdp_flush_req_offset = nbio_v4_3_get_hdp_flush_req_offset,
515+ .get_hdp_flush_done_offset = nbio_v4_3_get_hdp_flush_done_offset,
516+ .get_pcie_index_offset = nbio_v4_3_get_pcie_index_offset,
517+ .get_pcie_data_offset = nbio_v4_3_get_pcie_data_offset,
518+ .get_rev_id = nbio_v4_3_get_rev_id,
519+ .mc_access_enable = nbio_v4_3_mc_access_enable,
520+ .get_memsize = nbio_v4_3_get_memsize,
521+ .sdma_doorbell_range = nbio_v4_3_sriov_sdma_doorbell_range,
522+ .vcn_doorbell_range = nbio_v4_3_sriov_vcn_doorbell_range,
523+ .gc_doorbell_init = nbio_v4_3_sriov_gc_doorbell_init,
524+ .enable_doorbell_aperture = nbio_v4_3_enable_doorbell_aperture,
525+ .enable_doorbell_selfring_aperture = nbio_v4_3_enable_doorbell_selfring_aperture,
526+ .ih_doorbell_range = nbio_v4_3_sriov_ih_doorbell_range,
527+ .update_medium_grain_clock_gating = nbio_v4_3_update_medium_grain_clock_gating,
528+ .update_medium_grain_light_sleep = nbio_v4_3_update_medium_grain_light_sleep,
529+ .get_clockgating_state = nbio_v4_3_get_clockgating_state,
530+ .ih_control = nbio_v4_3_ih_control,
531+ .init_registers = nbio_v4_3_init_registers,
532+ .remap_hdp_registers = nbio_v4_3_remap_hdp_registers,
533+ .get_rom_offset = nbio_v4_3_get_rom_offset,
534+};
drivers/gpu/drm/amd/amdgpu/nbio_v4_3.h+1−0
@@ -28,5 +28,6 @@ · 27 unmodified lines
2828
2929 extern const struct nbio_hdp_flush_reg nbio_v4_3_hdp_flush_reg;
3030 extern const struct amdgpu_nbio_funcs nbio_v4_3_funcs;
31+extern const struct amdgpu_nbio_funcs nbio_v4_3_sriov_funcs;
3132
3233 #endif
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c+9−0
@@ -44,6 +44,7 @@ MODULE_FIRMWARE("amdgpu/psp_13_0_0_sos.bin"); · 43 unmodified lines
4444 MODULE_FIRMWARE("amdgpu/psp_13_0_0_ta.bin");
4545 MODULE_FIRMWARE("amdgpu/psp_13_0_7_sos.bin");
4646 MODULE_FIRMWARE("amdgpu/psp_13_0_7_ta.bin");
47+MODULE_FIRMWARE("amdgpu/psp_13_0_10_sos.bin");
4748
4849 /* For large FW files the time to complete can be very long */
4950 #define USBC_PD_POLLING_LIMIT_S 240
@@ -109,6 +110,7 @@ static int psp_v13_0_init_microcode(struct psp_context *psp) · 59 unmodified lines
109110 break;
110111 case IP_VERSION(13, 0, 0):
111112 case IP_VERSION(13, 0, 7):
113+ case IP_VERSION(13, 0, 10):
112114 err = psp_init_sos_microcode(psp, chip_name);
113115 if (err)
114116 return err;
@@ -222,6 +224,12 @@ static int psp_v13_0_bootloader_load_dbg_drv(struct psp_context *psp) · 107 unmodified lines
222224 return psp_v13_0_bootloader_load_component(psp, &psp->dbg_drv, PSP_BL__LOAD_DBGDRV);
223225 }
224226
227+static int psp_v13_0_bootloader_load_ras_drv(struct psp_context *psp)
228+{
229+ return psp_v13_0_bootloader_load_component(psp, &psp->ras_drv, PSP_BL__LOAD_RASDRV);
230+}
231+
232+
225233 static int psp_v13_0_bootloader_load_sos(struct psp_context *psp)
226234 {
227235 int ret;
@@ -718,6 +726,7 @@ static const struct psp_funcs psp_v13_0_funcs = { · 490 unmodified lines
718726 .bootloader_load_soc_drv = psp_v13_0_bootloader_load_soc_drv,
719727 .bootloader_load_intf_drv = psp_v13_0_bootloader_load_intf_drv,
720728 .bootloader_load_dbg_drv = psp_v13_0_bootloader_load_dbg_drv,
729+ .bootloader_load_ras_drv = psp_v13_0_bootloader_load_ras_drv,
721730 .bootloader_load_sos = psp_v13_0_bootloader_load_sos,
722731 .ring_init = psp_v13_0_ring_init,
723732 .ring_create = psp_v13_0_ring_create,
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c+19−91
@@ -561,44 +561,6 @@ static void sdma_v4_0_setup_ulv(struct amdgpu_device *adev) · 560 unmodified lines
561561 }
562562 }
563563
564−static int sdma_v4_0_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
565−{
566− int err = 0;
567− const struct sdma_firmware_header_v1_0 *hdr;
568−
569− err = amdgpu_ucode_validate(sdma_inst->fw);
570− if (err)
571− return err;
572−
573− hdr = (const struct sdma_firmware_header_v1_0 *)sdma_inst->fw->data;
574− sdma_inst->fw_version = le32_to_cpu(hdr->header.ucode_version);
575− sdma_inst->feature_version = le32_to_cpu(hdr->ucode_feature_version);
576−
577− if (sdma_inst->feature_version >= 20)
578− sdma_inst->burst_nop = true;
579−
580− return 0;
581−}
582−
583−static void sdma_v4_0_destroy_inst_ctx(struct amdgpu_device *adev)
584−{
585− int i;
586−
587− for (i = 0; i < adev->sdma.num_instances; i++) {
588− release_firmware(adev->sdma.instance[i].fw);
589− adev->sdma.instance[i].fw = NULL;
590−
591− /* arcturus shares the same FW memory across
592− all SDMA isntances */
593− if (adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 2, 2) ||
594− adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 4, 0))
595− break;
596− }
597−
598− memset((void *)adev->sdma.instance, 0,
599− sizeof(struct amdgpu_sdma_instance) * AMDGPU_MAX_SDMA_INSTANCES);
600−}
601−
602564 /**
603565 * sdma_v4_0_init_microcode - load ucode images from disk
604566 *
@@ -615,9 +577,7 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev) · 10 unmodified lines
615577 {
616578 const char *chip_name;
617579 char fw_name[30];
618− int err = 0, i;
619− struct amdgpu_firmware_info *info = NULL;
620− const struct common_firmware_header *header = NULL;
580+ int ret, i;
621581
622582 DRM_DEBUG("\n");
623583
@@ -656,58 +616,25 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev) · 32 unmodified lines
656616 BUG();
657617 }
658618
659− snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
660−
661− err = request_firmware(&adev->sdma.instance[0].fw, fw_name, adev->dev);
662− if (err)
663− goto out;
664−
665− err = sdma_v4_0_init_inst_ctx(&adev->sdma.instance[0]);
666− if (err)
667− goto out;
668−
669− for (i = 1; i < adev->sdma.num_instances; i++) {
619+ for (i = 0; i < adev->sdma.num_instances; i++) {
620+ if (i == 0)
621+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
622+ else
623+ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma%d.bin", chip_name, i);
670624 if (adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 2, 2) ||
671625 adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 4, 0)) {
672626 /* Acturus & Aldebaran will leverage the same FW memory
673627 for every SDMA instance */
674− memcpy((void *)&adev->sdma.instance[i],
675− (void *)&adev->sdma.instance[0],
676− sizeof(struct amdgpu_sdma_instance));
677− }
678− else {
679− snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma%d.bin", chip_name, i);
680−
681− err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev);
682− if (err)
683− goto out;
684−
685− err = sdma_v4_0_init_inst_ctx(&adev->sdma.instance[i]);
686− if (err)
687− goto out;
688− }
689− }
690−
691− DRM_DEBUG("psp_load == '%s'\n",
692− adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
693−
694− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
695− for (i = 0; i < adev->sdma.num_instances; i++) {
696− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
697− info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
698− info->fw = adev->sdma.instance[i].fw;
699− header = (const struct common_firmware_header *)info->fw->data;
700− adev->firmware.fw_size +=
701− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
628+ ret = amdgpu_sdma_init_microcode(adev, fw_name, 0, true);
629+ break;
630+ } else {
631+ ret = amdgpu_sdma_init_microcode(adev, fw_name, i, false);
632+ if (ret)
633+ return ret;
702634 }
703635 }
704636
705−out:
706− if (err) {
707− DRM_ERROR("sdma_v4_0: Failed to load firmware \"%s\"\n", fw_name);
708− sdma_v4_0_destroy_inst_ctx(adev);
709− }
710− return err;
637+ return ret;
711638 }
712639
713640 /**
@@ -2000,14 +1927,17 @@ static int sdma_v4_0_sw_fini(void *handle) · 1286 unmodified lines
20001927 amdgpu_ring_fini(&adev->sdma.instance[i].page);
20011928 }
20021929
2003− sdma_v4_0_destroy_inst_ctx(adev);
1930+ if (adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 2, 0) ||
1931+ adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(4, 4, 0))
1932+ amdgpu_sdma_destroy_inst_ctx(adev, true);
1933+ else
1934+ amdgpu_sdma_destroy_inst_ctx(adev, false);
20041935
20051936 return 0;
20061937 }
20071938
20081939 static int sdma_v4_0_hw_init(void *handle)
20091940 {
2010− int r;
20111941 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
20121942
20131943 if (adev->flags & AMD_IS_APU)
@@ -2016,9 +1946,7 @@ static int sdma_v4_0_hw_init(void *handle) · 2 unmodified lines
20161946 if (!amdgpu_sriov_vf(adev))
20171947 sdma_v4_0_init_golden_registers(adev);
20181948
2019− r = sdma_v4_0_start(adev);
2020−
2021− return r;
1949+ return sdma_v4_0_start(adev);
20221950 }
20231951
20241952 static int sdma_v4_0_hw_fini(void *handle)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c+9−40
@@ -240,10 +240,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev) · 239 unmodified lines
240240 {
241241 const char *chip_name;
242242 char fw_name[40];
243− int err = 0, i;
244− struct amdgpu_firmware_info *info = NULL;
245− const struct common_firmware_header *header = NULL;
246− const struct sdma_firmware_header_v1_0 *hdr;
243+ int ret, i;
247244
248245 if (amdgpu_sriov_vf(adev) && (adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(5, 0, 5)))
249246 return 0;
@@ -272,38 +269,12 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev) · 22 unmodified lines
272269 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name);
273270 else
274271 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma1.bin", chip_name);
275− err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev);
276− if (err)
277− goto out;
278− err = amdgpu_ucode_validate(adev->sdma.instance[i].fw);
279− if (err)
280− goto out;
281− hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data;
282− adev->sdma.instance[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
283− adev->sdma.instance[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
284− if (adev->sdma.instance[i].feature_version >= 20)
285− adev->sdma.instance[i].burst_nop = true;
286− DRM_DEBUG("psp_load == '%s'\n",
287− adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
288−
289− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
290− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
291− info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
292− info->fw = adev->sdma.instance[i].fw;
293− header = (const struct common_firmware_header *)info->fw->data;
294− adev->firmware.fw_size +=
295− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
296− }
297− }
298−out:
299− if (err) {
300− DRM_ERROR("sdma_v5_0: Failed to load firmware \"%s\"\n", fw_name);
301− for (i = 0; i < adev->sdma.num_instances; i++) {
302− release_firmware(adev->sdma.instance[i].fw);
303− adev->sdma.instance[i].fw = NULL;
304− }
272+ ret = amdgpu_sdma_init_microcode(adev, fw_name, i, false);
273+ if (ret)
274+ return ret;
305275 }
306− return err;
276+
277+ return ret;
307278 }
308279
309280 static unsigned sdma_v5_0_ring_init_cond_exec(struct amdgpu_ring *ring)
@@ -1465,12 +1436,10 @@ static int sdma_v5_0_sw_fini(void *handle) · 1155 unmodified lines
14651436 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
14661437 int i;
14671438
1468− for (i = 0; i < adev->sdma.num_instances; i++) {
1469− release_firmware(adev->sdma.instance[i].fw);
1470− adev->sdma.instance[i].fw = NULL;
1471−
1439+ for (i = 0; i < adev->sdma.num_instances; i++)
14721440 amdgpu_ring_fini(&adev->sdma.instance[i].ring);
1473− }
1441+
1442+ amdgpu_sdma_destroy_inst_ctx(adev, false);
14741443
14751444 return 0;
14761445 }
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c+3−71
@@ -89,33 +89,6 @@ static u32 sdma_v5_2_get_reg_offset(struct amdgpu_device *adev, u32 instance, u3 · 88 unmodified lines
8989 return base + internal_offset;
9090 }
9191
92−static int sdma_v5_2_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
93−{
94− int err = 0;
95− const struct sdma_firmware_header_v1_0 *hdr;
96−
97− err = amdgpu_ucode_validate(sdma_inst->fw);
98− if (err)
99− return err;
100−
101− hdr = (const struct sdma_firmware_header_v1_0 *)sdma_inst->fw->data;
102− sdma_inst->fw_version = le32_to_cpu(hdr->header.ucode_version);
103− sdma_inst->feature_version = le32_to_cpu(hdr->ucode_feature_version);
104−
105− if (sdma_inst->feature_version >= 20)
106− sdma_inst->burst_nop = true;
107−
108− return 0;
109−}
110−
111−static void sdma_v5_2_destroy_inst_ctx(struct amdgpu_device *adev)
112−{
113− release_firmware(adev->sdma.instance[0].fw);
114−
115− memset((void *)adev->sdma.instance, 0,
116− sizeof(struct amdgpu_sdma_instance) * AMDGPU_MAX_SDMA_INSTANCES);
117−}
118−
11992 /**
12093 * sdma_v5_2_init_microcode - load ucode images from disk
12194 *
@@ -132,9 +105,6 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) · 10 unmodified lines
132105 {
133106 const char *chip_name;
134107 char fw_name[40];
135− int err = 0, i;
136− struct amdgpu_firmware_info *info = NULL;
137− const struct common_firmware_header *header = NULL;
138108
139109 DRM_DEBUG("\n");
140110
@@ -169,42 +139,7 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) · 28 unmodified lines
169139
170140 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", chip_name);
171141
172− err = request_firmware(&adev->sdma.instance[0].fw, fw_name, adev->dev);
173− if (err)
174− goto out;
175−
176− err = sdma_v5_2_init_inst_ctx(&adev->sdma.instance[0]);
177− if (err)
178− goto out;
179−
180− for (i = 1; i < adev->sdma.num_instances; i++)
181− memcpy((void *)&adev->sdma.instance[i],
182− (void *)&adev->sdma.instance[0],
183− sizeof(struct amdgpu_sdma_instance));
184−
185− if (amdgpu_sriov_vf(adev) && (adev->ip_versions[SDMA0_HWIP][0] == IP_VERSION(5, 2, 0)))
186− return 0;
187−
188− DRM_DEBUG("psp_load == '%s'\n",
189− adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
190−
191− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
192− for (i = 0; i < adev->sdma.num_instances; i++) {
193− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
194− info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i;
195− info->fw = adev->sdma.instance[i].fw;
196− header = (const struct common_firmware_header *)info->fw->data;
197− adev->firmware.fw_size +=
198− ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
199− }
200− }
201−
202−out:
203− if (err) {
204− DRM_ERROR("sdma_v5_2: Failed to load firmware \"%s\"\n", fw_name);
205− sdma_v5_2_destroy_inst_ctx(adev);
206− }
207− return err;
142+ return amdgpu_sdma_init_microcode(adev, fw_name, 0, true);
208143 }
209144
210145 static unsigned sdma_v5_2_ring_init_cond_exec(struct amdgpu_ring *ring)
@@ -1406,19 +1341,16 @@ static int sdma_v5_2_sw_fini(void *handle) · 1195 unmodified lines
14061341 for (i = 0; i < adev->sdma.num_instances; i++)
14071342 amdgpu_ring_fini(&adev->sdma.instance[i].ring);
14081343
1409− sdma_v5_2_destroy_inst_ctx(adev);
1344+ amdgpu_sdma_destroy_inst_ctx(adev, true);
14101345
14111346 return 0;
14121347 }
14131348
14141349 static int sdma_v5_2_hw_init(void *handle)
14151350 {
1416− int r;
14171351 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
14181352
1419− r = sdma_v5_2_start(adev);
1420−
1421− return r;
1353+ return sdma_v5_2_start(adev);
14221354 }
14231355
14241356 static int sdma_v5_2_hw_fini(void *handle)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c+10−77
@@ -47,6 +47,7 @@ · 46 unmodified lines
4747 MODULE_FIRMWARE("amdgpu/sdma_6_0_0.bin");
4848 MODULE_FIRMWARE("amdgpu/sdma_6_0_1.bin");
4949 MODULE_FIRMWARE("amdgpu/sdma_6_0_2.bin");
50+MODULE_FIRMWARE("amdgpu/sdma_6_0_3.bin");
5051
5152 #define SDMA1_REG_OFFSET 0x600
5253 #define SDMA0_HYP_DEC_REG_START 0x5880
@@ -77,33 +78,6 @@ static u32 sdma_v6_0_get_reg_offset(struct amdgpu_device *adev, u32 instance, u3 · 24 unmodified lines
7778 return base + internal_offset;
7879 }
7980
80−static int sdma_v6_0_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
81−{
82− int err = 0;
83− const struct sdma_firmware_header_v2_0 *hdr;
84−
85− err = amdgpu_ucode_validate(sdma_inst->fw);
86− if (err)
87− return err;
88−
89− hdr = (const struct sdma_firmware_header_v2_0 *)sdma_inst->fw->data;
90− sdma_inst->fw_version = le32_to_cpu(hdr->header.ucode_version);
91− sdma_inst->feature_version = le32_to_cpu(hdr->ucode_feature_version);
92−
93− if (sdma_inst->feature_version >= 20)
94− sdma_inst->burst_nop = true;
95−
96− return 0;
97−}
98−
99−static void sdma_v6_0_destroy_inst_ctx(struct amdgpu_device *adev)
100−{
101− release_firmware(adev->sdma.instance[0].fw);
102−
103− memset((void*)adev->sdma.instance, 0,
104− sizeof(struct amdgpu_sdma_instance) * AMDGPU_MAX_SDMA_INSTANCES);
105−}
106−
10781 /**
10882 * sdma_v6_0_init_microcode - load ucode images from disk
10983 *
@@ -113,16 +87,10 @@ static void sdma_v6_0_destroy_inst_ctx(struct amdgpu_device *adev) · 3 unmodified lines
11387 * the driver (not loaded into hw).
11488 * Returns 0 on success, error on failure.
11589 */
116−
117−// emulation only, won't work on real chip
118−// sdma 6.0.0 real chip need to use PSP to load firmware
11990 static int sdma_v6_0_init_microcode(struct amdgpu_device *adev)
12091 {
12192 char fw_name[30];
12293 char ucode_prefix[30];
123− int err = 0, i;
124− struct amdgpu_firmware_info *info = NULL;
125− const struct sdma_firmware_header_v2_0 *sdma_hdr;
12694
12795 DRM_DEBUG("\n");
12896
@@ -130,43 +98,7 @@ static int sdma_v6_0_init_microcode(struct amdgpu_device *adev) · 1 unmodified line
13098
13199 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix);
132100
133− err = request_firmware(&adev->sdma.instance[0].fw, fw_name, adev->dev);
134− if (err)
135− goto out;
136−
137− err = sdma_v6_0_init_inst_ctx(&adev->sdma.instance[0]);
138− if (err)
139− goto out;
140−
141− for (i = 1; i < adev->sdma.num_instances; i++) {
142− memcpy((void*)&adev->sdma.instance[i],
143− (void*)&adev->sdma.instance[0],
144− sizeof(struct amdgpu_sdma_instance));
145− }
146−
147− DRM_DEBUG("psp_load == '%s'\n",
148− adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false");
149−
150− if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
151− sdma_hdr = (const struct sdma_firmware_header_v2_0 *)adev->sdma.instance[0].fw->data;
152− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA_UCODE_TH0];
153− info->ucode_id = AMDGPU_UCODE_ID_SDMA_UCODE_TH0;
154− info->fw = adev->sdma.instance[0].fw;
155− adev->firmware.fw_size +=
156− ALIGN(le32_to_cpu(sdma_hdr->ctx_ucode_size_bytes), PAGE_SIZE);
157− info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA_UCODE_TH1];
158− info->ucode_id = AMDGPU_UCODE_ID_SDMA_UCODE_TH1;
159− info->fw = adev->sdma.instance[0].fw;
160− adev->firmware.fw_size +=
161− ALIGN(le32_to_cpu(sdma_hdr->ctl_ucode_size_bytes), PAGE_SIZE);
162− }
163−
164−out:
165− if (err) {
166− DRM_ERROR("sdma_v6_0: Failed to load firmware \"%s\"\n", fw_name);
167− sdma_v6_0_destroy_inst_ctx(adev);
168− }
169− return err;
101+ return amdgpu_sdma_init_microcode(adev, fw_name, 0, true);
170102 }
171103
172104 static unsigned sdma_v6_0_ring_init_cond_exec(struct amdgpu_ring *ring)
@@ -559,7 +491,8 @@ static int sdma_v6_0_gfx_resume(struct amdgpu_device *adev) · 386 unmodified lines
559491 for (i = 0; i < adev->sdma.num_instances; i++) {
560492 ring = &adev->sdma.instance[i].ring;
561493
562− WREG32_SOC15_IP(GC, sdma_v6_0_get_reg_offset(adev, i, regSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 0);
494+ if (!amdgpu_sriov_vf(adev))
495+ WREG32_SOC15_IP(GC, sdma_v6_0_get_reg_offset(adev, i, regSDMA0_SEM_WAIT_FAIL_TIMER_CNTL), 0);
563496
564497 /* Set ring buffer size in dwords */
565498 rb_bufsz = order_base_2(ring->ring_size / 4);
@@ -593,7 +526,10 @@ static int sdma_v6_0_gfx_resume(struct amdgpu_device *adev) · 27 unmodified lines
593526 lower_32_bits(ring->rptr_gpu_addr) & 0xFFFFFFFC);
594527
595528 rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_QUEUE0_RB_CNTL, RPTR_WRITEBACK_ENABLE, 1);
596− rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_QUEUE0_RB_CNTL, WPTR_POLL_ENABLE, 0);
529+ if (amdgpu_sriov_vf(adev))
530+ rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_QUEUE0_RB_CNTL, WPTR_POLL_ENABLE, 1);
531+ else
532+ rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_QUEUE0_RB_CNTL, WPTR_POLL_ENABLE, 0);
597533 rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_QUEUE0_RB_CNTL, F32_WPTR_POLL_ENABLE, 1);
598534
599535 WREG32_SOC15_IP(GC, sdma_v6_0_get_reg_offset(adev, i, regSDMA0_QUEUE0_RB_BASE), ring->gpu_addr >> 8);
@@ -1365,19 +1301,16 @@ static int sdma_v6_0_sw_fini(void *handle) · 765 unmodified lines
13651301 for (i = 0; i < adev->sdma.num_instances; i++)
13661302 amdgpu_ring_fini(&adev->sdma.instance[i].ring);
13671303
1368− sdma_v6_0_destroy_inst_ctx(adev);
1304+ amdgpu_sdma_destroy_inst_ctx(adev, true);
13691305
13701306 return 0;
13711307 }
13721308
13731309 static int sdma_v6_0_hw_init(void *handle)
13741310 {
1375− int r;
13761311 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
13771312
1378− r = sdma_v6_0_start(adev);
1379−
1380− return r;
1313+ return sdma_v6_0_start(adev);
13811314 }
13821315
13831316 static int sdma_v6_0_hw_fini(void *handle)
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c+303−0
@@ -0,0 +1,303 @@
1+/*
2+ * Copyright 2021 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+ */
23+
24+#include "sienna_cichlid.h"
25+#include "amdgpu_reset.h"
26+#include "amdgpu_amdkfd.h"
27+#include "amdgpu_dpm.h"
28+#include "amdgpu_job.h"
29+#include "amdgpu_ring.h"
30+#include "amdgpu_ras.h"
31+#include "amdgpu_psp.h"
32+#include "amdgpu_xgmi.h"
33+
34+static struct amdgpu_reset_handler *
35+sienna_cichlid_get_reset_handler(struct amdgpu_reset_control *reset_ctl,
36+ struct amdgpu_reset_context *reset_context)
37+{
38+ struct amdgpu_reset_handler *handler;
39+ struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle;
40+
41+ if (reset_context->method != AMD_RESET_METHOD_NONE) {
42+ list_for_each_entry(handler, &reset_ctl->reset_handlers,
43+ handler_list) {
44+ if (handler->reset_method == reset_context->method)
45+ return handler;
46+ }
47+ } else {
48+ list_for_each_entry(handler, &reset_ctl->reset_handlers,
49+ handler_list) {
50+ if (handler->reset_method == AMD_RESET_METHOD_MODE2 &&
51+ adev->pm.fw_version >= 0x3a5500 &&
52+ !amdgpu_sriov_vf(adev)) {
53+ reset_context->method = AMD_RESET_METHOD_MODE2;
54+ return handler;
55+ }
56+ }
57+ }
58+
59+ return NULL;
60+}
61+
62+static int sienna_cichlid_mode2_suspend_ip(struct amdgpu_device *adev)
63+{
64+ int r, i;
65+
66+ amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
67+ amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
68+
69+ for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
70+ if (!(adev->ip_blocks[i].version->type ==
71+ AMD_IP_BLOCK_TYPE_GFX ||
72+ adev->ip_blocks[i].version->type ==
73+ AMD_IP_BLOCK_TYPE_SDMA))
74+ continue;
75+
76+ r = adev->ip_blocks[i].version->funcs->suspend(adev);
77+
78+ if (r) {
79+ dev_err(adev->dev,
80+ "suspend of IP block <%s> failed %d\n",
81+ adev->ip_blocks[i].version->funcs->name, r);
82+ return r;
83+ }
84+ adev->ip_blocks[i].status.hw = false;
85+ }
86+
87+ return r;
88+}
89+
90+static int
91+sienna_cichlid_mode2_prepare_hwcontext(struct amdgpu_reset_control *reset_ctl,
92+ struct amdgpu_reset_context *reset_context)
93+{
94+ int r = 0;
95+ struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle;
96+
97+ if (!amdgpu_sriov_vf(adev)) {
98+ if (adev->gfxhub.funcs->mode2_save_regs)
99+ adev->gfxhub.funcs->mode2_save_regs(adev);
100+ if (adev->gfxhub.funcs->halt)
101+ adev->gfxhub.funcs->halt(adev);
102+ r = sienna_cichlid_mode2_suspend_ip(adev);
103+ }
104+
105+ return r;
106+}
107+
108+static void sienna_cichlid_async_reset(struct work_struct *work)
109+{
110+ struct amdgpu_reset_handler *handler;
111+ struct amdgpu_reset_control *reset_ctl =
112+ container_of(work, struct amdgpu_reset_control, reset_work);
113+ struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle;
114+
115+ list_for_each_entry(handler, &reset_ctl->reset_handlers,
116+ handler_list) {
117+ if (handler->reset_method == reset_ctl->active_reset) {
118+ dev_dbg(adev->dev, "Resetting device\n");
119+ handler->do_reset(adev);
120+ break;
121+ }
122+ }
123+}
124+
125+static int sienna_cichlid_mode2_reset(struct amdgpu_device *adev)
126+{
127+ /* disable BM */
128+ pci_clear_master(adev->pdev);
129+ return amdgpu_dpm_mode2_reset(adev);
130+}
131+
132+static int
133+sienna_cichlid_mode2_perform_reset(struct amdgpu_reset_control *reset_ctl,
134+ struct amdgpu_reset_context *reset_context)
135+{
136+ struct amdgpu_device *adev = (struct amdgpu_device *)reset_ctl->handle;
137+ int r;
138+
139+ r = sienna_cichlid_mode2_reset(adev);
140+ if (r) {
141+ dev_err(adev->dev,
142+ "ASIC reset failed with error, %d ", r);
143+ }
144+ return r;
145+}
146+
147+static int sienna_cichlid_mode2_restore_ip(struct amdgpu_device *adev)
148+{
149+ int i, r;
150+ struct psp_context *psp = &adev->psp;
151+
152+ r = psp_rlc_autoload_start(psp);
153+ if (r) {
154+ dev_err(adev->dev, "Failed to start rlc autoload\n");
155+ return r;
156+ }
157+
158+ /* Reinit GFXHUB */
159+ if (adev->gfxhub.funcs->mode2_restore_regs)
160+ adev->gfxhub.funcs->mode2_restore_regs(adev);
161+ adev->gfxhub.funcs->init(adev);
162+ r = adev->gfxhub.funcs->gart_enable(adev);
163+ if (r) {
164+ dev_err(adev->dev, "GFXHUB gart reenable failed after reset\n");
165+ return r;
166+ }
167+
168+ for (i = 0; i < adev->num_ip_blocks; i++) {
169+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH) {
170+ r = adev->ip_blocks[i].version->funcs->resume(adev);
171+ if (r) {
172+ dev_err(adev->dev,
173+ "resume of IP block <%s> failed %d\n",
174+ adev->ip_blocks[i].version->funcs->name, r);
175+ return r;
176+ }
177+
178+ adev->ip_blocks[i].status.hw = true;
179+ }
180+ }
181+
182+ for (i = 0; i < adev->num_ip_blocks; i++) {
183+ if (!(adev->ip_blocks[i].version->type ==
184+ AMD_IP_BLOCK_TYPE_GFX ||
185+ adev->ip_blocks[i].version->type ==
186+ AMD_IP_BLOCK_TYPE_SDMA))
187+ continue;
188+ r = adev->ip_blocks[i].version->funcs->resume(adev);
189+ if (r) {
190+ dev_err(adev->dev,
191+ "resume of IP block <%s> failed %d\n",
192+ adev->ip_blocks[i].version->funcs->name, r);
193+ return r;
194+ }
195+
196+ adev->ip_blocks[i].status.hw = true;
197+ }
198+
199+ for (i = 0; i < adev->num_ip_blocks; i++) {
200+ if (!(adev->ip_blocks[i].version->type ==
201+ AMD_IP_BLOCK_TYPE_GFX ||
202+ adev->ip_blocks[i].version->type ==
203+ AMD_IP_BLOCK_TYPE_SDMA))
204+ continue;
205+
206+ if (adev->ip_blocks[i].version->funcs->late_init) {
207+ r = adev->ip_blocks[i].version->funcs->late_init(
208+ (void *)adev);
209+ if (r) {
210+ dev_err(adev->dev,
211+ "late_init of IP block <%s> failed %d after reset\n",
212+ adev->ip_blocks[i].version->funcs->name,
213+ r);
214+ return r;
215+ }
216+ }
217+ adev->ip_blocks[i].status.late_initialized = true;
218+ }
219+
220+ amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
221+ amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE);
222+
223+ return r;
224+}
225+
226+static int
227+sienna_cichlid_mode2_restore_hwcontext(struct amdgpu_reset_control *reset_ctl,
228+ struct amdgpu_reset_context *reset_context)
229+{
230+ int r;
231+ struct amdgpu_device *tmp_adev = (struct amdgpu_device *)reset_ctl->handle;
232+
233+ dev_info(tmp_adev->dev,
234+ "GPU reset succeeded, trying to resume\n");
235+ r = sienna_cichlid_mode2_restore_ip(tmp_adev);
236+ if (r)
237+ goto end;
238+
239+ /*
240+ * Add this ASIC as tracked as reset was already
241+ * complete successfully.
242+ */
243+ amdgpu_register_gpu_instance(tmp_adev);
244+
245+ /* Resume RAS */
246+ amdgpu_ras_resume(tmp_adev);
247+
248+ amdgpu_irq_gpu_reset_resume_helper(tmp_adev);
249+
250+ r = amdgpu_ib_ring_tests(tmp_adev);
251+ if (r) {
252+ dev_err(tmp_adev->dev,
253+ "ib ring test failed (%d).\n", r);
254+ r = -EAGAIN;
255+ goto end;
256+ }
257+
258+end:
259+ if (r)
260+ return -EAGAIN;
261+ else
262+ return r;
263+}
264+
265+static struct amdgpu_reset_handler sienna_cichlid_mode2_handler = {
266+ .reset_method = AMD_RESET_METHOD_MODE2,
267+ .prepare_env = NULL,
268+ .prepare_hwcontext = sienna_cichlid_mode2_prepare_hwcontext,
269+ .perform_reset = sienna_cichlid_mode2_perform_reset,
270+ .restore_hwcontext = sienna_cichlid_mode2_restore_hwcontext,
271+ .restore_env = NULL,
272+ .do_reset = sienna_cichlid_mode2_reset,
273+};
274+
275+int sienna_cichlid_reset_init(struct amdgpu_device *adev)
276+{
277+ struct amdgpu_reset_control *reset_ctl;
278+
279+ reset_ctl = kzalloc(sizeof(*reset_ctl), GFP_KERNEL);
280+ if (!reset_ctl)
281+ return -ENOMEM;
282+
283+ reset_ctl->handle = adev;
284+ reset_ctl->async_reset = sienna_cichlid_async_reset;
285+ reset_ctl->active_reset = AMD_RESET_METHOD_NONE;
286+ reset_ctl->get_reset_handler = sienna_cichlid_get_reset_handler;
287+
288+ INIT_LIST_HEAD(&reset_ctl->reset_handlers);
289+ INIT_WORK(&reset_ctl->reset_work, reset_ctl->async_reset);
290+ /* Only mode2 is handled through reset control now */
291+ amdgpu_reset_add_handler(reset_ctl, &sienna_cichlid_mode2_handler);
292+
293+ adev->reset_cntl = reset_ctl;
294+
295+ return 0;
296+}
297+
298+int sienna_cichlid_reset_fini(struct amdgpu_device *adev)
299+{
300+ kfree(adev->reset_cntl);
301+ adev->reset_cntl = NULL;
302+ return 0;
303+}
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.hrenamed from drivers/gpu/drm/amd/display/dc/inc/dml_wrapper.h+6−8
@@ -1,5 +1,5 @@
11 /*
2− * Copyright 2015 Advanced Micro Devices, Inc.
2+ * Copyright 2021 Advanced Micro Devices, Inc.
33 *
44 * Permission is hereby granted, free of charge, to any person obtaining a
55 * copy of this software and associated documentation files (the "Software"),
@@ -19,16 +19,14 @@ · 13 unmodified lines
1919 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020 * OTHER DEALINGS IN THE SOFTWARE.
2121 *
22− * Authors: AMD
23− *
2422 */
2523
26−#ifndef DML_WRAPPER_H_
27−#define DML_WRAPPER_H_
24+#ifndef __SIENNA_CICHLID_H__
25+#define __SIENNA_CICHLID_H__
2826
29−#include "dc.h"
30−#include "dml/display_mode_vba.h"
27+#include "amdgpu.h"
3128
32−bool dml_validate(struct dc *dc, struct dc_state *context, bool fast_validate);
29+int sienna_cichlid_reset_init(struct amdgpu_device *adev);
30+int sienna_cichlid_reset_fini(struct amdgpu_device *adev);
3331
3432 #endif
drivers/gpu/drm/amd/amdgpu/soc21.c+18−1
@@ -179,7 +179,7 @@ void soc21_grbm_select(struct amdgpu_device *adev, · 178 unmodified lines
179179 grbm_gfx_cntl = REG_SET_FIELD(grbm_gfx_cntl, GRBM_GFX_CNTL, VMID, vmid);
180180 grbm_gfx_cntl = REG_SET_FIELD(grbm_gfx_cntl, GRBM_GFX_CNTL, QUEUEID, queue);
181181
182− WREG32(SOC15_REG_OFFSET(GC, 0, regGRBM_GFX_CNTL), grbm_gfx_cntl);
182+ WREG32_SOC15(GC, 0, regGRBM_GFX_CNTL, grbm_gfx_cntl);
183183 }
184184
185185 static void soc21_vga_set_state(struct amdgpu_device *adev, bool state)
@@ -583,6 +583,10 @@ static int soc21_common_early_init(void *handle) · 397 unmodified lines
583583 AMD_PG_SUPPORT_JPEG |
584584 AMD_PG_SUPPORT_ATHUB |
585585 AMD_PG_SUPPORT_MMHUB;
586+ if (amdgpu_sriov_vf(adev)) {
587+ adev->cg_flags = 0;
588+ adev->pg_flags = 0;
589+ }
586590 adev->external_rev_id = adev->rev_id + 0x1; // TODO: need update
587591 break;
588592 case IP_VERSION(11, 0, 2):
@@ -629,6 +633,19 @@ static int soc21_common_early_init(void *handle) · 40 unmodified lines
629633 AMD_PG_SUPPORT_JPEG;
630634 adev->external_rev_id = adev->rev_id + 0x1;
631635 break;
636+ case IP_VERSION(11, 0, 3):
637+ adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
638+ AMD_CG_SUPPORT_JPEG_MGCG;
639+ adev->pg_flags = AMD_PG_SUPPORT_VCN |
640+ AMD_PG_SUPPORT_VCN_DPG |
641+ AMD_PG_SUPPORT_JPEG;
642+ if (amdgpu_sriov_vf(adev)) {
643+ /* hypervisor control CG and PG enablement */
644+ adev->cg_flags = 0;
645+ adev->pg_flags = 0;
646+ }
647+ adev->external_rev_id = adev->rev_id + 0x20;
648+ break;
632649 default:
633650 /* FIXME: not supported yet */
634651 return -EINVAL;
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c+33−25
@@ -452,41 +452,47 @@ static void umc_v6_7_query_ras_error_count(struct amdgpu_device *adev, · 451 unmodified lines
452452
453453 static void umc_v6_7_query_error_address(struct amdgpu_device *adev,
454454 struct ras_err_data *err_data,
455− uint32_t umc_reg_offset,
456− uint32_t ch_inst,
457− uint32_t umc_inst)
455+ uint32_t umc_reg_offset, uint32_t ch_inst,
456+ uint32_t umc_inst, uint64_t mca_addr)
458457 {
459458 uint32_t mc_umc_status_addr;
460459 uint32_t channel_index;
461− uint64_t mc_umc_status, mc_umc_addrt0;
460+ uint64_t mc_umc_status = 0, mc_umc_addrt0;
462461 uint64_t err_addr, soc_pa, retired_page, column;
463462
464− mc_umc_status_addr =
465− SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_STATUST0);
466− mc_umc_addrt0 =
467− SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_ADDRT0);
463+ if (mca_addr == UMC_INVALID_ADDR) {
464+ mc_umc_status_addr =
465+ SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_STATUST0);
466+ mc_umc_addrt0 =
467+ SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_ADDRT0);
468468
469− mc_umc_status = RREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4);
469+ mc_umc_status = RREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4);
470470
471− if (mc_umc_status == 0)
472− return;
471+ if (mc_umc_status == 0)
472+ return;
473473
474− if (!err_data->err_addr) {
475− /* clear umc status */
476− WREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4, 0x0ULL);
477− return;
474+ if (!err_data->err_addr) {
475+ /* clear umc status */
476+ WREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4, 0x0ULL);
477+ return;
478+ }
478479 }
479480
480481 channel_index =
481482 adev->umc.channel_idx_tbl[umc_inst * adev->umc.channel_inst_num + ch_inst];
482483
483484 /* calculate error address if ue/ce error is detected */
484− if (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&
485+ if ((REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&
485486 (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UECC) == 1 ||
486− REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)) {
487−
488− err_addr = RREG64_PCIE((mc_umc_addrt0 + umc_reg_offset) * 4);
489− err_addr = REG_GET_FIELD(err_addr, MCA_UMC_UMC0_MCUMC_ADDRT0, ErrorAddr);
487+ REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)) ||
488+ mca_addr != UMC_INVALID_ADDR) {
489+ if (mca_addr == UMC_INVALID_ADDR) {
490+ err_addr = RREG64_PCIE((mc_umc_addrt0 + umc_reg_offset) * 4);
491+ err_addr =
492+ REG_GET_FIELD(err_addr, MCA_UMC_UMC0_MCUMC_ADDRT0, ErrorAddr);
493+ } else {
494+ err_addr = mca_addr;
495+ }
490496
491497 /* translate umc channel address to soc pa, 3 parts are included */
492498 soc_pa = ADDR_OF_8KB_BLOCK(err_addr) |
@@ -501,7 +507,8 @@ static void umc_v6_7_query_error_address(struct amdgpu_device *adev, · 8 unmodified lines
501507
502508 /* we only save ue error information currently, ce is skipped */
503509 if (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, UECC)
504− == 1) {
510+ == 1 ||
511+ mca_addr != UMC_INVALID_ADDR) {
505512 /* loop for all possibilities of [C4 C3 C2] */
506513 for (column = 0; column < UMC_V6_7_NA_MAP_PA_NUM; column++) {
507514 retired_page = soc_pa | (column << UMC_V6_7_PA_C2_BIT);
@@ -519,7 +526,8 @@ static void umc_v6_7_query_error_address(struct amdgpu_device *adev, · 11 unmodified lines
519526 }
520527
521528 /* clear umc status */
522− WREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4, 0x0ULL);
529+ if (mca_addr == UMC_INVALID_ADDR)
530+ WREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4, 0x0ULL);
523531 }
524532
525533 static void umc_v6_7_query_ras_error_address(struct amdgpu_device *adev,
@@ -540,9 +548,8 @@ static void umc_v6_7_query_ras_error_address(struct amdgpu_device *adev, · 14 unmodified lines
540548 ch_inst);
541549 umc_v6_7_query_error_address(adev,
542550 err_data,
543− umc_reg_offset,
544− ch_inst,
545− umc_inst);
551+ umc_reg_offset, ch_inst,
552+ umc_inst, UMC_INVALID_ADDR);
546553 }
547554 }
548555
@@ -583,4 +590,5 @@ struct amdgpu_umc_ras umc_v6_7_ras = { · 34 unmodified lines
583590 .query_ras_poison_mode = umc_v6_7_query_ras_poison_mode,
584591 .ecc_info_query_ras_error_count = umc_v6_7_ecc_info_query_ras_error_count,
585592 .ecc_info_query_ras_error_address = umc_v6_7_ecc_info_query_ras_error_address,
593+ .convert_ras_error_address = umc_v6_7_query_error_address,
586594 };
drivers/gpu/drm/amd/amdgpu/umc_v8_10.c+3−9
@@ -101,22 +101,16 @@ static void umc_v8_10_query_correctable_error_count(struct amdgpu_device *adev, · 100 unmodified lines
101101 uint32_t umc_reg_offset,
102102 unsigned long *error_count)
103103 {
104− uint32_t ecc_err_cnt, ecc_err_cnt_addr;
105104 uint64_t mc_umc_status;
106105 uint32_t mc_umc_status_addr;
107106
108107 /* UMC 8_10 registers */
109− ecc_err_cnt_addr =
110− SOC15_REG_OFFSET(UMC, 0, regUMCCH0_0_GeccErrCnt);
111108 mc_umc_status_addr =
112109 SOC15_REG_OFFSET(UMC, 0, regMCA_UMC_UMC0_MCUMC_STATUST0);
113110
114− ecc_err_cnt = RREG32_PCIE((ecc_err_cnt_addr + umc_reg_offset) * 4);
115− *error_count +=
116− (REG_GET_FIELD(ecc_err_cnt, UMCCH0_0_GeccErrCnt, GeccErrCnt) -
117− UMC_V8_10_CE_CNT_INIT);
118−
119− /* Check for SRAM correctable error, MCUMC_STATUS is a 64 bit register */
111+ /* Rely on MCUMC_STATUS for correctable error counter
112+ * MCUMC_STATUS is a 64 bit register
113+ */
120114 mc_umc_status = RREG64_PCIE((mc_umc_status_addr + umc_reg_offset) * 4);
121115 if (REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, Val) == 1 &&
122116 REG_GET_FIELD(mc_umc_status, MCA_UMC_UMC0_MCUMC_STATUST0, CECC) == 1)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c+10−7
@@ -1761,21 +1761,23 @@ static const struct amdgpu_ring_funcs vcn_v3_0_dec_sw_ring_vm_funcs = { · 1760 unmodified lines
17611761 .emit_reg_write_reg_wait = amdgpu_ring_emit_reg_write_reg_wait_helper,
17621762 };
17631763
1764−static int vcn_v3_0_limit_sched(struct amdgpu_cs_parser *p)
1764+static int vcn_v3_0_limit_sched(struct amdgpu_cs_parser *p,
1765+ struct amdgpu_job *job)
17651766 {
17661767 struct drm_gpu_scheduler **scheds;
17671768
17681769 /* The create msg must be in the first IB submitted */
1769− if (atomic_read(&p->entity->fence_seq))
1770+ if (atomic_read(&job->base.entity->fence_seq))
17701771 return -EINVAL;
17711772
17721773 scheds = p->adev->gpu_sched[AMDGPU_HW_IP_VCN_DEC]
17731774 [AMDGPU_RING_PRIO_DEFAULT].sched;
1774− drm_sched_entity_modify_sched(p->entity, scheds, 1);
1775+ drm_sched_entity_modify_sched(job->base.entity, scheds, 1);
17751776 return 0;
17761777 }
17771778
1778−static int vcn_v3_0_dec_msg(struct amdgpu_cs_parser *p, uint64_t addr)
1779+static int vcn_v3_0_dec_msg(struct amdgpu_cs_parser *p, struct amdgpu_job *job,
1780+ uint64_t addr)
17791781 {
17801782 struct ttm_operation_ctx ctx = { false, false };
17811783 struct amdgpu_bo_va_mapping *map;
@@ -1846,7 +1848,7 @@ static int vcn_v3_0_dec_msg(struct amdgpu_cs_parser *p, uint64_t addr) · 64 unmodified lines
18461848 if (create[0] == 0x7 || create[0] == 0x10 || create[0] == 0x11)
18471849 continue;
18481850
1849− r = vcn_v3_0_limit_sched(p);
1851+ r = vcn_v3_0_limit_sched(p, job);
18501852 if (r)
18511853 goto out;
18521854 }
@@ -1860,7 +1862,7 @@ static int vcn_v3_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p, · 7 unmodified lines
18601862 struct amdgpu_job *job,
18611863 struct amdgpu_ib *ib)
18621864 {
1863− struct amdgpu_ring *ring = to_amdgpu_ring(p->entity->rq->sched);
1865+ struct amdgpu_ring *ring = amdgpu_job_ring(job);
18641866 uint32_t msg_lo = 0, msg_hi = 0;
18651867 unsigned i;
18661868 int r;
@@ -1879,7 +1881,8 @@ static int vcn_v3_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p, · 12 unmodified lines
18791881 msg_hi = val;
18801882 } else if (reg == PACKET0(p->adev->vcn.internal.cmd, 0) &&
18811883 val == 0) {
1882− r = vcn_v3_0_dec_msg(p, ((u64)msg_hi) << 32 | msg_lo);
1884+ r = vcn_v3_0_dec_msg(p, job,
1885+ ((u64)msg_hi) << 32 | msg_lo);
18831886 if (r)
18841887 return r;
18851888 }
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c+312−31
@@ -30,6 +30,7 @@ · 29 unmodified lines
3030 #include "soc15d.h"
3131 #include "soc15_hw_ip.h"
3232 #include "vcn_v2_0.h"
33+#include "mmsch_v4_0.h"
3334
3435 #include "vcn/vcn_4_0_0_offset.h"
3536 #include "vcn/vcn_4_0_0_sh_mask.h"
@@ -45,6 +46,8 @@ · 9 unmodified lines
4546 #define VCN_VID_SOC_ADDRESS_2_0 0x1fb00
4647 #define VCN1_VID_SOC_ADDRESS_3_0 0x48300
4748
49+#define VCN_HARVEST_MMSCH 0
50+
4851 #define RDECODE_MSG_CREATE 0x00000000
4952 #define RDECODE_MESSAGE_CREATE 0x00000001
5053
@@ -53,12 +56,14 @@ static int amdgpu_ih_clientid_vcns[] = { · 2 unmodified lines
5356 SOC15_IH_CLIENTID_VCN1
5457 };
5558
59+static int vcn_v4_0_start_sriov(struct amdgpu_device *adev);
5660 static void vcn_v4_0_set_unified_ring_funcs(struct amdgpu_device *adev);
5761 static void vcn_v4_0_set_irq_funcs(struct amdgpu_device *adev);
5862 static int vcn_v4_0_set_powergating_state(void *handle,
5963 enum amd_powergating_state state);
6064 static int vcn_v4_0_pause_dpg_mode(struct amdgpu_device *adev,
6165 int inst_idx, struct dpg_pause_state *new_state);
66+static void vcn_v4_0_unified_ring_set_wptr(struct amdgpu_ring *ring);
6267
6368 /**
6469 * vcn_v4_0_early_init - set function pointers
@@ -71,6 +76,9 @@ static int vcn_v4_0_early_init(void *handle) · 6 unmodified lines
7176 {
7277 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7378
79+ if (amdgpu_sriov_vf(adev))
80+ adev->vcn.harvest_config = VCN_HARVEST_MMSCH;
81+
7482 /* re-use enc ring as unified ring */
7583 adev->vcn.num_enc_rings = 1;
7684
@@ -92,6 +100,7 @@ static int vcn_v4_0_sw_init(void *handle) · 15 unmodified lines
92100 struct amdgpu_ring *ring;
93101 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
94102 int i, r;
103+ int vcn_doorbell_index = 0;
95104
96105 r = amdgpu_vcn_sw_init(adev);
97106 if (r)
@@ -103,6 +112,12 @@ static int vcn_v4_0_sw_init(void *handle) · 5 unmodified lines
103112 if (r)
104113 return r;
105114
115+ if (amdgpu_sriov_vf(adev)) {
116+ vcn_doorbell_index = adev->doorbell_index.vcn.vcn_ring0_1 - MMSCH_DOORBELL_OFFSET;
117+ /* get DWORD offset */
118+ vcn_doorbell_index = vcn_doorbell_index << 1;
119+ }
120+
106121 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
107122 volatile struct amdgpu_vcn4_fw_shared *fw_shared;
108123
@@ -119,7 +134,10 @@ static int vcn_v4_0_sw_init(void *handle) · 10 unmodified lines
119134
120135 ring = &adev->vcn.inst[i].ring_enc[0];
121136 ring->use_doorbell = true;
122− ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 2 + 8 * i;
137+ if (amdgpu_sriov_vf(adev))
138+ ring->doorbell_index = vcn_doorbell_index + i * (adev->vcn.num_enc_rings + 1) + 1;
139+ else
140+ ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 2 + 8 * i;
123141
124142 sprintf(ring->name, "vcn_unified_%d", i);
125143
@@ -132,10 +150,23 @@ static int vcn_v4_0_sw_init(void *handle) · 6 unmodified lines
132150 fw_shared->present_flag_0 = cpu_to_le32(AMDGPU_FW_SHARED_FLAG_0_UNIFIED_QUEUE);
133151 fw_shared->sq.is_enabled = 1;
134152
153+ fw_shared->present_flag_0 |= cpu_to_le32(AMDGPU_VCN_SMU_DPM_INTERFACE_FLAG);
154+ fw_shared->smu_dpm_interface.smu_interface_type = (adev->flags & AMD_IS_APU) ?
155+ AMDGPU_VCN_SMU_DPM_INTERFACE_APU : AMDGPU_VCN_SMU_DPM_INTERFACE_DGPU;
156+
157+ if (amdgpu_sriov_vf(adev))
158+ fw_shared->present_flag_0 |= cpu_to_le32(AMDGPU_VCN_VF_RB_SETUP_FLAG);
159+
135160 if (amdgpu_vcnfw_log)
136161 amdgpu_vcn_fwlog_init(&adev->vcn.inst[i]);
137162 }
138163
164+ if (amdgpu_sriov_vf(adev)) {
165+ r = amdgpu_virt_alloc_mm_table(adev);
166+ if (r)
167+ return r;
168+ }
169+
139170 if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG)
140171 adev->vcn.pause_dpg_mode = vcn_v4_0_pause_dpg_mode;
141172
@@ -169,6 +200,9 @@ static int vcn_v4_0_sw_fini(void *handle) · 27 unmodified lines
169200 drm_dev_exit(idx);
170201 }
171202
203+ if (amdgpu_sriov_vf(adev))
204+ amdgpu_virt_free_mm_table(adev);
205+
172206 r = amdgpu_vcn_suspend(adev);
173207 if (r)
174208 return r;
@@ -191,18 +225,42 @@ static int vcn_v4_0_hw_init(void *handle) · 16 unmodified lines
191225 struct amdgpu_ring *ring;
192226 int i, r;
193227
194− for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
195− if (adev->vcn.harvest_config & (1 << i))
196− continue;
228+ if (amdgpu_sriov_vf(adev)) {
229+ r = vcn_v4_0_start_sriov(adev);
230+ if (r)
231+ goto done;
197232
198− ring = &adev->vcn.inst[i].ring_enc[0];
233+ for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
234+ if (adev->vcn.harvest_config & (1 << i))
235+ continue;
199236
200− adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
201− ((adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 8 * i), i);
237+ ring = &adev->vcn.inst[i].ring_enc[0];
238+ if (amdgpu_vcn_is_disabled_vcn(adev, VCN_ENCODE_RING, i)) {
239+ ring->sched.ready = false;
240+ ring->no_scheduler = true;
241+ dev_info(adev->dev, "ring %s is disabled by hypervisor\n", ring->name);
242+ } else {
243+ ring->wptr = 0;
244+ ring->wptr_old = 0;
245+ vcn_v4_0_unified_ring_set_wptr(ring);
246+ ring->sched.ready = true;
247+ }
248+ }
249+ } else {
250+ for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
251+ if (adev->vcn.harvest_config & (1 << i))
252+ continue;
202253
203− r = amdgpu_ring_test_helper(ring);
204− if (r)
205− goto done;
254+ ring = &adev->vcn.inst[i].ring_enc[0];
255+
256+ adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
257+ ((adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 8 * i), i);
258+
259+ r = amdgpu_ring_test_helper(ring);
260+ if (r)
261+ goto done;
262+
263+ }
206264 }
207265
208266 done:
@@ -230,12 +288,14 @@ static int vcn_v4_0_hw_fini(void *handle) · 21 unmodified lines
230288 for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
231289 if (adev->vcn.harvest_config & (1 << i))
232290 continue;
233−
234− if ((adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ||
291+ if (!amdgpu_sriov_vf(adev)) {
292+ if ((adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ||
235293 (adev->vcn.cur_state != AMD_PG_STATE_GATE &&
236294 RREG32_SOC15(VCN, i, regUVD_STATUS))) {
237295 vcn_v4_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
296+ }
238297 }
298+
239299 }
240300
241301 return 0;
@@ -1107,6 +1167,214 @@ static int vcn_v4_0_start(struct amdgpu_device *adev) · 865 unmodified lines
11071167 return 0;
11081168 }
11091169
1170+static int vcn_v4_0_start_sriov(struct amdgpu_device *adev)
1171+{
1172+ int i;
1173+ struct amdgpu_ring *ring_enc;
1174+ uint64_t cache_addr;
1175+ uint64_t rb_enc_addr;
1176+ uint64_t ctx_addr;
1177+ uint32_t param, resp, expected;
1178+ uint32_t offset, cache_size;
1179+ uint32_t tmp, timeout;
1180+
1181+ struct amdgpu_mm_table *table = &adev->virt.mm_table;
1182+ uint32_t *table_loc;
1183+ uint32_t table_size;
1184+ uint32_t size, size_dw;
1185+ uint32_t init_status;
1186+ uint32_t enabled_vcn;
1187+
1188+ struct mmsch_v4_0_cmd_direct_write
1189+ direct_wt = { {0} };
1190+ struct mmsch_v4_0_cmd_direct_read_modify_write
1191+ direct_rd_mod_wt = { {0} };
1192+ struct mmsch_v4_0_cmd_end end = { {0} };
1193+ struct mmsch_v4_0_init_header header;
1194+
1195+ volatile struct amdgpu_vcn4_fw_shared *fw_shared;
1196+ volatile struct amdgpu_fw_shared_rb_setup *rb_setup;
1197+
1198+ direct_wt.cmd_header.command_type =
1199+ MMSCH_COMMAND__DIRECT_REG_WRITE;
1200+ direct_rd_mod_wt.cmd_header.command_type =
1201+ MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE;
1202+ end.cmd_header.command_type =
1203+ MMSCH_COMMAND__END;
1204+
1205+ header.version = MMSCH_VERSION;
1206+ header.total_size = sizeof(struct mmsch_v4_0_init_header) >> 2;
1207+ for (i = 0; i < AMDGPU_MAX_VCN_INSTANCES; i++) {
1208+ header.inst[i].init_status = 0;
1209+ header.inst[i].table_offset = 0;
1210+ header.inst[i].table_size = 0;
1211+ }
1212+
1213+ table_loc = (uint32_t *)table->cpu_addr;
1214+ table_loc += header.total_size;
1215+ for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
1216+ if (adev->vcn.harvest_config & (1 << i))
1217+ continue;
1218+
1219+ table_size = 0;
1220+
1221+ MMSCH_V4_0_INSERT_DIRECT_RD_MOD_WT(SOC15_REG_OFFSET(VCN, i,
1222+ regUVD_STATUS),
1223+ ~UVD_STATUS__UVD_BUSY, UVD_STATUS__UVD_BUSY);
1224+
1225+ cache_size = AMDGPU_GPU_PAGE_ALIGN(adev->vcn.fw->size + 4);
1226+
1227+ if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1228+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1229+ regUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
1230+ adev->firmware.ucode[AMDGPU_UCODE_ID_VCN + i].tmr_mc_addr_lo);
1231+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1232+ regUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),
1233+ adev->firmware.ucode[AMDGPU_UCODE_ID_VCN + i].tmr_mc_addr_hi);
1234+ offset = 0;
1235+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1236+ regUVD_VCPU_CACHE_OFFSET0),
1237+ 0);
1238+ } else {
1239+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1240+ regUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
1241+ lower_32_bits(adev->vcn.inst[i].gpu_addr));
1242+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1243+ regUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),
1244+ upper_32_bits(adev->vcn.inst[i].gpu_addr));
1245+ offset = cache_size;
1246+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1247+ regUVD_VCPU_CACHE_OFFSET0),
1248+ AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
1249+ }
1250+
1251+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1252+ regUVD_VCPU_CACHE_SIZE0),
1253+ cache_size);
1254+
1255+ cache_addr = adev->vcn.inst[i].gpu_addr + offset;
1256+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1257+ regUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW),
1258+ lower_32_bits(cache_addr));
1259+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1260+ regUVD_LMI_VCPU_CACHE1_64BIT_BAR_HIGH),
1261+ upper_32_bits(cache_addr));
1262+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1263+ regUVD_VCPU_CACHE_OFFSET1),
1264+ 0);
1265+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1266+ regUVD_VCPU_CACHE_SIZE1),
1267+ AMDGPU_VCN_STACK_SIZE);
1268+
1269+ cache_addr = adev->vcn.inst[i].gpu_addr + offset +
1270+ AMDGPU_VCN_STACK_SIZE;
1271+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1272+ regUVD_LMI_VCPU_CACHE2_64BIT_BAR_LOW),
1273+ lower_32_bits(cache_addr));
1274+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1275+ regUVD_LMI_VCPU_CACHE2_64BIT_BAR_HIGH),
1276+ upper_32_bits(cache_addr));
1277+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1278+ regUVD_VCPU_CACHE_OFFSET2),
1279+ 0);
1280+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1281+ regUVD_VCPU_CACHE_SIZE2),
1282+ AMDGPU_VCN_CONTEXT_SIZE);
1283+
1284+ fw_shared = adev->vcn.inst[i].fw_shared.cpu_addr;
1285+ rb_setup = &fw_shared->rb_setup;
1286+
1287+ ring_enc = &adev->vcn.inst[i].ring_enc[0];
1288+ ring_enc->wptr = 0;
1289+ rb_enc_addr = ring_enc->gpu_addr;
1290+
1291+ rb_setup->is_rb_enabled_flags |= RB_ENABLED;
1292+ rb_setup->rb_addr_lo = lower_32_bits(rb_enc_addr);
1293+ rb_setup->rb_addr_hi = upper_32_bits(rb_enc_addr);
1294+ rb_setup->rb_size = ring_enc->ring_size / 4;
1295+ fw_shared->present_flag_0 |= cpu_to_le32(AMDGPU_VCN_VF_RB_SETUP_FLAG);
1296+
1297+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1298+ regUVD_LMI_VCPU_NC0_64BIT_BAR_LOW),
1299+ lower_32_bits(adev->vcn.inst[i].fw_shared.gpu_addr));
1300+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1301+ regUVD_LMI_VCPU_NC0_64BIT_BAR_HIGH),
1302+ upper_32_bits(adev->vcn.inst[i].fw_shared.gpu_addr));
1303+ MMSCH_V4_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1304+ regUVD_VCPU_NONCACHE_SIZE0),
1305+ AMDGPU_GPU_PAGE_ALIGN(sizeof(struct amdgpu_vcn4_fw_shared)));
1306+
1307+ /* add end packet */
1308+ MMSCH_V4_0_INSERT_END();
1309+
1310+ /* refine header */
1311+ header.inst[i].init_status = 0;
1312+ header.inst[i].table_offset = header.total_size;
1313+ header.inst[i].table_size = table_size;
1314+ header.total_size += table_size;
1315+ }
1316+
1317+ /* Update init table header in memory */
1318+ size = sizeof(struct mmsch_v4_0_init_header);
1319+ table_loc = (uint32_t *)table->cpu_addr;
1320+ memcpy((void *)table_loc, &header, size);
1321+
1322+ /* message MMSCH (in VCN[0]) to initialize this client
1323+ * 1, write to mmsch_vf_ctx_addr_lo/hi register with GPU mc addr
1324+ * of memory descriptor location
1325+ */
1326+ ctx_addr = table->gpu_addr;
1327+ WREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_ADDR_LO, lower_32_bits(ctx_addr));
1328+ WREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_ADDR_HI, upper_32_bits(ctx_addr));
1329+
1330+ /* 2, update vmid of descriptor */
1331+ tmp = RREG32_SOC15(VCN, 0, regMMSCH_VF_VMID);
1332+ tmp &= ~MMSCH_VF_VMID__VF_CTX_VMID_MASK;
1333+ /* use domain0 for MM scheduler */
1334+ tmp |= (0 << MMSCH_VF_VMID__VF_CTX_VMID__SHIFT);
1335+ WREG32_SOC15(VCN, 0, regMMSCH_VF_VMID, tmp);
1336+
1337+ /* 3, notify mmsch about the size of this descriptor */
1338+ size = header.total_size;
1339+ WREG32_SOC15(VCN, 0, regMMSCH_VF_CTX_SIZE, size);
1340+
1341+ /* 4, set resp to zero */
1342+ WREG32_SOC15(VCN, 0, regMMSCH_VF_MAILBOX_RESP, 0);
1343+
1344+ /* 5, kick off the initialization and wait until
1345+ * MMSCH_VF_MAILBOX_RESP becomes non-zero
1346+ */
1347+ param = 0x00000001;
1348+ WREG32_SOC15(VCN, 0, regMMSCH_VF_MAILBOX_HOST, param);
1349+ tmp = 0;
1350+ timeout = 1000;
1351+ resp = 0;
1352+ expected = MMSCH_VF_MAILBOX_RESP__OK;
1353+ while (resp != expected) {
1354+ resp = RREG32_SOC15(VCN, 0, regMMSCH_VF_MAILBOX_RESP);
1355+ if (resp != 0)
1356+ break;
1357+
1358+ udelay(10);
1359+ tmp = tmp + 10;
1360+ if (tmp >= timeout) {
1361+ DRM_ERROR("failed to init MMSCH. TIME-OUT after %d usec"\
1362+ " waiting for regMMSCH_VF_MAILBOX_RESP "\
1363+ "(expected=0x%08x, readback=0x%08x)\n",
1364+ tmp, expected, resp);
1365+ return -EBUSY;
1366+ }
1367+ }
1368+ enabled_vcn = amdgpu_vcn_is_disabled_vcn(adev, VCN_DECODE_RING, 0) ? 1 : 0;
1369+ init_status = ((struct mmsch_v4_0_init_header *)(table_loc))->inst[enabled_vcn].init_status;
1370+ if (resp != expected && resp != MMSCH_VF_MAILBOX_RESP__INCOMPLETE
1371+ && init_status != MMSCH_VF_ENGINE_STATUS__PASS)
1372+ DRM_ERROR("MMSCH init status is incorrect! readback=0x%08x, header init "\
1373+ "status for VCN%x: 0x%x\n", resp, enabled_vcn, init_status);
1374+
1375+ return 0;
1376+}
1377+
11101378 /**
11111379 * vcn_v4_0_stop_dpg_mode - VCN stop with dpg mode
11121380 *
@@ -1327,21 +1595,23 @@ static void vcn_v4_0_unified_ring_set_wptr(struct amdgpu_ring *ring) · 214 unmodified lines
13271595 }
13281596 }
13291597
1330−static int vcn_v4_0_limit_sched(struct amdgpu_cs_parser *p)
1598+static int vcn_v4_0_limit_sched(struct amdgpu_cs_parser *p,
1599+ struct amdgpu_job *job)
13311600 {
13321601 struct drm_gpu_scheduler **scheds;
13331602
13341603 /* The create msg must be in the first IB submitted */
1335− if (atomic_read(&p->entity->fence_seq))
1604+ if (atomic_read(&job->base.entity->fence_seq))
13361605 return -EINVAL;
13371606
13381607 scheds = p->adev->gpu_sched[AMDGPU_HW_IP_VCN_ENC]
13391608 [AMDGPU_RING_PRIO_0].sched;
1340− drm_sched_entity_modify_sched(p->entity, scheds, 1);
1609+ drm_sched_entity_modify_sched(job->base.entity, scheds, 1);
13411610 return 0;
13421611 }
13431612
1344−static int vcn_v4_0_dec_msg(struct amdgpu_cs_parser *p, uint64_t addr)
1613+static int vcn_v4_0_dec_msg(struct amdgpu_cs_parser *p, struct amdgpu_job *job,
1614+ uint64_t addr)
13451615 {
13461616 struct ttm_operation_ctx ctx = { false, false };
13471617 struct amdgpu_bo_va_mapping *map;
@@ -1412,7 +1682,7 @@ static int vcn_v4_0_dec_msg(struct amdgpu_cs_parser *p, uint64_t addr) · 64 unmodified lines
14121682 if (create[0] == 0x7 || create[0] == 0x10 || create[0] == 0x11)
14131683 continue;
14141684
1415− r = vcn_v4_0_limit_sched(p);
1685+ r = vcn_v4_0_limit_sched(p, job);
14161686 if (r)
14171687 goto out;
14181688 }
@@ -1425,32 +1695,34 @@ out: · 6 unmodified lines
14251695 #define RADEON_VCN_ENGINE_TYPE_DECODE (0x00000003)
14261696
14271697 static int vcn_v4_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p,
1428− struct amdgpu_job *job,
1429− struct amdgpu_ib *ib)
1698+ struct amdgpu_job *job,
1699+ struct amdgpu_ib *ib)
14301700 {
1431− struct amdgpu_ring *ring = to_amdgpu_ring(p->entity->rq->sched);
1432− struct amdgpu_vcn_decode_buffer *decode_buffer = NULL;
1701+ struct amdgpu_ring *ring = amdgpu_job_ring(job);
1702+ struct amdgpu_vcn_decode_buffer *decode_buffer;
1703+ uint64_t addr;
14331704 uint32_t val;
1434− int r = 0;
14351705
14361706 /* The first instance can decode anything */
14371707 if (!ring->me)
1438− return r;
1708+ return 0;
14391709
14401710 /* unified queue ib header has 8 double words. */
14411711 if (ib->length_dw < 8)
1442− return r;
1712+ return 0;
14431713
14441714 val = amdgpu_ib_get_value(ib, 6); //RADEON_VCN_ENGINE_TYPE
1715+ if (val != RADEON_VCN_ENGINE_TYPE_DECODE)
1716+ return 0;
14451717
1446− if (val == RADEON_VCN_ENGINE_TYPE_DECODE) {
1447− decode_buffer = (struct amdgpu_vcn_decode_buffer *)&ib->ptr[10];
1718+ decode_buffer = (struct amdgpu_vcn_decode_buffer *)&ib->ptr[10];
14481719
1449− if (decode_buffer->valid_buf_flag & 0x1)
1450− r = vcn_v4_0_dec_msg(p, ((u64)decode_buffer->msg_buffer_address_hi) << 32 |
1451− decode_buffer->msg_buffer_address_lo);
1452− }
1453− return r;
1720+ if (!(decode_buffer->valid_buf_flag & 0x1))
1721+ return 0;
1722+
1723+ addr = ((u64)decode_buffer->msg_buffer_address_hi) << 32 |
1724+ decode_buffer->msg_buffer_address_lo;
1725+ return vcn_v4_0_dec_msg(p, job, addr);
14541726 }
14551727
14561728 static const struct amdgpu_ring_funcs vcn_v4_0_unified_ring_vm_funcs = {
@@ -1596,6 +1868,15 @@ static int vcn_v4_0_set_powergating_state(void *handle, enum amd_powergating_sta · 139 unmodified lines
15961868 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
15971869 int ret;
15981870
1871+ /* for SRIOV, guest should not control VCN Power-gating
1872+ * MMSCH FW should control Power-gating and clock-gating
1873+ * guest should avoid touching CGC and PG
1874+ */
1875+ if (amdgpu_sriov_vf(adev)) {
1876+ adev->vcn.cur_state = AMD_PG_STATE_UNGATE;
1877+ return 0;
1878+ }
1879+
15991880 if(state == adev->vcn.cur_state)
16001881 return 0;
16011882
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h+387−384
@@ -742,7 +742,7 @@ static const uint32_t cwsr_trap_nv1x_hex[] = { · 741 unmodified lines
742742 0xbf88fffe, 0x877aff7f,
743743 0x04000000, 0x8f7a857a,
744744 0x886d7a6d, 0xb97b02dc,
745− 0x8f7b997b, 0xb97a2a05,
745+ 0x8f7b997b, 0xb97a3a05,
746746 0x807a817a, 0xbf0d997b,
747747 0xbf850002, 0x8f7a897a,
748748 0xbf820001, 0x8f7a8a7a,
@@ -819,7 +819,7 @@ static const uint32_t cwsr_trap_nv1x_hex[] = { · 70 unmodified lines
819819 0xbefe037c, 0xbefc0370,
820820 0xf4611c7a, 0xf8000000,
821821 0x80708470, 0xbefc037e,
822− 0xb9702a05, 0x80708170,
822+ 0xb9703a05, 0x80708170,
823823 0xbf0d9973, 0xbf850002,
824824 0x8f708970, 0xbf820001,
825825 0x8f708a70, 0xb97a1e06,
@@ -1069,7 +1069,7 @@ static const uint32_t cwsr_trap_nv1x_hex[] = { · 243 unmodified lines
10691069 0xb9f9f816, 0x876f7bff,
10701070 0xfffff800, 0x906f8b6f,
10711071 0xb9efa2c3, 0xb9f3f801,
1072− 0xb96e2a05, 0x806e816e,
1072+ 0xb96e3a05, 0x806e816e,
10731073 0xbf0d9972, 0xbf850002,
10741074 0x8f6e896e, 0xbf820001,
10751075 0x8f6e8a6e, 0xb96f1e06,
@@ -2114,7 +2114,7 @@ static const uint32_t cwsr_trap_gfx10_hex[] = { · 1038 unmodified lines
21142114 0x007a0000, 0x7e000280,
21152115 0xbefe037a, 0xbeff037b,
21162116 0xb97b02dc, 0x8f7b997b,
2117− 0xb97a2a05, 0x807a817a,
2117+ 0xb97a3a05, 0x807a817a,
21182118 0xbf0d997b, 0xbf850002,
21192119 0x8f7a897a, 0xbf820001,
21202120 0x8f7a8a7a, 0xb97b1e06,
@@ -2157,7 +2157,7 @@ static const uint32_t cwsr_trap_gfx10_hex[] = { · 36 unmodified lines
21572157 0x01000000, 0xe0704100,
21582158 0x705d0100, 0xe0704200,
21592159 0x705d0200, 0xe0704300,
2160− 0x705d0300, 0xb9702a05,
2160+ 0x705d0300, 0xb9703a05,
21612161 0x80708170, 0xbf0d9973,
21622162 0xbf850002, 0x8f708970,
21632163 0xbf820001, 0x8f708a70,
@@ -2189,7 +2189,7 @@ static const uint32_t cwsr_trap_gfx10_hex[] = { · 25 unmodified lines
21892189 0xbefe03ff, 0x0000ffff,
21902190 0xbeff0380, 0xe0704000,
21912191 0x705d0200, 0xbefe03c1,
2192− 0xb9702a05, 0x80708170,
2192+ 0xb9703a05, 0x80708170,
21932193 0xbf0d9973, 0xbf850002,
21942194 0x8f708970, 0xbf820001,
21952195 0x8f708a70, 0xb97a1e06,
@@ -2475,7 +2475,7 @@ static const uint32_t cwsr_trap_gfx10_hex[] = { · 279 unmodified lines
24752475 0xb9ef4803, 0x876f7bff,
24762476 0xfffff800, 0x906f8b6f,
24772477 0xb9efa2c3, 0xb9f3f801,
2478− 0xb96e2a05, 0x806e816e,
2478+ 0xb96e3a05, 0x806e816e,
24792479 0xbf0d9972, 0xbf850002,
24802480 0x8f6e896e, 0xbf820001,
24812481 0x8f6e8a6e, 0xb96f1e06,
@@ -2494,438 +2494,441 @@ static const uint32_t cwsr_trap_gfx10_hex[] = { · 12 unmodified lines
24942494 0xbf9f0000, 0xbf9f0000,
24952495 0xbf9f0000, 0x00000000,
24962496 };
2497−
24982497 static const uint32_t cwsr_trap_gfx11_hex[] = {
2499− 0xbfa00001, 0xbfa0021b,
2498+ 0xbfa00001, 0xbfa0021e,
25002499 0xb0804006, 0xb8f8f802,
2501− 0x91788678, 0xb8fbf803,
2502− 0x8b6eff78, 0x00002000,
2503− 0xbfa10009, 0x8b6eff6d,
2504− 0x00ff0000, 0xbfa2001e,
2505− 0x8b6eff7b, 0x00000400,
2506− 0xbfa20041, 0xbf830010,
2507− 0xb8fbf803, 0xbfa0fffa,
2508− 0x8b6eff7b, 0x00000900,
2509− 0xbfa20015, 0x8b6eff7b,
2510− 0x000071ff, 0xbfa10008,
2511− 0x8b6fff7b, 0x00007080,
2512− 0xbfa10001, 0xbeee1287,
2513− 0xb8eff801, 0x846e8c6e,
2514− 0x8b6e6f6e, 0xbfa2000a,
2500+ 0x9178ff78, 0x00020006,
2501+ 0xb8fbf803, 0xbf0d9f6d,
2502+ 0xbfa20006, 0x8b6eff78,
2503+ 0x00002000, 0xbfa10009,
25152504 0x8b6eff6d, 0x00ff0000,
2516− 0xbfa20007, 0xb8eef801,
2517− 0x8b6eff6e, 0x00000800,
2518− 0xbfa20003, 0x8b6eff7b,
2519− 0x00000400, 0xbfa20026,
2520− 0xbefa4d82, 0xbf89fc07,
2521− 0x84fa887a, 0xf4005bbd,
2522− 0xf8000010, 0xbf89fc07,
2523− 0x846e976e, 0x9177ff77,
2524− 0x00800000, 0x8c776e77,
2525− 0xf4045bbd, 0xf8000000,
2526− 0xbf89fc07, 0xf4045ebd,
2527− 0xf8000008, 0xbf89fc07,
2528− 0x8bee6e6e, 0xbfa10001,
2529− 0xbe80486e, 0x8b6eff6d,
2530− 0x01ff0000, 0xbfa20005,
2531− 0x8c78ff78, 0x00002000,
2532− 0x80ec886c, 0x82ed806d,
2533− 0xbfa00005, 0x8b6eff6d,
2534− 0x01000000, 0xbfa20002,
2535− 0x806c846c, 0x826d806d,
2536− 0x8b6dff6d, 0x0000ffff,
2537− 0x8bfe7e7e, 0x8bea6a6a,
2538− 0xb978f802, 0xbe804a6c,
2539− 0x8b6dff6d, 0x0000ffff,
2540− 0xbefa0080, 0xb97a0283,
2541− 0xbeee007e, 0xbeef007f,
2542− 0xbefe0180, 0xbefe4d84,
2543− 0xbf89fc07, 0x8b7aff7f,
2544− 0x04000000, 0x847a857a,
2545− 0x8c6d7a6d, 0xbefa007e,
2546− 0x8b7bff7f, 0x0000ffff,
2547− 0xbefe00c1, 0xbeff00c1,
2548− 0xdca6c000, 0x007a0000,
2549− 0x7e000280, 0xbefe007a,
2550− 0xbeff007b, 0xb8fb02dc,
2551− 0x847b997b, 0xb8fa3b05,
2552− 0x807a817a, 0xbf0d997b,
2553− 0xbfa20002, 0x847a897a,
2554− 0xbfa00001, 0x847a8a7a,
2555− 0xb8fb1e06, 0x847b8a7b,
2556− 0x807a7b7a, 0x8b7bff7f,
2557− 0x0000ffff, 0x807aff7a,
2558− 0x00000200, 0x807a7e7a,
2559− 0x827b807b, 0xd7610000,
2560− 0x00010870, 0xd7610000,
2561− 0x00010a71, 0xd7610000,
2562− 0x00010c72, 0xd7610000,
2563− 0x00010e73, 0xd7610000,
2564− 0x00011074, 0xd7610000,
2565− 0x00011275, 0xd7610000,
2566− 0x00011476, 0xd7610000,
2567− 0x00011677, 0xd7610000,
2568− 0x00011a79, 0xd7610000,
2569− 0x00011c7e, 0xd7610000,
2570− 0x00011e7f, 0xbefe00ff,
2571− 0x00003fff, 0xbeff0080,
2572− 0xdca6c040, 0x007a0000,
2573− 0xd760007a, 0x00011d00,
2574− 0xd760007b, 0x00011f00,
2505+ 0xbfa2001e, 0x8b6eff7b,
2506+ 0x00000400, 0xbfa20041,
2507+ 0xbf830010, 0xb8fbf803,
2508+ 0xbfa0fffa, 0x8b6eff7b,
2509+ 0x00000900, 0xbfa20015,
2510+ 0x8b6eff7b, 0x000071ff,
2511+ 0xbfa10008, 0x8b6fff7b,
2512+ 0x00007080, 0xbfa10001,
2513+ 0xbeee1287, 0xb8eff801,
2514+ 0x846e8c6e, 0x8b6e6f6e,
2515+ 0xbfa2000a, 0x8b6eff6d,
2516+ 0x00ff0000, 0xbfa20007,
2517+ 0xb8eef801, 0x8b6eff6e,
2518+ 0x00000800, 0xbfa20003,
2519+ 0x8b6eff7b, 0x00000400,
2520+ 0xbfa20026, 0xbefa4d82,
2521+ 0xbf89fc07, 0x84fa887a,
2522+ 0xf4005bbd, 0xf8000010,
2523+ 0xbf89fc07, 0x846e976e,
2524+ 0x9177ff77, 0x00800000,
2525+ 0x8c776e77, 0xf4045bbd,
2526+ 0xf8000000, 0xbf89fc07,
2527+ 0xf4045ebd, 0xf8000008,
2528+ 0xbf89fc07, 0x8bee6e6e,
2529+ 0xbfa10001, 0xbe80486e,
2530+ 0x8b6eff6d, 0x01ff0000,
2531+ 0xbfa20005, 0x8c78ff78,
2532+ 0x00002000, 0x80ec886c,
2533+ 0x82ed806d, 0xbfa00005,
2534+ 0x8b6eff6d, 0x01000000,
2535+ 0xbfa20002, 0x806c846c,
2536+ 0x826d806d, 0x8b6dff6d,
2537+ 0x0000ffff, 0x8bfe7e7e,
2538+ 0x8bea6a6a, 0xb978f802,
2539+ 0xbe804a6c, 0x8b6dff6d,
2540+ 0x0000ffff, 0xbefa0080,
2541+ 0xb97a0283, 0xbeee007e,
2542+ 0xbeef007f, 0xbefe0180,
2543+ 0xbefe4d84, 0xbf89fc07,
2544+ 0x8b7aff7f, 0x04000000,
2545+ 0x847a857a, 0x8c6d7a6d,
2546+ 0xbefa007e, 0x8b7bff7f,
2547+ 0x0000ffff, 0xbefe00c1,
2548+ 0xbeff00c1, 0xdca6c000,
2549+ 0x007a0000, 0x7e000280,
25752550 0xbefe007a, 0xbeff007b,
2576− 0xbef4007e, 0x8b75ff7f,
2577− 0x0000ffff, 0x8c75ff75,
2578− 0x00040000, 0xbef60080,
2579− 0xbef700ff, 0x10807fac,
2580− 0xbef1007d, 0xbef00080,
2581− 0xb8f302dc, 0x84739973,
2582− 0xbefe00c1, 0x857d9973,
2583− 0x8b7d817d, 0xbf06817d,
2584− 0xbfa20002, 0xbeff0080,
2585− 0xbfa00002, 0xbeff00c1,
2586− 0xbfa00009, 0xbef600ff,
2587− 0x01000000, 0xe0685080,
2588− 0x701d0100, 0xe0685100,
2589− 0x701d0200, 0xe0685180,
2590− 0x701d0300, 0xbfa00008,
2551+ 0xb8fb02dc, 0x847b997b,
2552+ 0xb8fa3b05, 0x807a817a,
2553+ 0xbf0d997b, 0xbfa20002,
2554+ 0x847a897a, 0xbfa00001,
2555+ 0x847a8a7a, 0xb8fb1e06,
2556+ 0x847b8a7b, 0x807a7b7a,
2557+ 0x8b7bff7f, 0x0000ffff,
2558+ 0x807aff7a, 0x00000200,
2559+ 0x807a7e7a, 0x827b807b,
2560+ 0xd7610000, 0x00010870,
2561+ 0xd7610000, 0x00010a71,
2562+ 0xd7610000, 0x00010c72,
2563+ 0xd7610000, 0x00010e73,
2564+ 0xd7610000, 0x00011074,
2565+ 0xd7610000, 0x00011275,
2566+ 0xd7610000, 0x00011476,
2567+ 0xd7610000, 0x00011677,
2568+ 0xd7610000, 0x00011a79,
2569+ 0xd7610000, 0x00011c7e,
2570+ 0xd7610000, 0x00011e7f,
2571+ 0xbefe00ff, 0x00003fff,
2572+ 0xbeff0080, 0xdca6c040,
2573+ 0x007a0000, 0xd760007a,
2574+ 0x00011d00, 0xd760007b,
2575+ 0x00011f00, 0xbefe007a,
2576+ 0xbeff007b, 0xbef4007e,
2577+ 0x8b75ff7f, 0x0000ffff,
2578+ 0x8c75ff75, 0x00040000,
2579+ 0xbef60080, 0xbef700ff,
2580+ 0x10807fac, 0xbef1007d,
2581+ 0xbef00080, 0xb8f302dc,
2582+ 0x84739973, 0xbefe00c1,
2583+ 0x857d9973, 0x8b7d817d,
2584+ 0xbf06817d, 0xbfa20002,
2585+ 0xbeff0080, 0xbfa00002,
2586+ 0xbeff00c1, 0xbfa00009,
25912587 0xbef600ff, 0x01000000,
2592− 0xe0685100, 0x701d0100,
2593− 0xe0685200, 0x701d0200,
2594− 0xe0685300, 0x701d0300,
2588+ 0xe0685080, 0x701d0100,
2589+ 0xe0685100, 0x701d0200,
2590+ 0xe0685180, 0x701d0300,
2591+ 0xbfa00008, 0xbef600ff,
2592+ 0x01000000, 0xe0685100,
2593+ 0x701d0100, 0xe0685200,
2594+ 0x701d0200, 0xe0685300,
2595+ 0x701d0300, 0xb8f03b05,
2596+ 0x80708170, 0xbf0d9973,
2597+ 0xbfa20002, 0x84708970,
2598+ 0xbfa00001, 0x84708a70,
2599+ 0xb8fa1e06, 0x847a8a7a,
2600+ 0x80707a70, 0x8070ff70,
2601+ 0x00000200, 0xbef600ff,
2602+ 0x01000000, 0x7e000280,
2603+ 0x7e020280, 0x7e040280,
2604+ 0xbefd0080, 0xd7610002,
2605+ 0x0000fa71, 0x807d817d,
2606+ 0xd7610002, 0x0000fa6c,
2607+ 0x807d817d, 0x917aff6d,
2608+ 0x80000000, 0xd7610002,
2609+ 0x0000fa7a, 0x807d817d,
2610+ 0xd7610002, 0x0000fa6e,
2611+ 0x807d817d, 0xd7610002,
2612+ 0x0000fa6f, 0x807d817d,
2613+ 0xd7610002, 0x0000fa78,
2614+ 0x807d817d, 0xb8faf803,
2615+ 0xd7610002, 0x0000fa7a,
2616+ 0x807d817d, 0xd7610002,
2617+ 0x0000fa7b, 0x807d817d,
2618+ 0xb8f1f801, 0xd7610002,
2619+ 0x0000fa71, 0x807d817d,
2620+ 0xb8f1f814, 0xd7610002,
2621+ 0x0000fa71, 0x807d817d,
2622+ 0xb8f1f815, 0xd7610002,
2623+ 0x0000fa71, 0x807d817d,
2624+ 0xbefe00ff, 0x0000ffff,
2625+ 0xbeff0080, 0xe0685000,
2626+ 0x701d0200, 0xbefe00c1,
25952627 0xb8f03b05, 0x80708170,
25962628 0xbf0d9973, 0xbfa20002,
25972629 0x84708970, 0xbfa00001,
25982630 0x84708a70, 0xb8fa1e06,
25992631 0x847a8a7a, 0x80707a70,
2600− 0x8070ff70, 0x00000200,
26012632 0xbef600ff, 0x01000000,
2602− 0x7e000280, 0x7e020280,
2603− 0x7e040280, 0xbefd0080,
2604− 0xd7610002, 0x0000fa71,
2605− 0x807d817d, 0xd7610002,
2606− 0x0000fa6c, 0x807d817d,
2607− 0x917aff6d, 0x80000000,
2608− 0xd7610002, 0x0000fa7a,
2609− 0x807d817d, 0xd7610002,
2610− 0x0000fa6e, 0x807d817d,
2611− 0xd7610002, 0x0000fa6f,
2612− 0x807d817d, 0xd7610002,
2613− 0x0000fa78, 0x807d817d,
2614− 0xb8faf803, 0xd7610002,
2615− 0x0000fa7a, 0x807d817d,
2616− 0xd7610002, 0x0000fa7b,
2617− 0x807d817d, 0xb8f1f801,
2618− 0xd7610002, 0x0000fa71,
2619− 0x807d817d, 0xb8f1f814,
2620− 0xd7610002, 0x0000fa71,
2621− 0x807d817d, 0xb8f1f815,
2622− 0xd7610002, 0x0000fa71,
2623− 0x807d817d, 0xbefe00ff,
2624− 0x0000ffff, 0xbeff0080,
2625− 0xe0685000, 0x701d0200,
2626− 0xbefe00c1, 0xb8f03b05,
2627− 0x80708170, 0xbf0d9973,
2628− 0xbfa20002, 0x84708970,
2629− 0xbfa00001, 0x84708a70,
2630− 0xb8fa1e06, 0x847a8a7a,
2631− 0x80707a70, 0xbef600ff,
2632− 0x01000000, 0xbef90080,
2633− 0xbefd0080, 0xbf800000,
2634− 0xbe804100, 0xbe824102,
2635− 0xbe844104, 0xbe864106,
2636− 0xbe884108, 0xbe8a410a,
2637− 0xbe8c410c, 0xbe8e410e,
2638− 0xd7610002, 0x0000f200,
2639− 0x80798179, 0xd7610002,
2640− 0x0000f201, 0x80798179,
2641− 0xd7610002, 0x0000f202,
2642− 0x80798179, 0xd7610002,
2643− 0x0000f203, 0x80798179,
2644− 0xd7610002, 0x0000f204,
2633+ 0xbef90080, 0xbefd0080,
2634+ 0xbf800000, 0xbe804100,
2635+ 0xbe824102, 0xbe844104,
2636+ 0xbe864106, 0xbe884108,
2637+ 0xbe8a410a, 0xbe8c410c,
2638+ 0xbe8e410e, 0xd7610002,
2639+ 0x0000f200, 0x80798179,
2640+ 0xd7610002, 0x0000f201,
26452641 0x80798179, 0xd7610002,
2646− 0x0000f205, 0x80798179,
2647− 0xd7610002, 0x0000f206,
2642+ 0x0000f202, 0x80798179,
2643+ 0xd7610002, 0x0000f203,
26482644 0x80798179, 0xd7610002,
2649− 0x0000f207, 0x80798179,
2650− 0xd7610002, 0x0000f208,
2645+ 0x0000f204, 0x80798179,
2646+ 0xd7610002, 0x0000f205,
26512647 0x80798179, 0xd7610002,
2652− 0x0000f209, 0x80798179,
2653− 0xd7610002, 0x0000f20a,
2648+ 0x0000f206, 0x80798179,
2649+ 0xd7610002, 0x0000f207,
26542650 0x80798179, 0xd7610002,
2655− 0x0000f20b, 0x80798179,
2656− 0xd7610002, 0x0000f20c,
2651+ 0x0000f208, 0x80798179,
2652+ 0xd7610002, 0x0000f209,
26572653 0x80798179, 0xd7610002,
2658− 0x0000f20d, 0x80798179,
2659− 0xd7610002, 0x0000f20e,
2654+ 0x0000f20a, 0x80798179,
2655+ 0xd7610002, 0x0000f20b,
26602656 0x80798179, 0xd7610002,
2661− 0x0000f20f, 0x80798179,
2662− 0xbf06a079, 0xbfa10006,
2663− 0xe0685000, 0x701d0200,
2664− 0x8070ff70, 0x00000080,
2665− 0xbef90080, 0x7e040280,
2666− 0x807d907d, 0xbf0aff7d,
2667− 0x00000060, 0xbfa2ffbc,
2668− 0xbe804100, 0xbe824102,
2669− 0xbe844104, 0xbe864106,
2670− 0xbe884108, 0xbe8a410a,
2671− 0xd7610002, 0x0000f200,
2657+ 0x0000f20c, 0x80798179,
2658+ 0xd7610002, 0x0000f20d,
26722659 0x80798179, 0xd7610002,
2673− 0x0000f201, 0x80798179,
2674− 0xd7610002, 0x0000f202,
2660+ 0x0000f20e, 0x80798179,
2661+ 0xd7610002, 0x0000f20f,
2662+ 0x80798179, 0xbf06a079,
2663+ 0xbfa10006, 0xe0685000,
2664+ 0x701d0200, 0x8070ff70,
2665+ 0x00000080, 0xbef90080,
2666+ 0x7e040280, 0x807d907d,
2667+ 0xbf0aff7d, 0x00000060,
2668+ 0xbfa2ffbc, 0xbe804100,
2669+ 0xbe824102, 0xbe844104,
2670+ 0xbe864106, 0xbe884108,
2671+ 0xbe8a410a, 0xd7610002,
2672+ 0x0000f200, 0x80798179,
2673+ 0xd7610002, 0x0000f201,
26752674 0x80798179, 0xd7610002,
2676− 0x0000f203, 0x80798179,
2677− 0xd7610002, 0x0000f204,
2675+ 0x0000f202, 0x80798179,
2676+ 0xd7610002, 0x0000f203,
26782677 0x80798179, 0xd7610002,
2679− 0x0000f205, 0x80798179,
2680− 0xd7610002, 0x0000f206,
2678+ 0x0000f204, 0x80798179,
2679+ 0xd7610002, 0x0000f205,
26812680 0x80798179, 0xd7610002,
2682− 0x0000f207, 0x80798179,
2683− 0xd7610002, 0x0000f208,
2681+ 0x0000f206, 0x80798179,
2682+ 0xd7610002, 0x0000f207,
26842683 0x80798179, 0xd7610002,
2685− 0x0000f209, 0x80798179,
2686− 0xd7610002, 0x0000f20a,
2684+ 0x0000f208, 0x80798179,
2685+ 0xd7610002, 0x0000f209,
26872686 0x80798179, 0xd7610002,
2688− 0x0000f20b, 0x80798179,
2689− 0xe0685000, 0x701d0200,
2687+ 0x0000f20a, 0x80798179,
2688+ 0xd7610002, 0x0000f20b,
2689+ 0x80798179, 0xe0685000,
2690+ 0x701d0200, 0xbefe00c1,
2691+ 0x857d9973, 0x8b7d817d,
2692+ 0xbf06817d, 0xbfa20002,
2693+ 0xbeff0080, 0xbfa00001,
2694+ 0xbeff00c1, 0xb8fb4306,
2695+ 0x8b7bc17b, 0xbfa10044,
2696+ 0xbfbd0000, 0x8b7aff6d,
2697+ 0x80000000, 0xbfa10040,
2698+ 0x847b867b, 0x847b827b,
2699+ 0xbef6007b, 0xb8f03b05,
2700+ 0x80708170, 0xbf0d9973,
2701+ 0xbfa20002, 0x84708970,
2702+ 0xbfa00001, 0x84708a70,
2703+ 0xb8fa1e06, 0x847a8a7a,
2704+ 0x80707a70, 0x8070ff70,
2705+ 0x00000200, 0x8070ff70,
2706+ 0x00000080, 0xbef600ff,
2707+ 0x01000000, 0xd71f0000,
2708+ 0x000100c1, 0xd7200000,
2709+ 0x000200c1, 0x16000084,
2710+ 0x857d9973, 0x8b7d817d,
2711+ 0xbf06817d, 0xbefd0080,
2712+ 0xbfa20012, 0xbe8300ff,
2713+ 0x00000080, 0xbf800000,
2714+ 0xbf800000, 0xbf800000,
2715+ 0xd8d80000, 0x01000000,
2716+ 0xbf890000, 0xe0685000,
2717+ 0x701d0100, 0x807d037d,
2718+ 0x80700370, 0xd5250000,
2719+ 0x0001ff00, 0x00000080,
2720+ 0xbf0a7b7d, 0xbfa2fff4,
2721+ 0xbfa00011, 0xbe8300ff,
2722+ 0x00000100, 0xbf800000,
2723+ 0xbf800000, 0xbf800000,
2724+ 0xd8d80000, 0x01000000,
2725+ 0xbf890000, 0xe0685000,
2726+ 0x701d0100, 0x807d037d,
2727+ 0x80700370, 0xd5250000,
2728+ 0x0001ff00, 0x00000100,
2729+ 0xbf0a7b7d, 0xbfa2fff4,
26902730 0xbefe00c1, 0x857d9973,
26912731 0x8b7d817d, 0xbf06817d,
2692− 0xbfa20002, 0xbeff0080,
2693− 0xbfa00001, 0xbeff00c1,
2694− 0xb8fb4306, 0x8b7bc17b,
2695− 0xbfa10044, 0xbfbd0000,
2696− 0x8b7aff6d, 0x80000000,
2697− 0xbfa10040, 0x847b867b,
2698− 0x847b827b, 0xbef6007b,
2699− 0xb8f03b05, 0x80708170,
2700− 0xbf0d9973, 0xbfa20002,
2701− 0x84708970, 0xbfa00001,
2702− 0x84708a70, 0xb8fa1e06,
2703− 0x847a8a7a, 0x80707a70,
2704− 0x8070ff70, 0x00000200,
2705− 0x8070ff70, 0x00000080,
2706− 0xbef600ff, 0x01000000,
2707− 0xd71f0000, 0x000100c1,
2708− 0xd7200000, 0x000200c1,
2709− 0x16000084, 0x857d9973,
2732+ 0xbfa20004, 0xbef000ff,
2733+ 0x00000200, 0xbeff0080,
2734+ 0xbfa00003, 0xbef000ff,
2735+ 0x00000400, 0xbeff00c1,
2736+ 0xb8fb3b05, 0x807b817b,
2737+ 0x847b827b, 0x857d9973,
27102738 0x8b7d817d, 0xbf06817d,
2711− 0xbefd0080, 0xbfa20012,
2712− 0xbe8300ff, 0x00000080,
2713− 0xbf800000, 0xbf800000,
2714− 0xbf800000, 0xd8d80000,
2715− 0x01000000, 0xbf890000,
2716− 0xe0685000, 0x701d0100,
2717− 0x807d037d, 0x80700370,
2718− 0xd5250000, 0x0001ff00,
2719− 0x00000080, 0xbf0a7b7d,
2720− 0xbfa2fff4, 0xbfa00011,
2721− 0xbe8300ff, 0x00000100,
2722− 0xbf800000, 0xbf800000,
2723− 0xbf800000, 0xd8d80000,
2724− 0x01000000, 0xbf890000,
2725− 0xe0685000, 0x701d0100,
2726− 0x807d037d, 0x80700370,
2727− 0xd5250000, 0x0001ff00,
2728− 0x00000100, 0xbf0a7b7d,
2729− 0xbfa2fff4, 0xbefe00c1,
2730− 0x857d9973, 0x8b7d817d,
2731− 0xbf06817d, 0xbfa20004,
2732− 0xbef000ff, 0x00000200,
2733− 0xbeff0080, 0xbfa00003,
2734− 0xbef000ff, 0x00000400,
2735− 0xbeff00c1, 0xb8fb3b05,
2736− 0x807b817b, 0x847b827b,
2737− 0x857d9973, 0x8b7d817d,
2738− 0xbf06817d, 0xbfa20017,
2739+ 0xbfa20017, 0xbef600ff,
2740+ 0x01000000, 0xbefd0084,
2741+ 0xbf0a7b7d, 0xbfa10037,
2742+ 0x7e008700, 0x7e028701,
2743+ 0x7e048702, 0x7e068703,
2744+ 0xe0685000, 0x701d0000,
2745+ 0xe0685080, 0x701d0100,
2746+ 0xe0685100, 0x701d0200,
2747+ 0xe0685180, 0x701d0300,
2748+ 0x807d847d, 0x8070ff70,
2749+ 0x00000200, 0xbf0a7b7d,
2750+ 0xbfa2ffef, 0xbfa00025,
27392751 0xbef600ff, 0x01000000,
27402752 0xbefd0084, 0xbf0a7b7d,
2741− 0xbfa10037, 0x7e008700,
2753+ 0xbfa10011, 0x7e008700,
27422754 0x7e028701, 0x7e048702,
27432755 0x7e068703, 0xe0685000,
2744− 0x701d0000, 0xe0685080,
2745− 0x701d0100, 0xe0685100,
2746− 0x701d0200, 0xe0685180,
2756+ 0x701d0000, 0xe0685100,
2757+ 0x701d0100, 0xe0685200,
2758+ 0x701d0200, 0xe0685300,
27472759 0x701d0300, 0x807d847d,
2748− 0x8070ff70, 0x00000200,
2760+ 0x8070ff70, 0x00000400,
27492761 0xbf0a7b7d, 0xbfa2ffef,
2750− 0xbfa00025, 0xbef600ff,
2751− 0x01000000, 0xbefd0084,
2752− 0xbf0a7b7d, 0xbfa10011,
2753− 0x7e008700, 0x7e028701,
2754− 0x7e048702, 0x7e068703,
2762+ 0xb8fb1e06, 0x8b7bc17b,
2763+ 0xbfa1000c, 0x847b837b,
2764+ 0x807b7d7b, 0xbefe00c1,
2765+ 0xbeff0080, 0x7e008700,
27552766 0xe0685000, 0x701d0000,
2756− 0xe0685100, 0x701d0100,
2757− 0xe0685200, 0x701d0200,
2758− 0xe0685300, 0x701d0300,
2759− 0x807d847d, 0x8070ff70,
2760− 0x00000400, 0xbf0a7b7d,
2761− 0xbfa2ffef, 0xb8fb1e06,
2762− 0x8b7bc17b, 0xbfa1000c,
2763− 0x847b837b, 0x807b7d7b,
2764− 0xbefe00c1, 0xbeff0080,
2765− 0x7e008700, 0xe0685000,
2766− 0x701d0000, 0x807d817d,
2767− 0x8070ff70, 0x00000080,
2768− 0xbf0a7b7d, 0xbfa2fff8,
2769− 0xbfa00141, 0xbef4007e,
2770− 0x8b75ff7f, 0x0000ffff,
2771− 0x8c75ff75, 0x00040000,
2772− 0xbef60080, 0xbef700ff,
2773− 0x10807fac, 0xb8f202dc,
2774− 0x84729972, 0x8b6eff7f,
2775− 0x04000000, 0xbfa1003a,
2767+ 0x807d817d, 0x8070ff70,
2768+ 0x00000080, 0xbf0a7b7d,
2769+ 0xbfa2fff8, 0xbfa00146,
2770+ 0xbef4007e, 0x8b75ff7f,
2771+ 0x0000ffff, 0x8c75ff75,
2772+ 0x00040000, 0xbef60080,
2773+ 0xbef700ff, 0x10807fac,
2774+ 0xb8f202dc, 0x84729972,
2775+ 0x8b6eff7f, 0x04000000,
2776+ 0xbfa1003a, 0xbefe00c1,
2777+ 0x857d9972, 0x8b7d817d,
2778+ 0xbf06817d, 0xbfa20002,
2779+ 0xbeff0080, 0xbfa00001,
2780+ 0xbeff00c1, 0xb8ef4306,
2781+ 0x8b6fc16f, 0xbfa1002f,
2782+ 0x846f866f, 0x846f826f,
2783+ 0xbef6006f, 0xb8f83b05,
2784+ 0x80788178, 0xbf0d9972,
2785+ 0xbfa20002, 0x84788978,
2786+ 0xbfa00001, 0x84788a78,
2787+ 0xb8ee1e06, 0x846e8a6e,
2788+ 0x80786e78, 0x8078ff78,
2789+ 0x00000200, 0x8078ff78,
2790+ 0x00000080, 0xbef600ff,
2791+ 0x01000000, 0x857d9972,
2792+ 0x8b7d817d, 0xbf06817d,
2793+ 0xbefd0080, 0xbfa2000c,
2794+ 0xe0500000, 0x781d0000,
2795+ 0xbf8903f7, 0xdac00000,
2796+ 0x00000000, 0x807dff7d,
2797+ 0x00000080, 0x8078ff78,
2798+ 0x00000080, 0xbf0a6f7d,
2799+ 0xbfa2fff5, 0xbfa0000b,
2800+ 0xe0500000, 0x781d0000,
2801+ 0xbf8903f7, 0xdac00000,
2802+ 0x00000000, 0x807dff7d,
2803+ 0x00000100, 0x8078ff78,
2804+ 0x00000100, 0xbf0a6f7d,
2805+ 0xbfa2fff5, 0xbef80080,
27762806 0xbefe00c1, 0x857d9972,
27772807 0x8b7d817d, 0xbf06817d,
27782808 0xbfa20002, 0xbeff0080,
27792809 0xbfa00001, 0xbeff00c1,
2780− 0xb8ef4306, 0x8b6fc16f,
2781− 0xbfa1002f, 0x846f866f,
2782− 0x846f826f, 0xbef6006f,
2783− 0xb8f83b05, 0x80788178,
2784− 0xbf0d9972, 0xbfa20002,
2785− 0x84788978, 0xbfa00001,
2786− 0x84788a78, 0xb8ee1e06,
2787− 0x846e8a6e, 0x80786e78,
2810+ 0xb8ef3b05, 0x806f816f,
2811+ 0x846f826f, 0x857d9972,
2812+ 0x8b7d817d, 0xbf06817d,
2813+ 0xbfa20024, 0xbef600ff,
2814+ 0x01000000, 0xbeee0078,
27882815 0x8078ff78, 0x00000200,
2789− 0x8078ff78, 0x00000080,
2790− 0xbef600ff, 0x01000000,
2791− 0x857d9972, 0x8b7d817d,
2792− 0xbf06817d, 0xbefd0080,
2793− 0xbfa2000c, 0xe0500000,
2794− 0x781d0000, 0xbf8903f7,
2795− 0xdac00000, 0x00000000,
2796− 0x807dff7d, 0x00000080,
2797− 0x8078ff78, 0x00000080,
2798− 0xbf0a6f7d, 0xbfa2fff5,
2799− 0xbfa0000b, 0xe0500000,
2800− 0x781d0000, 0xbf8903f7,
2801− 0xdac00000, 0x00000000,
2802− 0x807dff7d, 0x00000100,
2803− 0x8078ff78, 0x00000100,
2804− 0xbf0a6f7d, 0xbfa2fff5,
2805− 0xbef80080, 0xbefe00c1,
2806− 0x857d9972, 0x8b7d817d,
2807− 0xbf06817d, 0xbfa20002,
2808− 0xbeff0080, 0xbfa00001,
2809− 0xbeff00c1, 0xb8ef3b05,
2810− 0x806f816f, 0x846f826f,
2811− 0x857d9972, 0x8b7d817d,
2812− 0xbf06817d, 0xbfa20024,
2813− 0xbef600ff, 0x01000000,
2814− 0xbeee0078, 0x8078ff78,
2815− 0x00000200, 0xbefd0084,
2816− 0xbf0a6f7d, 0xbfa10050,
2816+ 0xbefd0084, 0xbf0a6f7d,
2817+ 0xbfa10050, 0xe0505000,
2818+ 0x781d0000, 0xe0505080,
2819+ 0x781d0100, 0xe0505100,
2820+ 0x781d0200, 0xe0505180,
2821+ 0x781d0300, 0xbf8903f7,
2822+ 0x7e008500, 0x7e028501,
2823+ 0x7e048502, 0x7e068503,
2824+ 0x807d847d, 0x8078ff78,
2825+ 0x00000200, 0xbf0a6f7d,
2826+ 0xbfa2ffee, 0xe0505000,
2827+ 0x6e1d0000, 0xe0505080,
2828+ 0x6e1d0100, 0xe0505100,
2829+ 0x6e1d0200, 0xe0505180,
2830+ 0x6e1d0300, 0xbf8903f7,
2831+ 0xbfa00034, 0xbef600ff,
2832+ 0x01000000, 0xbeee0078,
2833+ 0x8078ff78, 0x00000400,
2834+ 0xbefd0084, 0xbf0a6f7d,
2835+ 0xbfa10012, 0xe0505000,
2836+ 0x781d0000, 0xe0505100,
2837+ 0x781d0100, 0xe0505200,
2838+ 0x781d0200, 0xe0505300,
2839+ 0x781d0300, 0xbf8903f7,
2840+ 0x7e008500, 0x7e028501,
2841+ 0x7e048502, 0x7e068503,
2842+ 0x807d847d, 0x8078ff78,
2843+ 0x00000400, 0xbf0a6f7d,
2844+ 0xbfa2ffee, 0xb8ef1e06,
2845+ 0x8b6fc16f, 0xbfa1000e,
2846+ 0x846f836f, 0x806f7d6f,
2847+ 0xbefe00c1, 0xbeff0080,
28172848 0xe0505000, 0x781d0000,
2818− 0xe0505080, 0x781d0100,
2819− 0xe0505100, 0x781d0200,
2820− 0xe0505180, 0x781d0300,
28212849 0xbf8903f7, 0x7e008500,
2822− 0x7e028501, 0x7e048502,
2823− 0x7e068503, 0x807d847d,
2824− 0x8078ff78, 0x00000200,
2825− 0xbf0a6f7d, 0xbfa2ffee,
2850+ 0x807d817d, 0x8078ff78,
2851+ 0x00000080, 0xbf0a6f7d,
2852+ 0xbfa2fff7, 0xbeff00c1,
28262853 0xe0505000, 0x6e1d0000,
2827− 0xe0505080, 0x6e1d0100,
2828− 0xe0505100, 0x6e1d0200,
2829− 0xe0505180, 0x6e1d0300,
2830− 0xbf8903f7, 0xbfa00034,
2831− 0xbef600ff, 0x01000000,
2832− 0xbeee0078, 0x8078ff78,
2833− 0x00000400, 0xbefd0084,
2834− 0xbf0a6f7d, 0xbfa10012,
2835− 0xe0505000, 0x781d0000,
2836− 0xe0505100, 0x781d0100,
2837− 0xe0505200, 0x781d0200,
2838− 0xe0505300, 0x781d0300,
2839− 0xbf8903f7, 0x7e008500,
2840− 0x7e028501, 0x7e048502,
2841− 0x7e068503, 0x807d847d,
2842− 0x8078ff78, 0x00000400,
2843− 0xbf0a6f7d, 0xbfa2ffee,
2844− 0xb8ef1e06, 0x8b6fc16f,
2845− 0xbfa1000e, 0x846f836f,
2846− 0x806f7d6f, 0xbefe00c1,
2847− 0xbeff0080, 0xe0505000,
2848− 0x781d0000, 0xbf8903f7,
2849− 0x7e008500, 0x807d817d,
2850− 0x8078ff78, 0x00000080,
2851− 0xbf0a6f7d, 0xbfa2fff7,
2852− 0xbeff00c1, 0xe0505000,
2853− 0x6e1d0000, 0xe0505100,
2854− 0x6e1d0100, 0xe0505200,
2855− 0x6e1d0200, 0xe0505300,
2856− 0x6e1d0300, 0xbf8903f7,
2854+ 0xe0505100, 0x6e1d0100,
2855+ 0xe0505200, 0x6e1d0200,
2856+ 0xe0505300, 0x6e1d0300,
2857+ 0xbf8903f7, 0xb8f83b05,
2858+ 0x80788178, 0xbf0d9972,
2859+ 0xbfa20002, 0x84788978,
2860+ 0xbfa00001, 0x84788a78,
2861+ 0xb8ee1e06, 0x846e8a6e,
2862+ 0x80786e78, 0x8078ff78,
2863+ 0x00000200, 0x80f8ff78,
2864+ 0x00000050, 0xbef600ff,
2865+ 0x01000000, 0xbefd00ff,
2866+ 0x0000006c, 0x80f89078,
2867+ 0xf428403a, 0xf0000000,
2868+ 0xbf89fc07, 0x80fd847d,
2869+ 0xbf800000, 0xbe804300,
2870+ 0xbe824302, 0x80f8a078,
2871+ 0xf42c403a, 0xf0000000,
2872+ 0xbf89fc07, 0x80fd887d,
2873+ 0xbf800000, 0xbe804300,
2874+ 0xbe824302, 0xbe844304,
2875+ 0xbe864306, 0x80f8c078,
2876+ 0xf430403a, 0xf0000000,
2877+ 0xbf89fc07, 0x80fd907d,
2878+ 0xbf800000, 0xbe804300,
2879+ 0xbe824302, 0xbe844304,
2880+ 0xbe864306, 0xbe884308,
2881+ 0xbe8a430a, 0xbe8c430c,
2882+ 0xbe8e430e, 0xbf06807d,
2883+ 0xbfa1fff0, 0xb980f801,
2884+ 0x00000000, 0xbfbd0000,
28572885 0xb8f83b05, 0x80788178,
28582886 0xbf0d9972, 0xbfa20002,
28592887 0x84788978, 0xbfa00001,
28602888 0x84788a78, 0xb8ee1e06,
28612889 0x846e8a6e, 0x80786e78,
28622890 0x8078ff78, 0x00000200,
2863− 0x80f8ff78, 0x00000050,
28642891 0xbef600ff, 0x01000000,
2865− 0xbefd00ff, 0x0000006c,
2866− 0x80f89078, 0xf428403a,
2867− 0xf0000000, 0xbf89fc07,
2868− 0x80fd847d, 0xbf800000,
2869− 0xbe804300, 0xbe824302,
2870− 0x80f8a078, 0xf42c403a,
2871− 0xf0000000, 0xbf89fc07,
2872− 0x80fd887d, 0xbf800000,
2873− 0xbe804300, 0xbe824302,
2874− 0xbe844304, 0xbe864306,
2875− 0x80f8c078, 0xf430403a,
2876− 0xf0000000, 0xbf89fc07,
2877− 0x80fd907d, 0xbf800000,
2878− 0xbe804300, 0xbe824302,
2879− 0xbe844304, 0xbe864306,
2880− 0xbe884308, 0xbe8a430a,
2881− 0xbe8c430c, 0xbe8e430e,
2882− 0xbf06807d, 0xbfa1fff0,
2883− 0xb980f801, 0x00000000,
2884− 0xbfbd0000, 0xb8f83b05,
2885− 0x80788178, 0xbf0d9972,
2886− 0xbfa20002, 0x84788978,
2887− 0xbfa00001, 0x84788a78,
2888− 0xb8ee1e06, 0x846e8a6e,
2889− 0x80786e78, 0x8078ff78,
2890− 0x00000200, 0xbef600ff,
2891− 0x01000000, 0xf4205bfa,
2892+ 0xf4205bfa, 0xf0000000,
2893+ 0x80788478, 0xf4205b3a,
28922894 0xf0000000, 0x80788478,
2893− 0xf4205b3a, 0xf0000000,
2894− 0x80788478, 0xf4205b7a,
2895+ 0xf4205b7a, 0xf0000000,
2896+ 0x80788478, 0xf4205c3a,
28952897 0xf0000000, 0x80788478,
2896− 0xf4205c3a, 0xf0000000,
2897− 0x80788478, 0xf4205c7a,
2898+ 0xf4205c7a, 0xf0000000,
2899+ 0x80788478, 0xf4205eba,
28982900 0xf0000000, 0x80788478,
2899− 0xf4205eba, 0xf0000000,
2900− 0x80788478, 0xf4205efa,
2901+ 0xf4205efa, 0xf0000000,
2902+ 0x80788478, 0xf4205e7a,
29012903 0xf0000000, 0x80788478,
2902− 0xf4205e7a, 0xf0000000,
2903− 0x80788478, 0xf4205cfa,
2904+ 0xf4205cfa, 0xf0000000,
2905+ 0x80788478, 0xf4205bba,
29042906 0xf0000000, 0x80788478,
2907+ 0xbf89fc07, 0xb96ef814,
29052908 0xf4205bba, 0xf0000000,
29062909 0x80788478, 0xbf89fc07,
2907− 0xb96ef814, 0xf4205bba,
2908− 0xf0000000, 0x80788478,
2909− 0xbf89fc07, 0xb96ef815,
2910− 0xbefd006f, 0xbefe0070,
2911− 0xbeff0071, 0x8b6f7bff,
2912− 0x000003ff, 0xb96f4803,
2913− 0x8b6f7bff, 0xfffff800,
2914− 0x856f8b6f, 0xb96fa2c3,
2915− 0xb973f801, 0xb8ee3b05,
2916− 0x806e816e, 0xbf0d9972,
2917− 0xbfa20002, 0x846e896e,
2918− 0xbfa00001, 0x846e8a6e,
2919− 0xb8ef1e06, 0x846f8a6f,
2920− 0x806e6f6e, 0x806eff6e,
2921− 0x00000200, 0x806e746e,
2922− 0x826f8075, 0x8b6fff6f,
2923− 0x0000ffff, 0xf4085c37,
2924− 0xf8000050, 0xf4085d37,
2925− 0xf8000060, 0xf4005e77,
2926− 0xf8000074, 0xbf89fc07,
2927− 0x8b6dff6d, 0x0000ffff,
2928− 0x8bfe7e7e, 0x8bea6a6a,
2910+ 0xb96ef815, 0xbefd006f,
2911+ 0xbefe0070, 0xbeff0071,
2912+ 0x8b6f7bff, 0x000003ff,
2913+ 0xb96f4803, 0x8b6f7bff,
2914+ 0xfffff800, 0x856f8b6f,
2915+ 0xb96fa2c3, 0xb973f801,
2916+ 0xb8ee3b05, 0x806e816e,
2917+ 0xbf0d9972, 0xbfa20002,
2918+ 0x846e896e, 0xbfa00001,
2919+ 0x846e8a6e, 0xb8ef1e06,
2920+ 0x846f8a6f, 0x806e6f6e,
2921+ 0x806eff6e, 0x00000200,
2922+ 0x806e746e, 0x826f8075,
2923+ 0x8b6fff6f, 0x0000ffff,
2924+ 0xf4085c37, 0xf8000050,
2925+ 0xf4085d37, 0xf8000060,
2926+ 0xf4005e77, 0xf8000074,
2927+ 0xbf89fc07, 0x8b6dff6d,
2928+ 0x0000ffff, 0x8bfe7e7e,
2929+ 0x8bea6a6a, 0xb8eef802,
2930+ 0xbf0d866e, 0xbfa20002,
2931+ 0xb97af802, 0xbe80486c,
29292932 0xb97af802, 0xbe804a6c,
29302933 0xbfb00000, 0xbf9f0000,
29312934 0xbf9f0000, 0xbf9f0000,
drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx10.asm+21−0
@@ -43,12 +43,14 @@ · 42 unmodified lines
4343 #define HAVE_XNACK (ASIC_FAMILY < CHIP_SIENNA_CICHLID)
4444 #define HAVE_SENDMSG_RTN (ASIC_FAMILY >= CHIP_PLUM_BONITO)
4545 #define HAVE_BUFFER_LDS_LOAD (ASIC_FAMILY < CHIP_PLUM_BONITO)
46+#define SW_SA_TRAP (ASIC_FAMILY >= CHIP_PLUM_BONITO)
4647
4748 var SINGLE_STEP_MISSED_WORKAROUND = 1 //workaround for lost MODE.DEBUG_EN exception when SAVECTX raised
4849
4950 var SQ_WAVE_STATUS_SPI_PRIO_MASK = 0x00000006
5051 var SQ_WAVE_STATUS_HALT_MASK = 0x2000
5152 var SQ_WAVE_STATUS_ECC_ERR_MASK = 0x20000
53+var SQ_WAVE_STATUS_TRAP_EN_SHIFT = 6
5254
5355 var SQ_WAVE_LDS_ALLOC_LDS_SIZE_SHIFT = 12
5456 var SQ_WAVE_LDS_ALLOC_LDS_SIZE_SIZE = 9
@@ -183,6 +185,13 @@ L_SKIP_RESTORE: · 128 unmodified lines
183185
184186 s_getreg_b32 s_save_trapsts, hwreg(HW_REG_TRAPSTS)
185187
188+#if SW_SA_TRAP
189+ // If ttmp1[31] is set then trap may occur early.
190+ // Spin wait until SAVECTX exception is raised.
191+ s_bitcmp1_b32 s_save_pc_hi, 31
192+ s_cbranch_scc1 L_CHECK_SAVE
193+#endif
194+
186195 s_and_b32 ttmp2, s_save_status, SQ_WAVE_STATUS_HALT_MASK
187196 s_cbranch_scc0 L_NOT_HALTED
188197
@@ -1061,8 +1070,20 @@ L_RESTORE_HWREG: · 872 unmodified lines
10611070 s_and_b32 s_restore_pc_hi, s_restore_pc_hi, 0x0000ffff //pc[47:32] //Do it here in order not to affect STATUS
10621071 s_and_b64 exec, exec, exec // Restore STATUS.EXECZ, not writable by s_setreg_b32
10631072 s_and_b64 vcc, vcc, vcc // Restore STATUS.VCCZ, not writable by s_setreg_b32
1073+
1074+#if SW_SA_TRAP
1075+ // If traps are enabled then return to the shader with PRIV=0.
1076+ // Otherwise retain PRIV=1 for subsequent context save requests.
1077+ s_getreg_b32 s_restore_tmp, hwreg(HW_REG_STATUS)
1078+ s_bitcmp1_b32 s_restore_tmp, SQ_WAVE_STATUS_TRAP_EN_SHIFT
1079+ s_cbranch_scc1 L_RETURN_WITHOUT_PRIV
1080+
10641081 s_setreg_b32 hwreg(HW_REG_STATUS), s_restore_status // SCC is included, which is changed by previous salu
1082+ s_setpc_b64 [s_restore_pc_lo, s_restore_pc_hi]
1083+L_RETURN_WITHOUT_PRIV:
1084+#endif
10651085
1086+ s_setreg_b32 hwreg(HW_REG_STATUS), s_restore_status // SCC is included, which is changed by previous salu
10661087 s_rfe_b64 s_restore_pc_lo //Return to the main shader program and resume execution
10671088
10681089 L_END_PGM:
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c+41−13
@@ -327,6 +327,12 @@ static int kfd_ioctl_create_queue(struct file *filep, struct kfd_process *p, · 326 unmodified lines
327327 goto err_bind_process;
328328 }
329329
330+ if (!pdd->doorbell_index &&
331+ kfd_alloc_process_doorbells(dev, &pdd->doorbell_index) < 0) {
332+ err = -ENOMEM;
333+ goto err_alloc_doorbells;
334+ }
335+
330336 /* Starting with GFX11, wptr BOs must be mapped to GART for MES to determine work
331337 * on unmapped queues for usermode queue oversubscription (no aggregated doorbell)
332338 */
@@ -404,6 +410,7 @@ err_create_queue: · 71 unmodified lines
404410 if (wptr_bo)
405411 amdgpu_amdkfd_free_gtt_mem(dev->adev, wptr_bo);
406412 err_wptr_map_gart:
413+err_alloc_doorbells:
407414 err_bind_process:
408415 err_pdd:
409416 mutex_unlock(&p->mutex);
@@ -869,14 +876,11 @@ static int kfd_ioctl_wait_events(struct file *filp, struct kfd_process *p, · 459 unmodified lines
869876 void *data)
870877 {
871878 struct kfd_ioctl_wait_events_args *args = data;
872− int err;
873879
874− err = kfd_wait_on_events(p, args->num_events,
880+ return kfd_wait_on_events(p, args->num_events,
875881 (void __user *)args->events_ptr,
876882 (args->wait_for_all != 0),
877883 &args->timeout, &args->wait_result);
878−
879− return err;
880884 }
881885 static int kfd_ioctl_set_scratch_backing_va(struct file *filep,
882886 struct kfd_process *p, void *data)
@@ -1092,6 +1096,10 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep, · 209 unmodified lines
10921096 goto err_unlock;
10931097 }
10941098 offset = kfd_get_process_doorbells(pdd);
1099+ if (!offset) {
1100+ err = -ENOMEM;
1101+ goto err_unlock;
1102+ }
10951103 } else if (flags & KFD_IOC_ALLOC_MEM_FLAGS_MMIO_REMAP) {
10961104 if (args->size != PAGE_SIZE) {
10971105 err = -EINVAL;
@@ -1576,6 +1584,8 @@ static int kfd_ioctl_smi_events(struct file *filep, · 478 unmodified lines
15761584 return kfd_smi_event_open(pdd->dev, &args->anon_fd);
15771585 }
15781586
1587+#if IS_ENABLED(CONFIG_HSA_AMD_SVM)
1588+
15791589 static int kfd_ioctl_set_xnack_mode(struct file *filep,
15801590 struct kfd_process *p, void *data)
15811591 {
@@ -1586,22 +1596,29 @@ static int kfd_ioctl_set_xnack_mode(struct file *filep, · 4 unmodified lines
15861596 if (args->xnack_enabled >= 0) {
15871597 if (!list_empty(&p->pqm.queues)) {
15881598 pr_debug("Process has user queues running\n");
1589− mutex_unlock(&p->mutex);
1590− return -EBUSY;
1599+ r = -EBUSY;
1600+ goto out_unlock;
15911601 }
1592− if (args->xnack_enabled && !kfd_process_xnack_mode(p, true))
1602+
1603+ if (p->xnack_enabled == args->xnack_enabled)
1604+ goto out_unlock;
1605+
1606+ if (args->xnack_enabled && !kfd_process_xnack_mode(p, true)) {
15931607 r = -EPERM;
1594− else
1595− p->xnack_enabled = args->xnack_enabled;
1608+ goto out_unlock;
1609+ }
1610+
1611+ r = svm_range_switch_xnack_reserve_mem(p, args->xnack_enabled);
15961612 } else {
15971613 args->xnack_enabled = p->xnack_enabled;
15981614 }
1615+
1616+out_unlock:
15991617 mutex_unlock(&p->mutex);
16001618
16011619 return r;
16021620 }
16031621
1604−#if IS_ENABLED(CONFIG_HSA_AMD_SVM)
16051622 static int kfd_ioctl_svm(struct file *filep, struct kfd_process *p, void *data)
16061623 {
16071624 struct kfd_ioctl_svm_args *args = data;
@@ -1621,6 +1638,11 @@ static int kfd_ioctl_svm(struct file *filep, struct kfd_process *p, void *data) · 13 unmodified lines
16211638 return r;
16221639 }
16231640 #else
1641+static int kfd_ioctl_set_xnack_mode(struct file *filep,
1642+ struct kfd_process *p, void *data)
1643+{
1644+ return -EPERM;
1645+}
16241646 static int kfd_ioctl_svm(struct file *filep, struct kfd_process *p, void *data)
16251647 {
16261648 return -EPERM;
@@ -2145,6 +2167,12 @@ static int criu_restore_devices(struct kfd_process *p, · 518 unmodified lines
21452167 ret = PTR_ERR(pdd);
21462168 goto exit;
21472169 }
2170+
2171+ if (!pdd->doorbell_index &&
2172+ kfd_alloc_process_doorbells(pdd->dev, &pdd->doorbell_index) < 0) {
2173+ ret = -ENOMEM;
2174+ goto exit;
2175+ }
21482176 }
21492177
21502178 /*
@@ -2173,6 +2201,8 @@ static int criu_restore_memory_of_gpu(struct kfd_process_device *pdd, · 22 unmodified lines
21732201 return -EINVAL;
21742202
21752203 offset = kfd_get_process_doorbells(pdd);
2204+ if (!offset)
2205+ return -ENOMEM;
21762206 } else if (bo_bucket->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_MMIO_REMAP) {
21772207 /* MMIO BOs need remapped bus address */
21782208 if (bo_bucket->size != PAGE_SIZE) {
@@ -2847,7 +2877,6 @@ static int kfd_mmio_mmap(struct kfd_dev *dev, struct kfd_process *process, · 668 unmodified lines
28472877 struct vm_area_struct *vma)
28482878 {
28492879 phys_addr_t address;
2850− int ret;
28512880
28522881 if (vma->vm_end - vma->vm_start != PAGE_SIZE)
28532882 return -EINVAL;
@@ -2867,12 +2896,11 @@ static int kfd_mmio_mmap(struct kfd_dev *dev, struct kfd_process *process, · 13 unmodified lines
28672896 process->pasid, (unsigned long long) vma->vm_start,
28682897 address, vma->vm_flags, PAGE_SIZE);
28692898
2870− ret = io_remap_pfn_range(vma,
2899+ return io_remap_pfn_range(vma,
28712900 vma->vm_start,
28722901 address >> PAGE_SHIFT,
28732902 PAGE_SIZE,
28742903 vma->vm_page_prot);
2875− return ret;
28762904 }
28772905
28782906
drivers/gpu/drm/amd/amdkfd/kfd_crat.c+2−1
@@ -1522,6 +1522,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev, · 1521 unmodified lines
15221522 case IP_VERSION(11, 0, 0):
15231523 case IP_VERSION(11, 0, 1):
15241524 case IP_VERSION(11, 0, 2):
1525+ case IP_VERSION(11, 0, 3):
15251526 pcache_info = cache_info;
15261527 num_of_cache_types =
15271528 kfd_fill_gpu_cache_info_from_gfx_config(kdev, pcache_info);
@@ -2283,7 +2284,7 @@ static int kfd_create_vcrat_image_gpu(void *pcrat_image, · 755 unmodified lines
22832284
22842285 /* Fill in Subtype: IO_LINKS
22852286 * Only direct links are added here which is Link from GPU to
2286− * to its NUMA node. Indirect links are added by userspace.
2287+ * its NUMA node. Indirect links are added by userspace.
22872288 */
22882289 sub_type_hdr = (typeof(sub_type_hdr))((char *)sub_type_hdr +
22892290 cache_mem_filled);
drivers/gpu/drm/amd/amdkfd/kfd_device.c+8−0
@@ -91,6 +91,7 @@ static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd) · 90 unmodified lines
9191 case IP_VERSION(6, 0, 0):
9292 case IP_VERSION(6, 0, 1):
9393 case IP_VERSION(6, 0, 2):
94+ case IP_VERSION(6, 0, 3):
9495 kfd->device_info.num_sdma_queues_per_engine = 8;
9596 break;
9697 default:
@@ -103,6 +104,7 @@ static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd) · 6 unmodified lines
103104 switch (sdma_version) {
104105 case IP_VERSION(6, 0, 0):
105106 case IP_VERSION(6, 0, 2):
107+ case IP_VERSION(6, 0, 3):
106108 /* Reserve 1 for paging and 1 for gfx */
107109 kfd->device_info.num_reserved_sdma_queues_per_engine = 2;
108110 /* BIT(0)=engine-0 queue-0; BIT(1)=engine-1 queue-0; BIT(2)=engine-0 queue-1; ... */
@@ -150,6 +152,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd) · 41 unmodified lines
150152 case IP_VERSION(11, 0, 0):
151153 case IP_VERSION(11, 0, 1):
152154 case IP_VERSION(11, 0, 2):
155+ case IP_VERSION(11, 0, 3):
153156 kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;
154157 break;
155158 default:
@@ -399,6 +402,11 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) · 243 unmodified lines
399402 gfx_target_version = 110002;
400403 f2g = &gfx_v11_kfd2kgd;
401404 break;
405+ case IP_VERSION(11, 0, 3):
406+ /* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */
407+ gfx_target_version = 110001;
408+ f2g = &gfx_v11_kfd2kgd;
409+ break;
402410 default:
403411 break;
404412 }
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c+21−24
@@ -1242,6 +1242,24 @@ static void init_interrupts(struct device_queue_manager *dqm) · 1241 unmodified lines
12421242 dqm->dev->kfd2kgd->init_interrupts(dqm->dev->adev, i);
12431243 }
12441244
1245+static void init_sdma_bitmaps(struct device_queue_manager *dqm)
1246+{
1247+ unsigned int num_sdma_queues =
1248+ min_t(unsigned int, sizeof(dqm->sdma_bitmap)*8,
1249+ get_num_sdma_queues(dqm));
1250+ unsigned int num_xgmi_sdma_queues =
1251+ min_t(unsigned int, sizeof(dqm->xgmi_sdma_bitmap)*8,
1252+ get_num_xgmi_sdma_queues(dqm));
1253+
1254+ if (num_sdma_queues)
1255+ dqm->sdma_bitmap = GENMASK_ULL(num_sdma_queues-1, 0);
1256+ if (num_xgmi_sdma_queues)
1257+ dqm->xgmi_sdma_bitmap = GENMASK_ULL(num_xgmi_sdma_queues-1, 0);
1258+
1259+ dqm->sdma_bitmap &= ~get_reserved_sdma_queues_bitmap(dqm);
1260+ pr_info("sdma_bitmap: %llx\n", dqm->sdma_bitmap);
1261+}
1262+
12451263 static int initialize_nocpsch(struct device_queue_manager *dqm)
12461264 {
12471265 int pipe, queue;
@@ -1270,11 +1288,7 @@ static int initialize_nocpsch(struct device_queue_manager *dqm) · 22 unmodified lines
12701288
12711289 memset(dqm->vmid_pasid, 0, sizeof(dqm->vmid_pasid));
12721290
1273− dqm->sdma_bitmap = ~0ULL >> (64 - get_num_sdma_queues(dqm));
1274− dqm->sdma_bitmap &= ~(get_reserved_sdma_queues_bitmap(dqm));
1275− pr_info("sdma_bitmap: %llx\n", dqm->sdma_bitmap);
1276−
1277− dqm->xgmi_sdma_bitmap = ~0ULL >> (64 - get_num_xgmi_sdma_queues(dqm));
1291+ init_sdma_bitmaps(dqm);
12781292
12791293 return 0;
12801294 }
@@ -1452,9 +1466,6 @@ static int set_sched_resources(struct device_queue_manager *dqm) · 171 unmodified lines
14521466
14531467 static int initialize_cpsch(struct device_queue_manager *dqm)
14541468 {
1455− uint64_t num_sdma_queues;
1456− uint64_t num_xgmi_sdma_queues;
1457−
14581469 pr_debug("num of pipes: %d\n", get_pipes_per_mec(dqm));
14591470
14601471 mutex_init(&dqm->lock_hidden);
@@ -1463,24 +1474,10 @@ static int initialize_cpsch(struct device_queue_manager *dqm) · 2 unmodified lines
14631474 dqm->active_cp_queue_count = 0;
14641475 dqm->gws_queue_count = 0;
14651476 dqm->active_runlist = false;
1466−
1467− num_sdma_queues = get_num_sdma_queues(dqm);
1468− if (num_sdma_queues >= BITS_PER_TYPE(dqm->sdma_bitmap))
1469− dqm->sdma_bitmap = ULLONG_MAX;
1470− else
1471− dqm->sdma_bitmap = (BIT_ULL(num_sdma_queues) - 1);
1472−
1473− dqm->sdma_bitmap &= ~(get_reserved_sdma_queues_bitmap(dqm));
1474− pr_info("sdma_bitmap: %llx\n", dqm->sdma_bitmap);
1475−
1476− num_xgmi_sdma_queues = get_num_xgmi_sdma_queues(dqm);
1477− if (num_xgmi_sdma_queues >= BITS_PER_TYPE(dqm->xgmi_sdma_bitmap))
1478− dqm->xgmi_sdma_bitmap = ULLONG_MAX;
1479− else
1480− dqm->xgmi_sdma_bitmap = (BIT_ULL(num_xgmi_sdma_queues) - 1);
1481−
14821477 INIT_WORK(&dqm->hw_exception_work, kfd_process_hw_exception);
14831478
1479+ init_sdma_bitmaps(dqm);
1480+
14841481 return 0;
14851482 }
14861483
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c+12−0
@@ -157,6 +157,8 @@ int kfd_doorbell_mmap(struct kfd_dev *dev, struct kfd_process *process, · 156 unmodified lines
157157
158158 /* Calculate physical address of doorbell */
159159 address = kfd_get_process_doorbells(pdd);
160+ if (!address)
161+ return -ENOMEM;
160162 vma->vm_flags |= VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_NORESERVE |
161163 VM_DONTDUMP | VM_PFNMAP;
162164
@@ -275,6 +277,13 @@ uint64_t kfd_get_number_elems(struct kfd_dev *kfd) · 112 unmodified lines
275277
276278 phys_addr_t kfd_get_process_doorbells(struct kfd_process_device *pdd)
277279 {
280+ if (!pdd->doorbell_index) {
281+ int r = kfd_alloc_process_doorbells(pdd->dev,
282+ &pdd->doorbell_index);
283+ if (r)
284+ return 0;
285+ }
286+
278287 return pdd->dev->doorbell_base +
279288 pdd->doorbell_index * kfd_doorbell_process_slice(pdd->dev);
280289 }
@@ -294,6 +303,9 @@ int kfd_alloc_process_doorbells(struct kfd_dev *kfd, unsigned int *doorbell_inde · 13 unmodified lines
294303 if (r > 0)
295304 *doorbell_index = r;
296305
306+ if (r < 0)
307+ pr_err("Failed to allocate process doorbells\n");
308+
297309 return r;
298310 }
299311
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c+36−21
@@ -322,12 +322,13 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange, · 321 unmodified lines
322322 for (i = j = 0; i < npages; i++) {
323323 struct page *spage;
324324
325+ dst[i] = cursor.start + (j << PAGE_SHIFT);
326+ migrate->dst[i] = svm_migrate_addr_to_pfn(adev, dst[i]);
327+ svm_migrate_get_vram_page(prange, migrate->dst[i]);
328+ migrate->dst[i] = migrate_pfn(migrate->dst[i]);
329+
325330 spage = migrate_pfn_to_page(migrate->src[i]);
326331 if (spage && !is_zone_device_page(spage)) {
327− dst[i] = cursor.start + (j << PAGE_SHIFT);
328− migrate->dst[i] = svm_migrate_addr_to_pfn(adev, dst[i]);
329− svm_migrate_get_vram_page(prange, migrate->dst[i]);
330− migrate->dst[i] = migrate_pfn(migrate->dst[i]);
331332 src[i] = dma_map_page(dev, spage, 0, PAGE_SIZE,
332333 DMA_TO_DEVICE);
333334 r = dma_mapping_error(dev, src[i]);
@@ -522,9 +523,6 @@ svm_migrate_ram_to_vram(struct svm_range *prange, uint32_t best_loc, · 188 unmodified lines
522523 pr_debug("svms 0x%p [0x%lx 0x%lx] to gpu 0x%x\n", prange->svms,
523524 prange->start, prange->last, best_loc);
524525
525− /* FIXME: workaround for page locking bug with invalid pages */
526− svm_range_prefault(prange, mm, SVM_ADEV_PGMAP_OWNER(adev));
527−
528526 start = prange->start << PAGE_SHIFT;
529527 end = (prange->last + 1) << PAGE_SHIFT;
530528
@@ -886,7 +884,7 @@ svm_migrate_to_vram(struct svm_range *prange, uint32_t best_loc, · 355 unmodified lines
886884 static vm_fault_t svm_migrate_to_ram(struct vm_fault *vmf)
887885 {
888886 unsigned long addr = vmf->address;
889− struct vm_area_struct *vma;
887+ struct svm_range_bo *svm_bo;
890888 enum svm_work_list_ops op;
891889 struct svm_range *parent;
892890 struct svm_range *prange;
@@ -894,29 +892,42 @@ static vm_fault_t svm_migrate_to_ram(struct vm_fault *vmf) · 1 unmodified line
894892 struct mm_struct *mm;
895893 int r = 0;
896894
897− vma = vmf->vma;
898− mm = vma->vm_mm;
895+ svm_bo = vmf->page->zone_device_data;
896+ if (!svm_bo) {
897+ pr_debug("failed get device page at addr 0x%lx\n", addr);
898+ return VM_FAULT_SIGBUS;
899+ }
900+ if (!mmget_not_zero(svm_bo->eviction_fence->mm)) {
901+ pr_debug("addr 0x%lx of process mm is destroyed\n", addr);
902+ return VM_FAULT_SIGBUS;
903+ }
904+
905+ mm = svm_bo->eviction_fence->mm;
906+ if (mm != vmf->vma->vm_mm)
907+ pr_debug("addr 0x%lx is COW mapping in child process\n", addr);
899908
900− p = kfd_lookup_process_by_mm(vma->vm_mm);
909+ p = kfd_lookup_process_by_mm(mm);
901910 if (!p) {
902911 pr_debug("failed find process at fault address 0x%lx\n", addr);
903− return VM_FAULT_SIGBUS;
912+ r = VM_FAULT_SIGBUS;
913+ goto out_mmput;
904914 }
905915 if (READ_ONCE(p->svms.faulting_task) == current) {
906916 pr_debug("skipping ram migration\n");
907− kfd_unref_process(p);
908− return 0;
917+ r = 0;
918+ goto out_unref_process;
909919 }
910− addr >>= PAGE_SHIFT;
920+
911921 pr_debug("CPU page fault svms 0x%p address 0x%lx\n", &p->svms, addr);
922+ addr >>= PAGE_SHIFT;
912923
913924 mutex_lock(&p->svms.lock);
914925
915926 prange = svm_range_from_addr(&p->svms, addr, &parent);
916927 if (!prange) {
917− pr_debug("cannot find svm range at 0x%lx\n", addr);
928+ pr_debug("failed get range svms 0x%p addr 0x%lx\n", &p->svms, addr);
918929 r = -EFAULT;
919− goto out;
930+ goto out_unlock_svms;
920931 }
921932
922933 mutex_lock(&parent->migrate_mutex);
@@ -938,10 +949,11 @@ static vm_fault_t svm_migrate_to_ram(struct vm_fault *vmf) · 15 unmodified lines
938949 goto out_unlock_prange;
939950 }
940951
941− r = svm_migrate_vram_to_ram(prange, mm, KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU);
952+ r = svm_migrate_vram_to_ram(prange, vmf->vma->vm_mm,
953+ KFD_MIGRATE_TRIGGER_PAGEFAULT_CPU);
942954 if (r)
943− pr_debug("failed %d migrate 0x%p [0x%lx 0x%lx] to ram\n", r,
944− prange, prange->start, prange->last);
955+ pr_debug("failed %d migrate svms 0x%p range 0x%p [0x%lx 0x%lx]\n",
956+ r, prange->svms, prange, prange->start, prange->last);
945957
946958 /* xnack on, update mapping on GPUs with ACCESS_IN_PLACE */
947959 if (p->xnack_enabled && parent == prange)
@@ -955,9 +967,12 @@ out_unlock_prange: · 7 unmodified lines
955967 if (prange != parent)
956968 mutex_unlock(&prange->migrate_mutex);
957969 mutex_unlock(&parent->migrate_mutex);
958−out:
970+out_unlock_svms:
959971 mutex_unlock(&p->svms.lock);
972+out_unref_process:
960973 kfd_unref_process(p);
974+out_mmput:
975+ mmput(mm);
961976
962977 pr_debug("CPU fault svms 0x%p address 0x%lx done\n", &p->svms, addr);
963978
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c+12−73
@@ -181,14 +181,6 @@ static int load_mqd(struct mqd_manager *mm, void *mqd, · 180 unmodified lines
181181 return r;
182182 }
183183
184−static int hiq_load_mqd_kiq(struct mqd_manager *mm, void *mqd,
185− uint32_t pipe_id, uint32_t queue_id,
186− struct queue_properties *p, struct mm_struct *mms)
187−{
188− return mm->dev->kfd2kgd->hiq_mqd_load(mm->dev->adev, mqd, pipe_id,
189− queue_id, p->doorbell_off);
190−}
191−
192184 static void update_mqd(struct mqd_manager *mm, void *mqd,
193185 struct queue_properties *q,
194186 struct mqd_update_info *minfo)
@@ -260,31 +252,6 @@ static uint32_t read_doorbell_id(void *mqd) · 65 unmodified lines
260252 return m->queue_doorbell_id0;
261253 }
262254
263−static int destroy_mqd(struct mqd_manager *mm, void *mqd,
264− enum kfd_preempt_type type,
265− unsigned int timeout, uint32_t pipe_id,
266− uint32_t queue_id)
267−{
268− return mm->dev->kfd2kgd->hqd_destroy
269− (mm->dev->adev, mqd, type, timeout,
270− pipe_id, queue_id);
271−}
272−
273−static void free_mqd(struct mqd_manager *mm, void *mqd,
274− struct kfd_mem_obj *mqd_mem_obj)
275−{
276− kfd_gtt_sa_free(mm->dev, mqd_mem_obj);
277−}
278−
279−static bool is_occupied(struct mqd_manager *mm, void *mqd,
280− uint64_t queue_address, uint32_t pipe_id,
281− uint32_t queue_id)
282−{
283− return mm->dev->kfd2kgd->hqd_is_occupied(
284− mm->dev->adev, queue_address,
285− pipe_id, queue_id);
286−}
287−
288255 static int get_wave_state(struct mqd_manager *mm, void *mqd,
289256 void __user *ctl_stack,
290257 u32 *ctl_stack_used_size,
@@ -353,15 +320,6 @@ static void init_mqd_sdma(struct mqd_manager *mm, void **mqd, · 62 unmodified lines
353320 mm->update_mqd(mm, m, q, NULL);
354321 }
355322
356−static int load_mqd_sdma(struct mqd_manager *mm, void *mqd,
357− uint32_t pipe_id, uint32_t queue_id,
358− struct queue_properties *p, struct mm_struct *mms)
359−{
360− return mm->dev->kfd2kgd->hqd_sdma_load(mm->dev->adev, mqd,
361− (uint32_t __user *)p->write_ptr,
362− mms);
363−}
364−
365323 #define SDMA_RLC_DUMMY_DEFAULT 0xf
366324
367325 static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,
@@ -393,25 +351,6 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd, · 25 unmodified lines
393351 q->is_active = QUEUE_IS_ACTIVE(*q);
394352 }
395353
396−/*
397− * * preempt type here is ignored because there is only one way
398− * * to preempt sdma queue
399− */
400−static int destroy_mqd_sdma(struct mqd_manager *mm, void *mqd,
401− enum kfd_preempt_type type,
402− unsigned int timeout, uint32_t pipe_id,
403− uint32_t queue_id)
404−{
405− return mm->dev->kfd2kgd->hqd_sdma_destroy(mm->dev->adev, mqd, timeout);
406−}
407−
408−static bool is_occupied_sdma(struct mqd_manager *mm, void *mqd,
409− uint64_t queue_address, uint32_t pipe_id,
410− uint32_t queue_id)
411−{
412− return mm->dev->kfd2kgd->hqd_sdma_is_occupied(mm->dev->adev, mqd);
413−}
414−
415354 #if defined(CONFIG_DEBUG_FS)
416355
417356 static int debugfs_show_mqd(struct seq_file *m, void *data)
@@ -449,11 +388,11 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type, · 31 unmodified lines
449388 pr_debug("%s@%i\n", __func__, __LINE__);
450389 mqd->allocate_mqd = allocate_mqd;
451390 mqd->init_mqd = init_mqd;
452− mqd->free_mqd = free_mqd;
391+ mqd->free_mqd = kfd_free_mqd_cp;
453392 mqd->load_mqd = load_mqd;
454393 mqd->update_mqd = update_mqd;
455− mqd->destroy_mqd = destroy_mqd;
456− mqd->is_occupied = is_occupied;
394+ mqd->destroy_mqd = kfd_destroy_mqd_cp;
395+ mqd->is_occupied = kfd_is_occupied_cp;
457396 mqd->mqd_size = sizeof(struct v11_compute_mqd);
458397 mqd->get_wave_state = get_wave_state;
459398 #if defined(CONFIG_DEBUG_FS)
@@ -466,10 +405,10 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type, · 6 unmodified lines
466405 mqd->allocate_mqd = allocate_hiq_mqd;
467406 mqd->init_mqd = init_mqd_hiq;
468407 mqd->free_mqd = free_mqd_hiq_sdma;
469− mqd->load_mqd = hiq_load_mqd_kiq;
408+ mqd->load_mqd = kfd_hiq_load_mqd_kiq;
470409 mqd->update_mqd = update_mqd;
471− mqd->destroy_mqd = destroy_mqd;
472− mqd->is_occupied = is_occupied;
410+ mqd->destroy_mqd = kfd_destroy_mqd_cp;
411+ mqd->is_occupied = kfd_is_occupied_cp;
473412 mqd->mqd_size = sizeof(struct v11_compute_mqd);
474413 #if defined(CONFIG_DEBUG_FS)
475414 mqd->debugfs_show_mqd = debugfs_show_mqd;
@@ -480,11 +419,11 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type, · 4 unmodified lines
480419 case KFD_MQD_TYPE_DIQ:
481420 mqd->allocate_mqd = allocate_mqd;
482421 mqd->init_mqd = init_mqd_hiq;
483− mqd->free_mqd = free_mqd;
422+ mqd->free_mqd = kfd_free_mqd_cp;
484423 mqd->load_mqd = load_mqd;
485424 mqd->update_mqd = update_mqd;
486− mqd->destroy_mqd = destroy_mqd;
487− mqd->is_occupied = is_occupied;
425+ mqd->destroy_mqd = kfd_destroy_mqd_cp;
426+ mqd->is_occupied = kfd_is_occupied_cp;
488427 mqd->mqd_size = sizeof(struct v11_compute_mqd);
489428 #if defined(CONFIG_DEBUG_FS)
490429 mqd->debugfs_show_mqd = debugfs_show_mqd;
@@ -495,10 +434,10 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type, · 4 unmodified lines
495434 mqd->allocate_mqd = allocate_sdma_mqd;
496435 mqd->init_mqd = init_mqd_sdma;
497436 mqd->free_mqd = free_mqd_hiq_sdma;
498− mqd->load_mqd = load_mqd_sdma;
437+ mqd->load_mqd = kfd_load_mqd_sdma;
499438 mqd->update_mqd = update_mqd_sdma;
500− mqd->destroy_mqd = destroy_mqd_sdma;
501− mqd->is_occupied = is_occupied_sdma;
439+ mqd->destroy_mqd = kfd_destroy_mqd_sdma;
440+ mqd->is_occupied = kfd_is_occupied_sdma;
502441 mqd->mqd_size = sizeof(struct v11_sdma_mqd);
503442 #if defined(CONFIG_DEBUG_FS)
504443 mqd->debugfs_show_mqd = debugfs_show_mqd_sdma;
drivers/gpu/drm/amd/amdkfd/kfd_process.c+0−5
@@ -1499,11 +1499,6 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_dev *dev, · 1498 unmodified lines
14991499 if (!pdd)
15001500 return NULL;
15011501
1502− if (kfd_alloc_process_doorbells(dev, &pdd->doorbell_index) < 0) {
1503− pr_err("Failed to alloc doorbell for pdd\n");
1504− goto err_free_pdd;
1505− }
1506−
15071502 if (init_doorbell_bitmap(&pdd->qpd, dev)) {
15081503 pr_err("Failed to init doorbell for process\n");
15091504 goto err_free_pdd;
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c+7−0
@@ -857,6 +857,13 @@ int kfd_criu_restore_queue(struct kfd_process *p, · 856 unmodified lines
857857 ret = -EINVAL;
858858 goto exit;
859859 }
860+
861+ if (!pdd->doorbell_index &&
862+ kfd_alloc_process_doorbells(pdd->dev, &pdd->doorbell_index) < 0) {
863+ ret = -ENOMEM;
864+ goto exit;
865+ }
866+
860867 /* data stored in this order: mqd, ctl_stack */
861868 mqd = q_extra_data;
862869 ctl_stack = mqd + q_data->mqd_size;
drivers/gpu/drm/amd/amdkfd/kfd_svm.c+59−23
@@ -278,7 +278,7 @@ static void svm_range_free(struct svm_range *prange, bool update_mem_usage) · 277 unmodified lines
278278 svm_range_free_dma_mappings(prange);
279279
280280 if (update_mem_usage && !p->xnack_enabled) {
281− pr_debug("unreserve mem limit: %lld\n", size);
281+ pr_debug("unreserve prange 0x%p size: 0x%llx\n", prange, size);
282282 amdgpu_amdkfd_unreserve_mem_limit(NULL, size,
283283 KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
284284 }
@@ -2956,6 +2956,64 @@ out: · 2671 unmodified lines
29562956 return r;
29572957 }
29582958
2959+int
2960+svm_range_switch_xnack_reserve_mem(struct kfd_process *p, bool xnack_enabled)
2961+{
2962+ struct svm_range *prange, *pchild;
2963+ uint64_t reserved_size = 0;
2964+ uint64_t size;
2965+ int r = 0;
2966+
2967+ pr_debug("switching xnack from %d to %d\n", p->xnack_enabled, xnack_enabled);
2968+
2969+ mutex_lock(&p->svms.lock);
2970+
2971+ list_for_each_entry(prange, &p->svms.list, list) {
2972+ svm_range_lock(prange);
2973+ list_for_each_entry(pchild, &prange->child_list, child_list) {
2974+ size = (pchild->last - pchild->start + 1) << PAGE_SHIFT;
2975+ if (xnack_enabled) {
2976+ amdgpu_amdkfd_unreserve_mem_limit(NULL, size,
2977+ KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
2978+ } else {
2979+ r = amdgpu_amdkfd_reserve_mem_limit(NULL, size,
2980+ KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
2981+ if (r)
2982+ goto out_unlock;
2983+ reserved_size += size;
2984+ }
2985+ }
2986+
2987+ size = (prange->last - prange->start + 1) << PAGE_SHIFT;
2988+ if (xnack_enabled) {
2989+ amdgpu_amdkfd_unreserve_mem_limit(NULL, size,
2990+ KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
2991+ } else {
2992+ r = amdgpu_amdkfd_reserve_mem_limit(NULL, size,
2993+ KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
2994+ if (r)
2995+ goto out_unlock;
2996+ reserved_size += size;
2997+ }
2998+out_unlock:
2999+ svm_range_unlock(prange);
3000+ if (r)
3001+ break;
3002+ }
3003+
3004+ if (r)
3005+ amdgpu_amdkfd_unreserve_mem_limit(NULL, reserved_size,
3006+ KFD_IOC_ALLOC_MEM_FLAGS_USERPTR);
3007+ else
3008+ /* Change xnack mode must be inside svms lock, to avoid race with
3009+ * svm_range_deferred_list_work unreserve memory in parallel.
3010+ */
3011+ p->xnack_enabled = xnack_enabled;
3012+
3013+ mutex_unlock(&p->svms.lock);
3014+ return r;
3015+}
3016+
29593017 void svm_range_list_fini(struct kfd_process *p)
29603018 {
29613019 struct svm_range *prange;
@@ -3181,28 +3239,6 @@ out: · 219 unmodified lines
31813239 return best_loc;
31823240 }
31833241
3184−/* FIXME: This is a workaround for page locking bug when some pages are
3185− * invalid during migration to VRAM
3186− */
3187−void svm_range_prefault(struct svm_range *prange, struct mm_struct *mm,
3188− void *owner)
3189−{
3190− struct hmm_range *hmm_range;
3191− int r;
3192−
3193− if (prange->validated_once)
3194− return;
3195−
3196− r = amdgpu_hmm_range_get_pages(&prange->notifier, mm, NULL,
3197− prange->start << PAGE_SHIFT,
3198− prange->npages, &hmm_range,
3199− false, true, owner);
3200− if (!r) {
3201− amdgpu_hmm_range_get_pages_done(hmm_range);
3202− prange->validated_once = true;
3203− }
3204−}
3205−
32063242 /* svm_range_trigger_migration - start page migration if prefetch loc changed
32073243 * @mm: current process mm_struct
32083244 * @prange: svm range structure
drivers/gpu/drm/amd/amdkfd/kfd_svm.h+1−2
@@ -181,8 +181,6 @@ void schedule_deferred_list_work(struct svm_range_list *svms); · 180 unmodified lines
181181 void svm_range_dma_unmap(struct device *dev, dma_addr_t *dma_addr,
182182 unsigned long offset, unsigned long npages);
183183 void svm_range_free_dma_mappings(struct svm_range *prange);
184−void svm_range_prefault(struct svm_range *prange, struct mm_struct *mm,
185− void *owner);
186184 int svm_range_get_info(struct kfd_process *p, uint32_t *num_svm_ranges,
187185 uint64_t *svm_priv_data_size);
188186 int kfd_criu_checkpoint_svm(struct kfd_process *p,
@@ -205,6 +203,7 @@ void svm_range_list_lock_and_flush_work(struct svm_range_list *svms, struct mm_s · 16 unmodified lines
205203 void svm_range_bo_unref_async(struct svm_range_bo *svm_bo);
206204
207205 void svm_range_set_max_pages(struct amdgpu_device *adev);
206+int svm_range_switch_xnack_reserve_mem(struct kfd_process *p, bool xnack_enabled);
208207
209208 #else
210209
drivers/gpu/drm/amd/display/Kconfig+0−2
@@ -28,7 +28,6 @@ config DRM_AMD_DC_SI · 27 unmodified lines
2828 bool "AMD DC support for Southern Islands ASICs"
2929 depends on DRM_AMDGPU_SI
3030 depends on DRM_AMD_DC
31− default n
3231 help
3332 Choose this option to enable new AMD DC support for SI asics
3433 by default. This includes Tahiti, Pitcairn, Cape Verde, Oland.
@@ -43,7 +42,6 @@ config DEBUG_KERNEL_DC · 8 unmodified lines
4342
4443 config DRM_AMD_SECURE_DISPLAY
4544 bool "Enable secure display support"
46− default n
4745 depends on DEBUG_FS
4846 depends on DRM_AMD_DC_DCN
4947 help
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+54−96
@@ -88,6 +88,7 @@ · 87 unmodified lines
8888 #include <drm/drm_vblank.h>
8989 #include <drm/drm_audio_component.h>
9090 #include <drm/drm_gem_atomic_helper.h>
91+#include <drm/drm_plane_helper.h>
9192
9293 #include <acpi/video.h>
9394
@@ -99,8 +100,6 @@ · 5 unmodified lines
99100 #include "soc15_common.h"
100101 #include "vega10_ip_offset.h"
101102
102−#include "soc15_common.h"
103−
104103 #include "gc/gc_11_0_0_offset.h"
105104 #include "gc/gc_11_0_0_sh_mask.h"
106105
@@ -1297,13 +1296,21 @@ static struct hpd_rx_irq_offload_work_queue *hpd_rx_irq_create_workqueue(struct · 1190 unmodified lines
12971296
12981297 if (hpd_rx_offload_wq[i].wq == NULL) {
12991298 DRM_ERROR("create amdgpu_dm_hpd_rx_offload_wq fail!");
1300− return NULL;
1299+ goto out_err;
13011300 }
13021301
13031302 spin_lock_init(&hpd_rx_offload_wq[i].offload_lock);
13041303 }
13051304
13061305 return hpd_rx_offload_wq;
1306+
1307+out_err:
1308+ for (i = 0; i < max_caps; i++) {
1309+ if (hpd_rx_offload_wq[i].wq)
1310+ destroy_workqueue(hpd_rx_offload_wq[i].wq);
1311+ }
1312+ kfree(hpd_rx_offload_wq);
1313+ return NULL;
13071314 }
13081315
13091316 struct amdgpu_stutter_quirk {
@@ -1531,7 +1538,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) · 221 unmodified lines
15311538
15321539 if (amdgpu_dc_debug_mask & DC_DISABLE_DSC) {
15331540 adev->dm.dc->debug.disable_dsc = true;
1534− adev->dm.dc->debug.disable_dsc_edp = true;
15351541 }
15361542
15371543 if (amdgpu_dc_debug_mask & DC_DISABLE_CLOCK_GATING)
@@ -2809,20 +2815,18 @@ static const struct drm_mode_config_funcs amdgpu_dm_mode_funcs = { · 1271 unmodified lines
28092815 };
28102816
28112817 static struct drm_mode_config_helper_funcs amdgpu_dm_mode_config_helperfuncs = {
2812− .atomic_commit_tail = amdgpu_dm_atomic_commit_tail
2818+ .atomic_commit_tail = amdgpu_dm_atomic_commit_tail,
2819+ .atomic_commit_setup = drm_dp_mst_atomic_setup_commit,
28132820 };
28142821
28152822 static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector)
28162823 {
2817− u32 max_avg, min_cll, max, min, q, r;
28182824 struct amdgpu_dm_backlight_caps *caps;
28192825 struct amdgpu_display_manager *dm;
28202826 struct drm_connector *conn_base;
28212827 struct amdgpu_device *adev;
28222828 struct dc_link *link = NULL;
2823− static const u8 pre_computed_values[] = {
2824− 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 65, 66, 68, 69,
2825− 71, 72, 74, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98};
2829+ struct drm_luminance_range_info *luminance_range;
28262830 int i;
28272831
28282832 if (!aconnector || !aconnector->dc_link)
@@ -2844,8 +2848,6 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector) · 15 unmodified lines
28442848 caps = &dm->backlight_caps[i];
28452849 caps->ext_caps = &aconnector->dc_link->dpcd_sink_ext_caps;
28462850 caps->aux_support = false;
2847− max_avg = conn_base->hdr_sink_metadata.hdmi_type1.max_fall;
2848− min_cll = conn_base->hdr_sink_metadata.hdmi_type1.min_cll;
28492851
28502852 if (caps->ext_caps->bits.oled == 1 /*||
28512853 caps->ext_caps->bits.sdr_aux_backlight_control == 1 ||
@@ -2857,31 +2859,9 @@ static void update_connector_ext_caps(struct amdgpu_dm_connector *aconnector) · 5 unmodified lines
28572859 else if (amdgpu_backlight == 1)
28582860 caps->aux_support = true;
28592861
2860− /* From the specification (CTA-861-G), for calculating the maximum
2861− * luminance we need to use:
2862− * Luminance = 50*2**(CV/32)
2863− * Where CV is a one-byte value.
2864− * For calculating this expression we may need float point precision;
2865− * to avoid this complexity level, we take advantage that CV is divided
2866− * by a constant. From the Euclids division algorithm, we know that CV
2867− * can be written as: CV = 32*q + r. Next, we replace CV in the
2868− * Luminance expression and get 50*(2**q)*(2**(r/32)), hence we just
2869− * need to pre-compute the value of r/32. For pre-computing the values
2870− * We just used the following Ruby line:
2871− * (0...32).each {|cv| puts (50*2**(cv/32.0)).round}
2872− * The results of the above expressions can be verified at
2873− * pre_computed_values.
2874− */
2875− q = max_avg >> 5;
2876− r = max_avg % 32;
2877− max = (1 << q) * pre_computed_values[r];
2878−
2879− // min luminance: maxLum * (CV/255)^2 / 100
2880− q = DIV_ROUND_CLOSEST(min_cll, 255);
2881− min = max * DIV_ROUND_CLOSEST((q * q), 100);
2882−
2883− caps->aux_max_input_signal = max;
2884− caps->aux_min_input_signal = min;
2862+ luminance_range = &conn_base->display_info.luminance_range;
2863+ caps->aux_min_input_signal = luminance_range->min_luminance;
2864+ caps->aux_max_input_signal = luminance_range->max_luminance;
28852865 }
28862866
28872867 void amdgpu_dm_update_connector_after_detect(
@@ -5638,7 +5618,8 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector, · 2750 unmodified lines
56385618 dc_dsc_policy_set_enable_dsc_when_not_needed(
56395619 aconnector->dsc_settings.dsc_force_enable == DSC_CLK_FORCE_ENABLE);
56405620
5641− if (aconnector->dc_link && sink->sink_signal == SIGNAL_TYPE_EDP && !dc->debug.disable_dsc_edp &&
5621+ if (aconnector->dc_link && sink->sink_signal == SIGNAL_TYPE_EDP &&
5622+ !aconnector->dc_link->panel_config.dsc.disable_dsc_edp &&
56425623 dc->caps.edp_dsc_support && aconnector->dsc_settings.dsc_force_enable != DSC_CLK_FORCE_DISABLE) {
56435624
56445625 apply_dsc_policy_for_edp(aconnector, sink, stream, dsc_caps, max_dsc_target_bpp_limit_override);
@@ -6330,10 +6311,17 @@ amdgpu_dm_connector_atomic_check(struct drm_connector *conn, · 685 unmodified lines
63306311 drm_atomic_get_old_connector_state(state, conn);
63316312 struct drm_crtc *crtc = new_con_state->crtc;
63326313 struct drm_crtc_state *new_crtc_state;
6314+ struct amdgpu_dm_connector *aconn = to_amdgpu_dm_connector(conn);
63336315 int ret;
63346316
63356317 trace_amdgpu_dm_connector_atomic_check(new_con_state);
63366318
6319+ if (conn->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
6320+ ret = drm_dp_mst_root_conn_atomic_check(new_con_state, &aconn->mst_mgr);
6321+ if (ret < 0)
6322+ return ret;
6323+ }
6324+
63376325 if (!crtc)
63386326 return 0;
63396327
@@ -6417,6 +6405,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder, · 77 unmodified lines
64176405 const struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
64186406 struct drm_dp_mst_topology_mgr *mst_mgr;
64196407 struct drm_dp_mst_port *mst_port;
6408+ struct drm_dp_mst_topology_state *mst_state;
64206409 enum dc_color_depth color_depth;
64216410 int clock, bpp = 0;
64226411 bool is_y420 = false;
@@ -6430,6 +6419,13 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder, · 7 unmodified lines
64306419 if (!crtc_state->connectors_changed && !crtc_state->mode_changed)
64316420 return 0;
64326421
6422+ mst_state = drm_atomic_get_mst_topology_state(state, mst_mgr);
6423+ if (IS_ERR(mst_state))
6424+ return PTR_ERR(mst_state);
6425+
6426+ if (!mst_state->pbn_div)
6427+ mst_state->pbn_div = dm_mst_get_pbn_divider(aconnector->mst_port->dc_link);
6428+
64336429 if (!state->duplicated) {
64346430 int max_bpc = conn_state->max_requested_bpc;
64356431 is_y420 = drm_mode_is_420_also(&connector->display_info, adjusted_mode) &&
@@ -6441,11 +6437,10 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder, · 5 unmodified lines
64416437 clock = adjusted_mode->clock;
64426438 dm_new_connector_state->pbn = drm_dp_calc_pbn_mode(clock, bpp, false);
64436439 }
6444− dm_new_connector_state->vcpi_slots = drm_dp_atomic_find_vcpi_slots(state,
6445− mst_mgr,
6446− mst_port,
6447− dm_new_connector_state->pbn,
6448− dm_mst_get_pbn_divider(aconnector->dc_link));
6440+
6441+ dm_new_connector_state->vcpi_slots =
6442+ drm_dp_atomic_find_time_slots(state, mst_mgr, mst_port,
6443+ dm_new_connector_state->pbn);
64496444 if (dm_new_connector_state->vcpi_slots < 0) {
64506445 DRM_DEBUG_ATOMIC("failed finding vcpi slots: %d\n", (int)dm_new_connector_state->vcpi_slots);
64516446 return dm_new_connector_state->vcpi_slots;
@@ -6515,18 +6510,12 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state, · 63 unmodified lines
65156510 dm_conn_state->pbn = pbn;
65166511 dm_conn_state->vcpi_slots = slot_num;
65176512
6518− drm_dp_mst_atomic_enable_dsc(state,
6519− aconnector->port,
6520− dm_conn_state->pbn,
6521− 0,
6513+ drm_dp_mst_atomic_enable_dsc(state, aconnector->port, dm_conn_state->pbn,
65226514 false);
65236515 continue;
65246516 }
65256517
6526− vcpi = drm_dp_mst_atomic_enable_dsc(state,
6527− aconnector->port,
6528− pbn, pbn_div,
6529− true);
6518+ vcpi = drm_dp_mst_atomic_enable_dsc(state, aconnector->port, pbn, true);
65306519 if (vcpi < 0)
65316520 return vcpi;
65326521
@@ -7396,11 +7385,6 @@ static void update_freesync_state_on_stream( · 863 unmodified lines
73967385 &vrr_infopacket,
73977386 pack_sdp_v1_3);
73987387
7399− new_crtc_state->freesync_timing_changed |=
7400− (memcmp(&acrtc->dm_irq_params.vrr_params.adjust,
7401− &vrr_params.adjust,
7402− sizeof(vrr_params.adjust)) != 0);
7403−
74047388 new_crtc_state->freesync_vrr_info_changed |=
74057389 (memcmp(&new_crtc_state->vrr_infopacket,
74067390 &vrr_infopacket,
@@ -7409,7 +7393,6 @@ static void update_freesync_state_on_stream( · 2 unmodified lines
74097393 acrtc->dm_irq_params.vrr_params = vrr_params;
74107394 new_crtc_state->vrr_infopacket = vrr_infopacket;
74117395
7412− new_stream->adjust = acrtc->dm_irq_params.vrr_params.adjust;
74137396 new_stream->vrr_infopacket = vrr_infopacket;
74147397
74157398 if (new_crtc_state->freesync_vrr_info_changed)
@@ -7472,10 +7455,6 @@ static void update_stream_irq_parameters( · 56 unmodified lines
74727455 new_stream,
74737456 &config, &vrr_params);
74747457
7475− new_crtc_state->freesync_timing_changed |=
7476− (memcmp(&acrtc->dm_irq_params.vrr_params.adjust,
7477− &vrr_params.adjust, sizeof(vrr_params.adjust)) != 0);
7478−
74797458 new_crtc_state->freesync_config = config;
74807459 /* Copy state for access from DM IRQ handler */
74817460 acrtc->dm_irq_params.freesync_config = config;
@@ -8001,6 +7980,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · 519 unmodified lines
80017980 DRM_ERROR("Waiting for fences timed out!");
80027981
80037982 drm_atomic_helper_update_legacy_modeset_state(dev, state);
7983+ drm_dp_mst_atomic_wait_for_dependencies(state);
80047984
80057985 dm_state = dm_atomic_get_new_state(state);
80067986 if (dm_state && dm_state->context) {
@@ -8399,7 +8379,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) · 392 unmodified lines
83998379 dc_release_state(dc_state_temp);
84008380 }
84018381
8402−
84038382 static int dm_force_atomic_commit(struct drm_connector *connector)
84048383 {
84058384 int ret = 0;
@@ -9330,6 +9309,7 @@ static int add_affected_mst_dsc_crtcs(struct drm_atomic_state *state, struct drm · 924 unmodified lines
93309309
93319310 /**
93329311 * amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
9312+ *
93339313 * @dev: The DRM device
93349314 * @state: The atomic state to commit
93359315 *
@@ -9370,8 +9350,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, · 34 unmodified lines
93709350 struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state;
93719351 #if defined(CONFIG_DRM_AMD_DC_DCN)
93729352 struct dsc_mst_fairness_vars vars[MAX_PIPES];
9373− struct drm_dp_mst_topology_state *mst_state;
9374− struct drm_dp_mst_topology_mgr *mgr;
93759353 #endif
93769354
93779355 trace_amdgpu_dm_atomic_check_begin(state);
@@ -9388,9 +9366,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, · 10 unmodified lines
93889366 struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
93899367
93909368 /* Skip connectors that are disabled or part of modeset already. */
9391− if (!old_con_state->crtc && !new_con_state->crtc)
9392− continue;
9393−
93949369 if (!new_con_state->crtc)
93959370 continue;
93969371
@@ -9618,33 +9593,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, · 221 unmodified lines
96189593 lock_and_validation_needed = true;
96199594 }
96209595
9621−#if defined(CONFIG_DRM_AMD_DC_DCN)
9622− /* set the slot info for each mst_state based on the link encoding format */
9623− for_each_new_mst_mgr_in_state(state, mgr, mst_state, i) {
9624− struct amdgpu_dm_connector *aconnector;
9625− struct drm_connector *connector;
9626− struct drm_connector_list_iter iter;
9627− u8 link_coding_cap;
9628−
9629− if (!mgr->mst_state )
9630− continue;
9631−
9632− drm_connector_list_iter_begin(dev, &iter);
9633− drm_for_each_connector_iter(connector, &iter) {
9634− int id = connector->index;
9635−
9636− if (id == mst_state->mgr->conn_base_id) {
9637− aconnector = to_amdgpu_dm_connector(connector);
9638− link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
9639− drm_dp_mst_update_slots(mst_state, link_coding_cap);
9640−
9641− break;
9642− }
9643− }
9644− drm_connector_list_iter_end(&iter);
9645−
9646− }
9647−#endif
96489596 /**
96499597 * Streams and planes are reset when there are changes that affect
96509598 * bandwidth. Anything that affects bandwidth needs to go through
@@ -9952,8 +9900,19 @@ static int parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector, · 301 unmodified lines
99529900 return valid_vsdb_found ? i : -ENODEV;
99539901 }
99549902
9903+/**
9904+ * amdgpu_dm_update_freesync_caps - Update Freesync capabilities
9905+ *
9906+ * @connector: Connector to query.
9907+ * @edid: EDID from monitor
9908+ *
9909+ * Amdgpu supports Freesync in DP and HDMI displays, and it is required to keep
9910+ * track of some of the display information in the internal data struct used by
9911+ * amdgpu_dm. This function checks which type of connector we need to set the
9912+ * FreeSync parameters.
9913+ */
99559914 void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
9956− struct edid *edid)
9915+ struct edid *edid)
99579916 {
99589917 int i = 0;
99599918 struct detailed_timing *timing;
@@ -9966,8 +9925,8 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, · 6 unmodified lines
99669925
99679926 struct drm_device *dev = connector->dev;
99689927 struct amdgpu_device *adev = drm_to_adev(dev);
9969− bool freesync_capable = false;
99709928 struct amdgpu_hdmi_vsdb_info vsdb_info = {0};
9929+ bool freesync_capable = false;
99719930
99729931 if (!connector->state) {
99739932 DRM_ERROR("%s - Connector has no state", __func__);
@@ -9996,7 +9955,6 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, · 22 unmodified lines
99969955 if (!adev->dm.freesync_module)
99979956 goto update;
99989957
9999−
100009958 if (sink->sink_signal == SIGNAL_TYPE_DISPLAY_PORT
100019959 || sink->sink_signal == SIGNAL_TYPE_EDP) {
100029960 bool edid_check_required = false;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h+41−6
@@ -598,6 +598,10 @@ struct amdgpu_dm_connector { · 597 unmodified lines
598598 * The 'current' sink is in dc_link->sink. */
599599 struct dc_sink *dc_sink;
600600 struct dc_link *dc_link;
601+
602+ /**
603+ * @dc_em_sink: Reference to the emulated (virtual) sink.
604+ */
601605 struct dc_sink *dc_em_sink;
602606
603607 /* DM only */
@@ -610,7 +614,16 @@ struct amdgpu_dm_connector { · 6 unmodified lines
610614 struct amdgpu_i2c_adapter *i2c;
611615
612616 /* Monitor range limits */
613− int min_vfreq ;
617+ /**
618+ * @min_vfreq: Minimal frequency supported by the display in Hz. This
619+ * value is set to zero when there is no FreeSync support.
620+ */
621+ int min_vfreq;
622+
623+ /**
624+ * @max_vfreq: Maximum frequency supported by the display in Hz. This
625+ * value is set to zero when there is no FreeSync support.
626+ */
614627 int max_vfreq ;
615628 int pixel_clock_mhz;
616629
@@ -668,7 +681,6 @@ struct dm_crtc_state { · 51 unmodified lines
668681
669682 int crc_skip_count;
670683
671− bool freesync_timing_changed;
672684 bool freesync_vrr_info_changed;
673685
674686 bool dsc_force_changed;
@@ -705,11 +717,34 @@ struct dm_connector_state { · 30 unmodified lines
705717 uint64_t pbn;
706718 };
707719
720+/**
721+ * struct amdgpu_hdmi_vsdb_info - Keep track of the VSDB info
722+ *
723+ * AMDGPU supports FreeSync over HDMI by using the VSDB section, and this
724+ * struct is useful to keep track of the display-specific information about
725+ * FreeSync.
726+ */
708727 struct amdgpu_hdmi_vsdb_info {
709− unsigned int amd_vsdb_version; /* VSDB version, should be used to determine which VSIF to send */
710− bool freesync_supported; /* FreeSync Supported */
711− unsigned int min_refresh_rate_hz; /* FreeSync Minimum Refresh Rate in Hz */
712− unsigned int max_refresh_rate_hz; /* FreeSync Maximum Refresh Rate in Hz */
728+ /**
729+ * @amd_vsdb_version: Vendor Specific Data Block Version, should be
730+ * used to determine which Vendor Specific InfoFrame (VSIF) to send.
731+ */
732+ unsigned int amd_vsdb_version;
733+
734+ /**
735+ * @freesync_supported: FreeSync Supported.
736+ */
737+ bool freesync_supported;
738+
739+ /**
740+ * @min_refresh_rate_hz: FreeSync Minimum Refresh Rate in Hz.
741+ */
742+ unsigned int min_refresh_rate_hz;
743+
744+ /**
745+ * @max_refresh_rate_hz: FreeSync Maximum Refresh Rate in Hz
746+ */
747+ unsigned int max_refresh_rate_hz;
713748 };
714749
715750
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c+81−28
@@ -29,7 +29,9 @@ · 28 unmodified lines
2929 #include "modules/color/color_gamma.h"
3030 #include "basics/conversion.h"
3131
32−/*
32+/**
33+ * DOC: overview
34+ *
3335 * The DC interface to HW gives us the following color management blocks
3436 * per pipe (surface):
3537 *
@@ -71,8 +73,8 @@ · 35 unmodified lines
7173
7274 #define MAX_DRM_LUT_VALUE 0xFFFF
7375
74−/*
75− * Initialize the color module.
76+/**
77+ * amdgpu_dm_init_color_mod - Initialize the color module.
7678 *
7779 * We're not using the full color module, only certain components.
7880 * Only call setup functions for components that we need.
@@ -82,7 +84,14 @@ void amdgpu_dm_init_color_mod(void) · 3 unmodified lines
8284 setup_x_points_distribution();
8385 }
8486
85−/* Extracts the DRM lut and lut size from a blob. */
87+/**
88+ * __extract_blob_lut - Extracts the DRM lut and lut size from a blob.
89+ * @blob: DRM color mgmt property blob
90+ * @size: lut size
91+ *
92+ * Returns:
93+ * DRM LUT or NULL
94+ */
8695 static const struct drm_color_lut *
8796 __extract_blob_lut(const struct drm_property_blob *blob, uint32_t *size)
8897 {
@@ -90,13 +99,18 @@ __extract_blob_lut(const struct drm_property_blob *blob, uint32_t *size) · 1 unmodified line
9099 return blob ? (struct drm_color_lut *)blob->data : NULL;
91100 }
92101
93−/*
94− * Return true if the given lut is a linear mapping of values, i.e. it acts
95− * like a bypass LUT.
102+/**
103+ * __is_lut_linear - check if the given lut is a linear mapping of values
104+ * @lut: given lut to check values
105+ * @size: lut size
96106 *
97107 * It is considered linear if the lut represents:
98− * f(a) = (0xFF00/MAX_COLOR_LUT_ENTRIES-1)a; for integer a in
99− * [0, MAX_COLOR_LUT_ENTRIES)
108+ * f(a) = (0xFF00/MAX_COLOR_LUT_ENTRIES-1)a; for integer a in [0,
109+ * MAX_COLOR_LUT_ENTRIES)
110+ *
111+ * Returns:
112+ * True if the given lut is a linear mapping of values, i.e. it acts like a
113+ * bypass LUT. Otherwise, false.
100114 */
101115 static bool __is_lut_linear(const struct drm_color_lut *lut, uint32_t size)
102116 {
@@ -119,9 +133,13 @@ static bool __is_lut_linear(const struct drm_color_lut *lut, uint32_t size) · 16 unmodified lines
119133 return true;
120134 }
121135
122−/*
123− * Convert the drm_color_lut to dc_gamma. The conversion depends on the size
124− * of the lut - whether or not it's legacy.
136+/**
137+ * __drm_lut_to_dc_gamma - convert the drm_color_lut to dc_gamma.
138+ * @lut: DRM lookup table for color conversion
139+ * @gamma: DC gamma to set entries
140+ * @is_legacy: legacy or atomic gamma
141+ *
142+ * The conversion depends on the size of the lut - whether or not it's legacy.
125143 */
126144 static void __drm_lut_to_dc_gamma(const struct drm_color_lut *lut,
127145 struct dc_gamma *gamma, bool is_legacy)
@@ -154,8 +172,11 @@ static void __drm_lut_to_dc_gamma(const struct drm_color_lut *lut, · 26 unmodified lines
154172 }
155173 }
156174
157−/*
158− * Converts a DRM CTM to a DC CSC float matrix.
175+/**
176+ * __drm_ctm_to_dc_matrix - converts a DRM CTM to a DC CSC float matrix
177+ * @ctm: DRM color transformation matrix
178+ * @matrix: DC CSC float matrix
179+ *
159180 * The matrix needs to be a 3x4 (12 entry) matrix.
160181 */
161182 static void __drm_ctm_to_dc_matrix(const struct drm_color_ctm *ctm,
@@ -189,7 +210,18 @@ static void __drm_ctm_to_dc_matrix(const struct drm_color_ctm *ctm, · 27 unmodified lines
189210 }
190211 }
191212
192−/* Calculates the legacy transfer function - only for sRGB input space. */
213+/**
214+ * __set_legacy_tf - Calculates the legacy transfer function
215+ * @func: transfer function
216+ * @lut: lookup table that defines the color space
217+ * @lut_size: size of respective lut
218+ * @has_rom: if ROM can be used for hardcoded curve
219+ *
220+ * Only for sRGB input space
221+ *
222+ * Returns:
223+ * 0 in case of success, -ENOMEM if fails
224+ */
193225 static int __set_legacy_tf(struct dc_transfer_func *func,
194226 const struct drm_color_lut *lut, uint32_t lut_size,
195227 bool has_rom)
@@ -218,7 +250,16 @@ static int __set_legacy_tf(struct dc_transfer_func *func, · 22 unmodified lines
218250 return res ? 0 : -ENOMEM;
219251 }
220252
221−/* Calculates the output transfer function based on expected input space. */
253+/**
254+ * __set_output_tf - calculates the output transfer function based on expected input space.
255+ * @func: transfer function
256+ * @lut: lookup table that defines the color space
257+ * @lut_size: size of respective lut
258+ * @has_rom: if ROM can be used for hardcoded curve
259+ *
260+ * Returns:
261+ * 0 in case of success. -ENOMEM if fails.
262+ */
222263 static int __set_output_tf(struct dc_transfer_func *func,
223264 const struct drm_color_lut *lut, uint32_t lut_size,
224265 bool has_rom)
@@ -262,7 +303,16 @@ static int __set_output_tf(struct dc_transfer_func *func, · 37 unmodified lines
262303 return res ? 0 : -ENOMEM;
263304 }
264305
265−/* Caculates the input transfer function based on expected input space. */
306+/**
307+ * __set_input_tf - calculates the input transfer function based on expected
308+ * input space.
309+ * @func: transfer function
310+ * @lut: lookup table that defines the color space
311+ * @lut_size: size of respective lut.
312+ *
313+ * Returns:
314+ * 0 in case of success. -ENOMEM if fails.
315+ */
266316 static int __set_input_tf(struct dc_transfer_func *func,
267317 const struct drm_color_lut *lut, uint32_t lut_size)
268318 {
@@ -285,13 +335,14 @@ static int __set_input_tf(struct dc_transfer_func *func, · 16 unmodified lines
285335 }
286336
287337 /**
288− * amdgpu_dm_verify_lut_sizes
338+ * amdgpu_dm_verify_lut_sizes - verifies if DRM luts match the hw supported sizes
289339 * @crtc_state: the DRM CRTC state
290340 *
291− * Verifies that the Degamma and Gamma LUTs attached to the |crtc_state| are of
292− * the expected size.
341+ * Verifies that the Degamma and Gamma LUTs attached to the &crtc_state
342+ * are of the expected size.
293343 *
294− * Returns 0 on success.
344+ * Returns:
345+ * 0 on success. -EINVAL if any lut sizes are invalid.
295346 */
296347 int amdgpu_dm_verify_lut_sizes(const struct drm_crtc_state *crtc_state)
297348 {
@@ -327,9 +378,9 @@ int amdgpu_dm_verify_lut_sizes(const struct drm_crtc_state *crtc_state) · 29 unmodified lines
327378 * of the HW blocks as long as the CRTC CTM always comes before the
328379 * CRTC RGM and after the CRTC DGM.
329380 *
330− * The CRTC RGM block will be placed in the RGM LUT block if it is non-linear.
331− * The CRTC DGM block will be placed in the DGM LUT block if it is non-linear.
332− * The CRTC CTM will be placed in the gamut remap block if it is non-linear.
381+ * - The CRTC RGM block will be placed in the RGM LUT block if it is non-linear.
382+ * - The CRTC DGM block will be placed in the DGM LUT block if it is non-linear.
383+ * - The CRTC CTM will be placed in the gamut remap block if it is non-linear.
333384 *
334385 * The RGM block is typically more fully featured and accurate across
335386 * all ASICs - DCE can't support a custom non-linear CRTC DGM.
@@ -338,7 +389,8 @@ int amdgpu_dm_verify_lut_sizes(const struct drm_crtc_state *crtc_state) · 2 unmodified lines
338389 * management at once we have to either restrict the usage of CRTC properties
339390 * or blend adjustments together.
340391 *
341− * Returns 0 on success.
392+ * Returns:
393+ * 0 on success. Error code if setup fails.
342394 */
343395 int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc)
344396 {
@@ -393,7 +445,7 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc) · 48 unmodified lines
393445 if (r)
394446 return r;
395447 } else if (has_regamma) {
396− /* CRTC RGM goes into RGM LUT. */
448+ /* If atomic regamma, CRTC RGM goes into RGM LUT. */
397449 stream->out_transfer_func->type = TF_TYPE_DISTRIBUTED_POINTS;
398450 stream->out_transfer_func->tf = TRANSFER_FUNCTION_LINEAR;
399451
@@ -450,9 +502,10 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc) · 50 unmodified lines
450502 *
451503 * Update the underlying dc_stream_state's input transfer function (ITF) in
452504 * preparation for hardware commit. The transfer function used depends on
453− * the prepartion done on the stream for color management.
505+ * the preparation done on the stream for color management.
454506 *
455− * Returns 0 on success.
507+ * Returns:
508+ * 0 on success. -ENOMEM if mem allocation fails.
456509 */
457510 int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc,
458511 struct dc_plane_state *dc_plane_state)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c+104−77
@@ -27,6 +27,7 @@ · 26 unmodified lines
2727 #include <linux/acpi.h>
2828 #include <linux/i2c.h>
2929
30+#include <drm/drm_atomic.h>
3031 #include <drm/drm_probe_helper.h>
3132 #include <drm/amdgpu_drm.h>
3233 #include <drm/drm_edid.h>
@@ -153,41 +154,28 @@ enum dc_edid_status dm_helpers_parse_edid_caps( · 120 unmodified lines
153154 return result;
154155 }
155156
156−static void get_payload_table(
157− struct amdgpu_dm_connector *aconnector,
158− struct dp_mst_stream_allocation_table *proposed_table)
157+static void
158+fill_dc_mst_payload_table_from_drm(struct drm_dp_mst_topology_state *mst_state,
159+ struct amdgpu_dm_connector *aconnector,
160+ struct dc_dp_mst_stream_allocation_table *table)
159161 {
160− int i;
161− struct drm_dp_mst_topology_mgr *mst_mgr =
162− &aconnector->mst_port->mst_mgr;
163−
164− mutex_lock(&mst_mgr->payload_lock);
165−
166− proposed_table->stream_count = 0;
167−
168− /* number of active streams */
169− for (i = 0; i < mst_mgr->max_payloads; i++) {
170− if (mst_mgr->payloads[i].num_slots == 0)
171− break; /* end of vcp_id table */
172−
173− ASSERT(mst_mgr->payloads[i].payload_state !=
174− DP_PAYLOAD_DELETE_LOCAL);
175−
176− if (mst_mgr->payloads[i].payload_state == DP_PAYLOAD_LOCAL ||
177− mst_mgr->payloads[i].payload_state ==
178− DP_PAYLOAD_REMOTE) {
179−
180− struct dp_mst_stream_allocation *sa =
181− &proposed_table->stream_allocations[
182− proposed_table->stream_count];
183−
184− sa->slot_count = mst_mgr->payloads[i].num_slots;
185− sa->vcp_id = mst_mgr->proposed_vcpis[i]->vcpi;
186− proposed_table->stream_count++;
187− }
162+ struct dc_dp_mst_stream_allocation_table new_table = { 0 };
163+ struct dc_dp_mst_stream_allocation *sa;
164+ struct drm_dp_mst_atomic_payload *payload;
165+
166+ /* Fill payload info*/
167+ list_for_each_entry(payload, &mst_state->payloads, next) {
168+ if (payload->delete)
169+ continue;
170+
171+ sa = &new_table.stream_allocations[new_table.stream_count];
172+ sa->slot_count = payload->time_slots;
173+ sa->vcp_id = payload->vcpi;
174+ new_table.stream_count++;
188175 }
189176
190− mutex_unlock(&mst_mgr->payload_lock);
177+ /* Overwrite the old table */
178+ *table = new_table;
191179 }
192180
193181 void dm_helpers_dp_update_branch_info(
@@ -201,15 +189,13 @@ void dm_helpers_dp_update_branch_info( · 7 unmodified lines
201189 bool dm_helpers_dp_mst_write_payload_allocation_table(
202190 struct dc_context *ctx,
203191 const struct dc_stream_state *stream,
204− struct dp_mst_stream_allocation_table *proposed_table,
192+ struct dc_dp_mst_stream_allocation_table *proposed_table,
205193 bool enable)
206194 {
207195 struct amdgpu_dm_connector *aconnector;
208− struct dm_connector_state *dm_conn_state;
196+ struct drm_dp_mst_topology_state *mst_state;
197+ struct drm_dp_mst_atomic_payload *payload;
209198 struct drm_dp_mst_topology_mgr *mst_mgr;
210− struct drm_dp_mst_port *mst_port;
211− bool ret;
212− u8 link_coding_cap = DP_8b_10b_ENCODING;
213199
214200 aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
215201 /* Accessing the connector state is required for vcpi_slots allocation
@@ -220,40 +206,21 @@ bool dm_helpers_dp_mst_write_payload_allocation_table( · 4 unmodified lines
220206 if (!aconnector || !aconnector->mst_port)
221207 return false;
222208
223− dm_conn_state = to_dm_connector_state(aconnector->base.state);
224−
225209 mst_mgr = &aconnector->mst_port->mst_mgr;
226−
227− if (!mst_mgr->mst_state)
228− return false;
229−
230− mst_port = aconnector->port;
231−
232−#if defined(CONFIG_DRM_AMD_DC_DCN)
233− link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
234−#endif
235−
236− if (enable) {
237−
238− ret = drm_dp_mst_allocate_vcpi(mst_mgr, mst_port,
239− dm_conn_state->pbn,
240− dm_conn_state->vcpi_slots);
241− if (!ret)
242− return false;
243−
244− } else {
245− drm_dp_mst_reset_vcpi_slots(mst_mgr, mst_port);
246− }
210+ mst_state = to_drm_dp_mst_topology_state(mst_mgr->base.state);
247211
248212 /* It's OK for this to fail */
249− drm_dp_update_payload_part1(mst_mgr, (link_coding_cap == DP_CAP_ANSI_128B132B) ? 0:1);
213+ payload = drm_atomic_get_mst_payload_state(mst_state, aconnector->port);
214+ if (enable)
215+ drm_dp_add_payload_part1(mst_mgr, mst_state, payload);
216+ else
217+ drm_dp_remove_payload(mst_mgr, mst_state, payload);
250218
251219 /* mst_mgr->->payloads are VC payload notify MST branch using DPCD or
252220 * AUX message. The sequence is slot 1-63 allocated sequence for each
253221 * stream. AMD ASIC stream slot allocation should follow the same
254222 * sequence. copy DRM MST allocation to dc */
255−
256− get_payload_table(aconnector, proposed_table);
223+ fill_dc_mst_payload_table_from_drm(mst_state, aconnector, proposed_table);
257224
258225 return true;
259226 }
@@ -310,8 +277,9 @@ bool dm_helpers_dp_mst_send_payload_allocation( · 50 unmodified lines
310277 bool enable)
311278 {
312279 struct amdgpu_dm_connector *aconnector;
280+ struct drm_dp_mst_topology_state *mst_state;
313281 struct drm_dp_mst_topology_mgr *mst_mgr;
314− struct drm_dp_mst_port *mst_port;
282+ struct drm_dp_mst_atomic_payload *payload;
315283 enum mst_progress_status set_flag = MST_ALLOCATE_NEW_PAYLOAD;
316284 enum mst_progress_status clr_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
317285
@@ -320,19 +288,16 @@ bool dm_helpers_dp_mst_send_payload_allocation( · 2 unmodified lines
320288 if (!aconnector || !aconnector->mst_port)
321289 return false;
322290
323− mst_port = aconnector->port;
324−
325291 mst_mgr = &aconnector->mst_port->mst_mgr;
292+ mst_state = to_drm_dp_mst_topology_state(mst_mgr->base.state);
326293
327− if (!mst_mgr->mst_state)
328− return false;
329−
294+ payload = drm_atomic_get_mst_payload_state(mst_state, aconnector->port);
330295 if (!enable) {
331296 set_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
332297 clr_flag = MST_ALLOCATE_NEW_PAYLOAD;
333298 }
334299
335− if (drm_dp_update_payload_part2(mst_mgr)) {
300+ if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload)) {
336301 amdgpu_dm_set_mst_status(&aconnector->mst_status,
337302 set_flag, false);
338303 } else {
@@ -342,9 +307,6 @@ bool dm_helpers_dp_mst_send_payload_allocation( · 3 unmodified lines
342307 clr_flag, false);
343308 }
344309
345− if (!enable)
346− drm_dp_mst_deallocate_vcpi(mst_mgr, mst_port);
347−
348310 return true;
349311 }
350312
@@ -729,8 +691,14 @@ bool dm_helpers_dp_write_dsc_enable( · 378 unmodified lines
729691 const struct dc_stream_state *stream,
730692 bool enable)
731693 {
732− uint8_t enable_dsc = enable ? 1 : 0;
694+ static const uint8_t DSC_DISABLE;
695+ static const uint8_t DSC_DECODING = 0x01;
696+ static const uint8_t DSC_PASSTHROUGH = 0x02;
697+
733698 struct amdgpu_dm_connector *aconnector;
699+ struct drm_dp_mst_port *port;
700+ uint8_t enable_dsc = enable ? DSC_DECODING : DSC_DISABLE;
701+ uint8_t enable_passthrough = enable ? DSC_PASSTHROUGH : DSC_DISABLE;
734702 uint8_t ret = 0;
735703
736704 if (!stream)
@@ -750,8 +718,39 @@ bool dm_helpers_dp_write_dsc_enable( · 13 unmodified lines
750718 aconnector->dsc_aux, stream, enable_dsc);
751719 #endif
752720
753− ret = drm_dp_dpcd_write(aconnector->dsc_aux, DP_DSC_ENABLE, &enable_dsc, 1);
754− DC_LOG_DC("Send DSC %s to MST RX\n", enable_dsc ? "enable" : "disable");
721+ port = aconnector->port;
722+
723+ if (enable) {
724+ if (port->passthrough_aux) {
725+ ret = drm_dp_dpcd_write(port->passthrough_aux,
726+ DP_DSC_ENABLE,
727+ &enable_passthrough, 1);
728+ DC_LOG_DC("Sent DSC pass-through enable to virtual dpcd port, ret = %u\n",
729+ ret);
730+ }
731+
732+ ret = drm_dp_dpcd_write(aconnector->dsc_aux,
733+ DP_DSC_ENABLE, &enable_dsc, 1);
734+ DC_LOG_DC("Sent DSC decoding enable to %s port, ret = %u\n",
735+ (port->passthrough_aux) ? "remote RX" :
736+ "virtual dpcd",
737+ ret);
738+ } else {
739+ ret = drm_dp_dpcd_write(aconnector->dsc_aux,
740+ DP_DSC_ENABLE, &enable_dsc, 1);
741+ DC_LOG_DC("Sent DSC decoding disable to %s port, ret = %u\n",
742+ (port->passthrough_aux) ? "remote RX" :
743+ "virtual dpcd",
744+ ret);
745+
746+ if (port->passthrough_aux) {
747+ ret = drm_dp_dpcd_write(port->passthrough_aux,
748+ DP_DSC_ENABLE,
749+ &enable_passthrough, 1);
750+ DC_LOG_DC("Sent DSC pass-through disable to virtual dpcd port, ret = %u\n",
751+ ret);
752+ }
753+ }
755754 }
756755
757756 if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT || stream->signal == SIGNAL_TYPE_EDP) {
@@ -768,7 +767,7 @@ bool dm_helpers_dp_write_dsc_enable( · 10 unmodified lines
768767 #endif
769768 }
770769
771− return (ret > 0);
770+ return ret;
772771 }
773772
774773 bool dm_helpers_is_dp_sink_present(struct dc_link *link)
@@ -879,6 +878,34 @@ void dm_helpers_smu_timeout(struct dc_context *ctx, unsigned int msg_id, unsigne · 104 unmodified lines
879878 //amdgpu_device_gpu_recover(dc_context->driver-context, NULL);
880879 }
881880
881+void dm_helpers_init_panel_settings(
882+ struct dc_context *ctx,
883+ struct dc_panel_config *panel_config,
884+ struct dc_sink *sink)
885+{
886+ // Extra Panel Power Sequence
887+ panel_config->pps.extra_t3_ms = sink->edid_caps.panel_patch.extra_t3_ms;
888+ panel_config->pps.extra_t7_ms = sink->edid_caps.panel_patch.extra_t7_ms;
889+ panel_config->pps.extra_delay_backlight_off = sink->edid_caps.panel_patch.extra_delay_backlight_off;
890+ panel_config->pps.extra_post_t7_ms = 0;
891+ panel_config->pps.extra_pre_t11_ms = 0;
892+ panel_config->pps.extra_t12_ms = sink->edid_caps.panel_patch.extra_t12_ms;
893+ panel_config->pps.extra_post_OUI_ms = 0;
894+ // Feature DSC
895+ panel_config->dsc.disable_dsc_edp = false;
896+ panel_config->dsc.force_dsc_edp_policy = 0;
897+}
898+
899+void dm_helpers_override_panel_settings(
900+ struct dc_context *ctx,
901+ struct dc_panel_config *panel_config)
902+{
903+ // Feature DSC
904+ if (amdgpu_dc_debug_mask & DC_DISABLE_DSC) {
905+ panel_config->dsc.disable_dsc_edp = true;
906+ }
907+}
908+
882909 void *dm_helpers_allocate_gpu_mem(
883910 struct dc_context *ctx,
884911 enum dc_gpu_mem_alloc_type type,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c+123−86
@@ -36,6 +36,7 @@ · 35 unmodified lines
3636 #include "dm_helpers.h"
3737
3838 #include "dc_link_ddc.h"
39+#include "dc_link_dp.h"
3940 #include "ddc_service_types.h"
4041 #include "dpcd_defs.h"
4142
@@ -447,34 +448,13 @@ dm_dp_mst_detect(struct drm_connector *connector, · 405 unmodified lines
447448 }
448449
449450 static int dm_dp_mst_atomic_check(struct drm_connector *connector,
450− struct drm_atomic_state *state)
451+ struct drm_atomic_state *state)
451452 {
452− struct drm_connector_state *new_conn_state =
453− drm_atomic_get_new_connector_state(state, connector);
454− struct drm_connector_state *old_conn_state =
455− drm_atomic_get_old_connector_state(state, connector);
456453 struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
457− struct drm_crtc_state *new_crtc_state;
458− struct drm_dp_mst_topology_mgr *mst_mgr;
459− struct drm_dp_mst_port *mst_port;
454+ struct drm_dp_mst_topology_mgr *mst_mgr = &aconnector->mst_port->mst_mgr;
455+ struct drm_dp_mst_port *mst_port = aconnector->port;
460456
461− mst_port = aconnector->port;
462− mst_mgr = &aconnector->mst_port->mst_mgr;
463−
464− if (!old_conn_state->crtc)
465− return 0;
466−
467− if (new_conn_state->crtc) {
468− new_crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
469− if (!new_crtc_state ||
470− !drm_atomic_crtc_needs_modeset(new_crtc_state) ||
471− new_crtc_state->enable)
472− return 0;
473− }
474−
475− return drm_dp_atomic_release_vcpi_slots(state,
476− mst_mgr,
477− mst_port);
457+ return drm_dp_atomic_release_time_slots(state, mst_mgr, mst_port);
478458 }
479459
480460 static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs = {
@@ -618,15 +598,8 @@ void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm, · 137 unmodified lines
618598
619599 dc_link_dp_get_max_link_enc_cap(aconnector->dc_link, &max_link_enc_cap);
620600 aconnector->mst_mgr.cbs = &dm_mst_cbs;
621− drm_dp_mst_topology_mgr_init(
622− &aconnector->mst_mgr,
623− adev_to_drm(dm->adev),
624− &aconnector->dm_dp_aux.aux,
625− 16,
626− 4,
627− max_link_enc_cap.lane_count,
628− drm_dp_bw_code_to_link_rate(max_link_enc_cap.link_rate),
629− aconnector->connector_id);
601+ drm_dp_mst_topology_mgr_init(&aconnector->mst_mgr, adev_to_drm(dm->adev),

311 more lines aren’t shown here.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c+76−27

This diff is large: its 298 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c+46−0

This diff is large: its 62 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c+49−1

This diff is large: its 72 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c+47−1

This diff is large: its 70 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc.c+122−78

This diff is large: its 387 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c+38−0

This diff is large: its 45 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_link.c+84−46

This diff is large: its 286 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c+18−0

This diff is large: its 39 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c+206−231

This diff is large: its 741 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c+21−12

This diff is large: its 127 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_resource.c+22−3

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/core/dc_stream.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc.h+123−17

This diff is large: its 269 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c+68−7

This diff is large: its 136 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h+2−0

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc_hw_types.h+141−7

This diff is large: its 210 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc_link.h+29−1

This diff is large: its 58 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dc_stream.h+2−6

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dce/dce_audio.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dce/dce_aux.c+5−7

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c+4−3

This diff is large: its 22 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c+146−10

This diff is large: its 233 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h+19−1

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c+3−2

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c+3−6

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c+91−62

This diff is large: its 278 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c+42−5

This diff is large: its 86 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c+18−0

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c+3−6

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c+33−4

This diff is large: its 82 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mmhubbub.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c+2−1

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c+20−1

This diff is large: its 34 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.h+0−8

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c+4−3

This diff is large: its 28 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c+4−1

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_stream_encoder.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubbub.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hubbub.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c+1−1

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c+1−2

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.h+52−18

This diff is large: its 103 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c+2−3

This diff is large: its 33 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c+4−4

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c+7−7

This diff is large: its 63 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.h+29−0

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c+268−123

This diff is large: its 513 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h+16−0

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c+7−0

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mmhubbub.h+0−10

This diff is large: its 52 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c+3−3

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c+402−370

This diff is large: its 1219 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h+1167−2

This diff is large: its 1187 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c+138−28

This diff is large: its 222 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c+360−318

This diff is large: its 1075 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dm_helpers.h+9−3

This diff is large: its 33 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c+6−8

This diff is large: its 41 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_auto.c+11−11

This diff is large: its 48 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c+7−9

This diff is large: its 41 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c+6−26

This diff is large: its 48 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c+17−17

This diff is large: its 59 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c+5−5

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c+5−3

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c+65−237

This diff is large: its 415 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c+26−19

This diff is large: its 78 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c+59−35

This diff is large: its 189 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c+6−4

This diff is large: its 40 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c+7−0

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c+6−4

This diff is large: its 45 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c+159−37

This diff is large: its 305 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.h+2−8

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c+6−4

This diff is large: its 38 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c+21−25

This diff is large: its 123 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c+9−5

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h+33−4

This diff is large: its 75 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h+2−7

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c+0−1884

This diff is large: its 1885 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/dml/dml_wrapper_translation.c+0−284

This diff is large: its 285 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/core_types.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h+5−0

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h+14−0

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h+77−14

This diff is large: its 180 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h+11−3

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h+31−7

This diff is large: its 87 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/hw_sequencer_private.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/link_hwss.h+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/inc/resource.h+2−0

This diff is large: its 7 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/link_hwss_dio.c+2−2

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/link_hwss_dio.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/link_hwss_dpia.c+1−1

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/link/link_hwss_hpo_dp.c+1−1

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.c+8−0

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/amd/display/dmub/dmub_srv.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h+65−4

This diff is large: its 126 lines aren’t shown here.

drivers/gpu/drm/amd/display/include/dal_asic_id.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/display/include/ddc_service_types.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/display/include/link_service_types.h+12−3

This diff is large: its 40 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_offset.h+108−0

This diff is large: its 137 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_sh_mask.h+1468−1

This diff is large: its 1488 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/gc/gc_11_0_3_offset.h+12086−0

This diff is large: its 12087 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/gc/gc_11_0_3_sh_mask.h+44640−0

This diff is large: its 44641 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h+4−0

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h+8−0

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/amd/include/kgd_pp_interface.h+58−0

This diff is large: its 63 lines aren’t shown here.

drivers/gpu/drm/amd/pm/amdgpu_dpm.c+45−0

This diff is large: its 52 lines aren’t shown here.

drivers/gpu/drm/amd/pm/amdgpu_pm.c+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c+12−13

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c+1−4

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/amd/pm/powerplay/inc/hardwaremanager.h+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c+1−3

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c+34−0

This diff is large: its 62 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h+22−0

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v11_0_7_ppsmc.h+2−2

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h+4−1

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h+5−1

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c+54−0

This diff is large: its 75 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c+224−12

This diff is large: its 303 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c+15−0

This diff is large: its 57 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/amd/pm/swsmu/smu_internal.h+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/arm/Kconfig+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/arm/display/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/d71/d71_dev.c+1−2

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_crtc.c+2−3

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_drv.c+2−0

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c+6−6

This diff is large: its 48 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_kms.c+25−6

This diff is large: its 74 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_kms.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/arm/display/komeda/komeda_plane.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/arm/hdlcd_crtc.c+5−6

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/arm/hdlcd_drv.c+28−49

This diff is large: its 156 lines aren’t shown here.

drivers/gpu/drm/arm/malidp_drv.c+4−5

This diff is large: its 39 lines aren’t shown here.

drivers/gpu/drm/arm/malidp_mw.c+4−4

This diff is large: its 31 lines aren’t shown here.

drivers/gpu/drm/arm/malidp_planes.c+17−18

This diff is large: its 97 lines aren’t shown here.

drivers/gpu/drm/arm/malidp_regs.h+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/armada/armada_crtc.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/armada/armada_gem.c+3−3

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/armada/armada_overlay.c+1−7

This diff is large: its 22 lines aren’t shown here.

drivers/gpu/drm/armada/armada_plane.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/aspeed/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c+5−5

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/aspeed/aspeed_gfx_drv.c+3−4

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/ast/ast_drv.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/ast/ast_mode.c+21−7

This diff is large: its 91 lines aren’t shown here.

drivers/gpu/drm/ast/ast_tables.h+7−0

This diff is large: its 14 lines aren’t shown here.

drivers/gpu/drm/atmel-hlcdc/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c+3−3

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c+4−5

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/bridge/adv7511/adv7511.h+1−4

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/bridge/adv7511/adv7511_cec.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/bridge/adv7511/adv7511_drv.c+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/bridge/analogix/anx7625.c+32−6

This diff is large: its 66 lines aren’t shown here.

drivers/gpu/drm/bridge/analogix/anx7625.h+6−0

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c+2−1

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/bridge/chipone-icn6211.c+38−10

This diff is large: its 129 lines aren’t shown here.

drivers/gpu/drm/bridge/ite-it6505.c+18−9

This diff is large: its 111 lines aren’t shown here.

drivers/gpu/drm/bridge/lontium-lt8912b.c+17−9

This diff is large: its 42 lines aren’t shown here.

drivers/gpu/drm/bridge/lontium-lt9611.c+2−1

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c+3−1

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/bridge/panel.c+74−0

This diff is large: its 93 lines aren’t shown here.

drivers/gpu/drm/bridge/parade-ps8640.c+7−2

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c+8−5

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/bridge/tc358762.c+1−3

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/bridge/tc358764.c+1−3

This diff is large: its 16 lines aren’t shown here.

drivers/gpu/drm/bridge/tc358767.c+40−50

This diff is large: its 169 lines aren’t shown here.

drivers/gpu/drm/bridge/ti-sn65dsi86.c+96−23

This diff is large: its 244 lines aren’t shown here.

drivers/gpu/drm/display/drm_dp_helper.c+33−10

This diff is large: its 66 lines aren’t shown here.

drivers/gpu/drm/display/drm_dp_mst_topology.c+518−631

This diff is large: its 1739 lines aren’t shown here.

drivers/gpu/drm/display/drm_scdc_helper.c+13−0

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/drm_aperture.c+5−5

This diff is large: its 38 lines aren’t shown here.

drivers/gpu/drm/drm_atomic_helper.c+75−9

This diff is large: its 144 lines aren’t shown here.

drivers/gpu/drm/drm_auth.c+2−2

This diff is large: its 17 lines aren’t shown here.

drivers/gpu/drm/drm_bridge.c+2−2

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/drm_client.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/drm_color_mgmt.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/drm_connector.c+107−28

This diff is large: its 207 lines aren’t shown here.

drivers/gpu/drm/drm_crtc.c+82−12

This diff is large: its 125 lines aren’t shown here.

drivers/gpu/drm/drm_crtc_helper.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/drm_damage_helper.c+7−4

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/drm_edid.c+51−1

This diff is large: its 74 lines aren’t shown here.

drivers/gpu/drm/drm_encoder.c+64−11

This diff is large: its 118 lines aren’t shown here.

drivers/gpu/drm/drm_fb_dma_helper.crenamed from drivers/gpu/drm/drm_fb_cma_helper.c+36−31

This diff is large: its 168 lines aren’t shown here.

drivers/gpu/drm/drm_fb_helper.c+75−26

This diff is large: its 193 lines aren’t shown here.

drivers/gpu/drm/drm_file.c+1−142

This diff is large: its 161 lines aren’t shown here.

drivers/gpu/drm/drm_format_helper.c+456−246

This diff is large: its 1000 lines aren’t shown here.

drivers/gpu/drm/drm_fourcc.c+54−1

This diff is large: its 76 lines aren’t shown here.

drivers/gpu/drm/drm_framebuffer.c+35−35

This diff is large: its 209 lines aren’t shown here.

drivers/gpu/drm/drm_gem.c+170−0

This diff is large: its 188 lines aren’t shown here.

drivers/gpu/drm/drm_gem_dma_helper.crenamed from drivers/gpu/drm/drm_gem_cma_helper.c+151−151

This diff is large: its 672 lines aren’t shown here.

drivers/gpu/drm/drm_gem_framebuffer_helper.c+3−9

This diff is large: its 34 lines aren’t shown here.

drivers/gpu/drm/drm_gem_shmem_helper.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/drm_gem_vram_helper.c+3−3

This diff is large: its 13 lines aren’t shown here.

drivers/gpu/drm/drm_ioctl.c+7−1

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/drm_mipi_dbi.c+24−25

This diff is large: its 92 lines aren’t shown here.

drivers/gpu/drm/drm_mipi_dsi.c+4−1

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/drm_mode_config.c+5−2

This diff is large: its 21 lines aren’t shown here.

drivers/gpu/drm/drm_modeset_helper.c+30−36

This diff is large: its 87 lines aren’t shown here.

drivers/gpu/drm/drm_panel_orientation_quirks.c+18−0

This diff is large: its 39 lines aren’t shown here.

drivers/gpu/drm/drm_plane.c+38−32

This diff is large: its 84 lines aren’t shown here.

drivers/gpu/drm/drm_plane_helper.c+93−21

This diff is large: its 164 lines aren’t shown here.

drivers/gpu/drm/drm_probe_helper.c+64−0

This diff is large: its 78 lines aren’t shown here.

drivers/gpu/drm/drm_simple_kms_helper.c+2−3

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_drm_plane.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_hdmi.c+3−3

This diff is large: its 20 lines aren’t shown here.

drivers/gpu/drm/exynos/exynos_mixer.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/fsl-dcu/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c+3−4

This diff is large: its 27 lines aren’t shown here.

drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c+6−12

This diff is large: its 58 lines aren’t shown here.

drivers/gpu/drm/gma500/backlight.c+68−34

This diff is large: its 144 lines aren’t shown here.

drivers/gpu/drm/gma500/cdv_device.c+9−41

This diff is large: its 112 lines aren’t shown here.

drivers/gpu/drm/gma500/cdv_intel_dp.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/gma500/gma_display.c+1−18

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/gma500/gma_display.h+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/gma500/oaktrail_crtc.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/gma500/oaktrail_device.c+5−60

This diff is large: its 118 lines aren’t shown here.

drivers/gpu/drm/gma500/oaktrail_lvds.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/gma500/opregion.c+1−5

This diff is large: its 23 lines aren’t shown here.

drivers/gpu/drm/gma500/power.c+30−128

This diff is large: its 261 lines aren’t shown here.

drivers/gpu/drm/gma500/power.h+0−18

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_device.c+4−69

This diff is large: its 114 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_drv.c+5−45

This diff is large: its 90 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_drv.h+8−12

This diff is large: its 57 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_intel_display.c+0−2

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_intel_drv.h+0−5

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_intel_sdvo.c+41−21

This diff is large: its 107 lines aren’t shown here.

drivers/gpu/drm/gma500/psb_irq.c+7−8

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/gud/gud_pipe.c+21−13

This diff is large: its 101 lines aren’t shown here.

drivers/gpu/drm/hisilicon/kirin/Kconfig+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c+7−8

This diff is large: its 46 lines aren’t shown here.

drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c+1−2

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/hyperv/hyperv_drm_modeset.c+4−5

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/i915/Makefile+3−1

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/i915/display/g4x_dp.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/i915/display/hsw_ips.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/i915/display/i9xx_plane.c+3−4

This diff is large: its 28 lines aren’t shown here.

drivers/gpu/drm/i915/display/icl_dsi.c+7−10

This diff is large: its 72 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_atomic.c+4−5

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_atomic_plane.c+1−2

This diff is large: its 19 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_audio.c+51−51

This diff is large: its 331 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_backlight.c+22−20

This diff is large: its 178 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_backlight_regs.h+124−0

This diff is large: its 125 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_bios.c+204−171

This diff is large: its 1012 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_bios.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_bw.c+103−35

This diff is large: its 338 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_cdclk.c+150−143

This diff is large: its 779 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_cdclk.h+2−2

This diff is large: its 12 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_color.c+18−17

This diff is large: its 93 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_connector.c+4−4

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_crt.c+7−6

This diff is large: its 48 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_crtc.c+0−1

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_crtc_state_dump.c+5−4

This diff is large: its 25 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_cursor.c+3−4

This diff is large: its 30 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_ddi.c+45−44

This diff is large: its 232 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display.c+171−210

This diff is large: its 909 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display.h+4−4

This diff is large: its 36 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_core.h+418−0

This diff is large: its 419 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_debugfs.c+49−98

This diff is large: its 369 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_power.c+80−73

This diff is large: its 609 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_power_map.c+116−3

This diff is large: its 147 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_power_well.c+87−42

This diff is large: its 346 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_power_well.h+10−6

This diff is large: its 39 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_display_types.h+3−2

This diff is large: its 26 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dmc.c+108−34

This diff is large: its 328 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dmc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dmc_regs.h+2−0

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp.c+82−39

This diff is large: its 273 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_aux.c+54−3

This diff is large: its 99 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c+13−2

This diff is large: its 29 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_hdcp.c+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_link_training.c+36−47

This diff is large: its 296 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dp_mst.c+39−66

This diff is large: its 225 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dpio_phy.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dpll.c+82−29

This diff is large: its 269 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dpll_mgr.c+178−148

This diff is large: its 696 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dsb.c+30−0

This diff is large: its 37 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dsb.h+0−28

This diff is large: its 35 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dsi.c+1−1

This diff is large: its 9 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dsi.h+0−3

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c+8−6

This diff is large: its 64 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_dvo_dev.h+2−2

This diff is large: its 11 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fb.c+9−9

This diff is large: its 64 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fb_pin.c+2−2

This diff is large: its 18 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fb_pin.h+2−2

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fbc.c+12−6

This diff is large: its 57 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fbc.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fbdev.c+24−16

This diff is large: its 143 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_fdi.c+10−10

This diff is large: its 69 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_frontbuffer.c+29−27

This diff is large: its 144 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_frontbuffer.h+18−0

This diff is large: its 32 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_gmbus.c+153−137

This diff is large: its 789 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_gmbus.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_gmbus_regs.h+81−0

This diff is large: its 82 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_hdcp.c+93−70

This diff is large: its 403 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_hdcp_regs.h+270−0

This diff is large: its 271 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_hdmi.c+11−1

This diff is large: its 33 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_hotplug.c+58−58

This diff is large: its 349 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_lpe_audio.c+24−23

This diff is large: its 136 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_lvds.c+2−2

This diff is large: its 15 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_modeset_setup.c+8−7

This diff is large: its 53 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_modeset_verify.c+4−4

This diff is large: its 24 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_opregion.c+21−21

This diff is large: its 171 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_overlay.c+8−8

This diff is large: its 66 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_panel.c+24−21

This diff is large: its 97 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_panel.h+3−0

This diff is large: its 10 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_pch_refclk.c+13−3

This diff is large: its 51 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_pch_refclk.h+1−0

This diff is large: its 8 lines aren’t shown here.

drivers/gpu/drm/i915/display/intel_plane_initial.c+1−1

This diff is large: its 9 lines aren’t shown here.

This diff is larger than a page shows: the files after these aren’t listed. Clone the repository to see all of it.