Mind Map
amdgpu_driver_load_kms()
  amdgpu_device_init()
    amdgpu_device_ip_early_init()
      amdgpu_discovery_set_ip_blocks
        amdgpu_discovery_set_common_ip_blocks
        amdgpu_discovery_set_sdma_ip_blocks
          amdgpu_device_ip_block_add
        amdgpu_discovery_set_mm_ip_blocks
          amdgpu_device_ip_block_add
        amdgpu_discovery_set_mes_ip_blocks
          amdgpu_device_ip_block_add
      amdgpu_amdkfd_device_probe
      adev->ip_blocks[i].version->funcs->early_init()
        uvd_v7_0_early_init()
          uvd_v7_0_set_ring_funcs()
          uvd_v7_0_set_enc_ring_funcs
        vce_v4_0_early_init()
          vce_v4_0_set_ring_funcs
      amdgpu_get_bios
      amdgpu_atombios_init
        amdgpu_atom_parse
    amdgpu_gmc_tmz_set
    amdgpu_device_doorbell_init
    amdgpu_device_ip_init
      amdgpu_ras_init
        amdgpu_ras_check_supported
      adev->ip_blocks[i].version->funcs->sw_init((void *)adev)
        gmc_v9_0_sw_init
        gmc_v9_0_mc_init
          gmc_v9_0_vram_gtt_location
            amdgpu_gmc_vram_location
            amdgpu_gmc_gart_location
            amdgpu_gmc_agp_location
        amdgpu_bo_init
          amdgpu_ttm_init
        gmc_v9_0_gart_init
          amdgpu_gart_init
        vega20_ih_sw_init
          amdgpu_irq_init
        psp_sw_init
          psp_get_runtime_db_entry
        pp_sw_init
          hwmgr_sw_init
        gfx_v9_0_sw_init
          gfx_v9_0_mec_init
            amdgpu_gfx_compute_queue_acquire
        uvd_v7_0_sw_init
          amdgpu_uvd_sw_init
        vce_v4_0_sw_init
          amdgpu_vce_sw_init
      adev->ip_blocks[i].version->funcs->hw_init((void *)adev)
        gmc_v9_0_hw_init
          gmc_v9_0_gart_enable
        psp_hw_init
          psp_load_fw
            psp_hw_start
              psp_tmr_load
            psp_hdcp_initialize
            psp_dtm_initialize
            psp_rap_initialize
            psp_securedisplay_initialize
        dm_hw_init
          amdgpu_dm_init
        gfx_v9_0_hw_init
          gfx_v9_0_cp_resume
            gfx_v9_0_kcq_resume
              amdgpu_gfx_enable_kcq
        sdma_v4_0_hw_init
        vce_v4_0_hw_init
      amdgpu_ras_recovery_init
        amdgpu_ras_eeprom_init
      amdgpu_amdkfd_device_init
        kgd2kfd_device_init
          kfd_gtt_sa_init
          kfd_doorbell_init
          device_queue_manager_init
            initialize_cpsch
              init_sdma_bitmaps
            init_mqd_managers
              mqd_manager_init_v9
                kfd_hiq_load_mqd_kiq
                  kgd_gfx_v9_hiq_mqd_load
          kfd_resume
            kfd = ->dqm->ops.start(kfd->dqm)start_cpsch
              pm_init
                kernel_queue_init
                  kq_initialize
                    kfd_get_kernel_doorbell
                    kfd_gtt_sa_allocate() * 4
                    kq->mqd_mgr->load_mqd(
                      mm->dev->kfd2kgd->hiq_mqd_load( = kgd_gfx_v9_hiq_mqd_load
                        amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_MAP_QUEUES, 5))
                    print_queue
              set_sched_resources
                pm_send_set_resources
                  kq_acquire_packet_buffer
                  kq_submit_packet
                    write_kernel_doorbell
            kfd_gtt_sa_allocate
          amdgpu_amdkfd_get_local_mem_info
          kfd_topology_add_device
            kfd_create_crat_image_virtual
              kfd_create_vcrat_image_gpu
                kfd_fill_gpu_memory_affinity
                kfd_fill_gpu_direct_io_link_to_cpu
                  kfd_find_numa_node_in_srat
            kfd_parse_crat_table
              kfd_parse_subtype
    amdgpu_device_ip_late_init
    amdgpu_pmu_init