18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2016 Advanced Micro Devices, Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci * Author: Monk.liu@amd.com 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#ifndef AMDGPU_VIRT_H 258c2ecf20Sopenharmony_ci#define AMDGPU_VIRT_H 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#include "amdgv_sriovmsg.h" 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define AMDGPU_SRIOV_CAPS_SRIOV_VBIOS (1 << 0) /* vBIOS is sr-iov ready */ 308c2ecf20Sopenharmony_ci#define AMDGPU_SRIOV_CAPS_ENABLE_IOV (1 << 1) /* sr-iov is enabled on this GPU */ 318c2ecf20Sopenharmony_ci#define AMDGPU_SRIOV_CAPS_IS_VF (1 << 2) /* this GPU is a virtual function */ 328c2ecf20Sopenharmony_ci#define AMDGPU_PASSTHROUGH_MODE (1 << 3) /* thw whole GPU is pass through for VM */ 338c2ecf20Sopenharmony_ci#define AMDGPU_SRIOV_CAPS_RUNTIME (1 << 4) /* is out of full access mode */ 348c2ecf20Sopenharmony_ci#define AMDGPU_VF_MMIO_ACCESS_PROTECT (1 << 5) /* MMIO write access is not allowed in sriov runtime */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* all asic after AI use this offset */ 378c2ecf20Sopenharmony_ci#define mmRCC_IOV_FUNC_IDENTIFIER 0xDE5 388c2ecf20Sopenharmony_ci/* tonga/fiji use this offset */ 398c2ecf20Sopenharmony_ci#define mmBIF_IOV_FUNC_IDENTIFIER 0x1503 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cienum amdgpu_sriov_vf_mode { 428c2ecf20Sopenharmony_ci SRIOV_VF_MODE_BARE_METAL = 0, 438c2ecf20Sopenharmony_ci SRIOV_VF_MODE_ONE_VF, 448c2ecf20Sopenharmony_ci SRIOV_VF_MODE_MULTI_VF, 458c2ecf20Sopenharmony_ci}; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cistruct amdgpu_mm_table { 488c2ecf20Sopenharmony_ci struct amdgpu_bo *bo; 498c2ecf20Sopenharmony_ci uint32_t *cpu_addr; 508c2ecf20Sopenharmony_ci uint64_t gpu_addr; 518c2ecf20Sopenharmony_ci}; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define AMDGPU_VF_ERROR_ENTRY_SIZE 16 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci/* struct error_entry - amdgpu VF error information. */ 568c2ecf20Sopenharmony_cistruct amdgpu_vf_error_buffer { 578c2ecf20Sopenharmony_ci struct mutex lock; 588c2ecf20Sopenharmony_ci int read_count; 598c2ecf20Sopenharmony_ci int write_count; 608c2ecf20Sopenharmony_ci uint16_t code[AMDGPU_VF_ERROR_ENTRY_SIZE]; 618c2ecf20Sopenharmony_ci uint16_t flags[AMDGPU_VF_ERROR_ENTRY_SIZE]; 628c2ecf20Sopenharmony_ci uint64_t data[AMDGPU_VF_ERROR_ENTRY_SIZE]; 638c2ecf20Sopenharmony_ci}; 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_cienum idh_request; 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci/** 688c2ecf20Sopenharmony_ci * struct amdgpu_virt_ops - amdgpu device virt operations 698c2ecf20Sopenharmony_ci */ 708c2ecf20Sopenharmony_cistruct amdgpu_virt_ops { 718c2ecf20Sopenharmony_ci int (*req_full_gpu)(struct amdgpu_device *adev, bool init); 728c2ecf20Sopenharmony_ci int (*rel_full_gpu)(struct amdgpu_device *adev, bool init); 738c2ecf20Sopenharmony_ci int (*req_init_data)(struct amdgpu_device *adev); 748c2ecf20Sopenharmony_ci int (*reset_gpu)(struct amdgpu_device *adev); 758c2ecf20Sopenharmony_ci int (*wait_reset)(struct amdgpu_device *adev); 768c2ecf20Sopenharmony_ci void (*trans_msg)(struct amdgpu_device *adev, enum idh_request req, 778c2ecf20Sopenharmony_ci u32 data1, u32 data2, u32 data3); 788c2ecf20Sopenharmony_ci}; 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci/* 818c2ecf20Sopenharmony_ci * Firmware Reserve Frame buffer 828c2ecf20Sopenharmony_ci */ 838c2ecf20Sopenharmony_cistruct amdgpu_virt_fw_reserve { 848c2ecf20Sopenharmony_ci struct amd_sriov_msg_pf2vf_info_header *p_pf2vf; 858c2ecf20Sopenharmony_ci struct amd_sriov_msg_vf2pf_info_header *p_vf2pf; 868c2ecf20Sopenharmony_ci unsigned int checksum_key; 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci/* 908c2ecf20Sopenharmony_ci * Legacy GIM header 918c2ecf20Sopenharmony_ci * 928c2ecf20Sopenharmony_ci * Defination between PF and VF 938c2ecf20Sopenharmony_ci * Structures forcibly aligned to 4 to keep the same style as PF. 948c2ecf20Sopenharmony_ci */ 958c2ecf20Sopenharmony_ci#define AMDGIM_DATAEXCHANGE_OFFSET (64 * 1024) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define AMDGIM_GET_STRUCTURE_RESERVED_SIZE(total, u8, u16, u32, u64) \ 988c2ecf20Sopenharmony_ci (total - (((u8)+3) / 4 + ((u16)+1) / 2 + (u32) + (u64)*2)) 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_cienum AMDGIM_FEATURE_FLAG { 1018c2ecf20Sopenharmony_ci /* GIM supports feature of Error log collecting */ 1028c2ecf20Sopenharmony_ci AMDGIM_FEATURE_ERROR_LOG_COLLECT = 0x1, 1038c2ecf20Sopenharmony_ci /* GIM supports feature of loading uCodes */ 1048c2ecf20Sopenharmony_ci AMDGIM_FEATURE_GIM_LOAD_UCODES = 0x2, 1058c2ecf20Sopenharmony_ci /* VRAM LOST by GIM */ 1068c2ecf20Sopenharmony_ci AMDGIM_FEATURE_GIM_FLR_VRAMLOST = 0x4, 1078c2ecf20Sopenharmony_ci /* MM bandwidth */ 1088c2ecf20Sopenharmony_ci AMDGIM_FEATURE_GIM_MM_BW_MGR = 0x8, 1098c2ecf20Sopenharmony_ci /* PP ONE VF MODE in GIM */ 1108c2ecf20Sopenharmony_ci AMDGIM_FEATURE_PP_ONE_VF = (1 << 4), 1118c2ecf20Sopenharmony_ci}; 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_cistruct amdgim_pf2vf_info_v1 { 1148c2ecf20Sopenharmony_ci /* header contains size and version */ 1158c2ecf20Sopenharmony_ci struct amd_sriov_msg_pf2vf_info_header header; 1168c2ecf20Sopenharmony_ci /* max_width * max_height */ 1178c2ecf20Sopenharmony_ci unsigned int uvd_enc_max_pixels_count; 1188c2ecf20Sopenharmony_ci /* 16x16 pixels/sec, codec independent */ 1198c2ecf20Sopenharmony_ci unsigned int uvd_enc_max_bandwidth; 1208c2ecf20Sopenharmony_ci /* max_width * max_height */ 1218c2ecf20Sopenharmony_ci unsigned int vce_enc_max_pixels_count; 1228c2ecf20Sopenharmony_ci /* 16x16 pixels/sec, codec independent */ 1238c2ecf20Sopenharmony_ci unsigned int vce_enc_max_bandwidth; 1248c2ecf20Sopenharmony_ci /* MEC FW position in kb from the start of visible frame buffer */ 1258c2ecf20Sopenharmony_ci unsigned int mecfw_kboffset; 1268c2ecf20Sopenharmony_ci /* The features flags of the GIM driver supports. */ 1278c2ecf20Sopenharmony_ci unsigned int feature_flags; 1288c2ecf20Sopenharmony_ci /* use private key from mailbox 2 to create chueksum */ 1298c2ecf20Sopenharmony_ci unsigned int checksum; 1308c2ecf20Sopenharmony_ci} __aligned(4); 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_cistruct amdgim_vf2pf_info_v1 { 1338c2ecf20Sopenharmony_ci /* header contains size and version */ 1348c2ecf20Sopenharmony_ci struct amd_sriov_msg_vf2pf_info_header header; 1358c2ecf20Sopenharmony_ci /* driver version */ 1368c2ecf20Sopenharmony_ci char driver_version[64]; 1378c2ecf20Sopenharmony_ci /* driver certification, 1=WHQL, 0=None */ 1388c2ecf20Sopenharmony_ci unsigned int driver_cert; 1398c2ecf20Sopenharmony_ci /* guest OS type and version: need a define */ 1408c2ecf20Sopenharmony_ci unsigned int os_info; 1418c2ecf20Sopenharmony_ci /* in the unit of 1M */ 1428c2ecf20Sopenharmony_ci unsigned int fb_usage; 1438c2ecf20Sopenharmony_ci /* guest gfx engine usage percentage */ 1448c2ecf20Sopenharmony_ci unsigned int gfx_usage; 1458c2ecf20Sopenharmony_ci /* guest gfx engine health percentage */ 1468c2ecf20Sopenharmony_ci unsigned int gfx_health; 1478c2ecf20Sopenharmony_ci /* guest compute engine usage percentage */ 1488c2ecf20Sopenharmony_ci unsigned int compute_usage; 1498c2ecf20Sopenharmony_ci /* guest compute engine health percentage */ 1508c2ecf20Sopenharmony_ci unsigned int compute_health; 1518c2ecf20Sopenharmony_ci /* guest vce engine usage percentage. 0xffff means N/A. */ 1528c2ecf20Sopenharmony_ci unsigned int vce_enc_usage; 1538c2ecf20Sopenharmony_ci /* guest vce engine health percentage. 0xffff means N/A. */ 1548c2ecf20Sopenharmony_ci unsigned int vce_enc_health; 1558c2ecf20Sopenharmony_ci /* guest uvd engine usage percentage. 0xffff means N/A. */ 1568c2ecf20Sopenharmony_ci unsigned int uvd_enc_usage; 1578c2ecf20Sopenharmony_ci /* guest uvd engine usage percentage. 0xffff means N/A. */ 1588c2ecf20Sopenharmony_ci unsigned int uvd_enc_health; 1598c2ecf20Sopenharmony_ci unsigned int checksum; 1608c2ecf20Sopenharmony_ci} __aligned(4); 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_cistruct amdgim_vf2pf_info_v2 { 1638c2ecf20Sopenharmony_ci /* header contains size and version */ 1648c2ecf20Sopenharmony_ci struct amd_sriov_msg_vf2pf_info_header header; 1658c2ecf20Sopenharmony_ci uint32_t checksum; 1668c2ecf20Sopenharmony_ci /* driver version */ 1678c2ecf20Sopenharmony_ci uint8_t driver_version[64]; 1688c2ecf20Sopenharmony_ci /* driver certification, 1=WHQL, 0=None */ 1698c2ecf20Sopenharmony_ci uint32_t driver_cert; 1708c2ecf20Sopenharmony_ci /* guest OS type and version: need a define */ 1718c2ecf20Sopenharmony_ci uint32_t os_info; 1728c2ecf20Sopenharmony_ci /* in the unit of 1M */ 1738c2ecf20Sopenharmony_ci uint32_t fb_usage; 1748c2ecf20Sopenharmony_ci /* guest gfx engine usage percentage */ 1758c2ecf20Sopenharmony_ci uint32_t gfx_usage; 1768c2ecf20Sopenharmony_ci /* guest gfx engine health percentage */ 1778c2ecf20Sopenharmony_ci uint32_t gfx_health; 1788c2ecf20Sopenharmony_ci /* guest compute engine usage percentage */ 1798c2ecf20Sopenharmony_ci uint32_t compute_usage; 1808c2ecf20Sopenharmony_ci /* guest compute engine health percentage */ 1818c2ecf20Sopenharmony_ci uint32_t compute_health; 1828c2ecf20Sopenharmony_ci /* guest vce engine usage percentage. 0xffff means N/A. */ 1838c2ecf20Sopenharmony_ci uint32_t vce_enc_usage; 1848c2ecf20Sopenharmony_ci /* guest vce engine health percentage. 0xffff means N/A. */ 1858c2ecf20Sopenharmony_ci uint32_t vce_enc_health; 1868c2ecf20Sopenharmony_ci /* guest uvd engine usage percentage. 0xffff means N/A. */ 1878c2ecf20Sopenharmony_ci uint32_t uvd_enc_usage; 1888c2ecf20Sopenharmony_ci /* guest uvd engine usage percentage. 0xffff means N/A. */ 1898c2ecf20Sopenharmony_ci uint32_t uvd_enc_health; 1908c2ecf20Sopenharmony_ci uint32_t reserved[AMDGIM_GET_STRUCTURE_RESERVED_SIZE(256, 64, 0, (12 + sizeof(struct amd_sriov_msg_vf2pf_info_header)/sizeof(uint32_t)), 0)]; 1918c2ecf20Sopenharmony_ci} __aligned(4); 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_cistruct amdgpu_virt_ras_err_handler_data { 1948c2ecf20Sopenharmony_ci /* point to bad page records array */ 1958c2ecf20Sopenharmony_ci struct eeprom_table_record *bps; 1968c2ecf20Sopenharmony_ci /* point to reserved bo array */ 1978c2ecf20Sopenharmony_ci struct amdgpu_bo **bps_bo; 1988c2ecf20Sopenharmony_ci /* the count of entries */ 1998c2ecf20Sopenharmony_ci int count; 2008c2ecf20Sopenharmony_ci /* last reserved entry's index + 1 */ 2018c2ecf20Sopenharmony_ci int last_reserved; 2028c2ecf20Sopenharmony_ci}; 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci/* GPU virtualization */ 2058c2ecf20Sopenharmony_cistruct amdgpu_virt { 2068c2ecf20Sopenharmony_ci uint32_t caps; 2078c2ecf20Sopenharmony_ci struct amdgpu_bo *csa_obj; 2088c2ecf20Sopenharmony_ci void *csa_cpu_addr; 2098c2ecf20Sopenharmony_ci bool chained_ib_support; 2108c2ecf20Sopenharmony_ci uint32_t reg_val_offs; 2118c2ecf20Sopenharmony_ci struct amdgpu_irq_src ack_irq; 2128c2ecf20Sopenharmony_ci struct amdgpu_irq_src rcv_irq; 2138c2ecf20Sopenharmony_ci struct work_struct flr_work; 2148c2ecf20Sopenharmony_ci struct amdgpu_mm_table mm_table; 2158c2ecf20Sopenharmony_ci const struct amdgpu_virt_ops *ops; 2168c2ecf20Sopenharmony_ci struct amdgpu_vf_error_buffer vf_errors; 2178c2ecf20Sopenharmony_ci struct amdgpu_virt_fw_reserve fw_reserve; 2188c2ecf20Sopenharmony_ci uint32_t gim_feature; 2198c2ecf20Sopenharmony_ci uint32_t reg_access_mode; 2208c2ecf20Sopenharmony_ci int req_init_data_ver; 2218c2ecf20Sopenharmony_ci bool tdr_debug; 2228c2ecf20Sopenharmony_ci struct amdgpu_virt_ras_err_handler_data *virt_eh_data; 2238c2ecf20Sopenharmony_ci bool ras_init_done; 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci /* vf2pf message */ 2268c2ecf20Sopenharmony_ci struct delayed_work vf2pf_work; 2278c2ecf20Sopenharmony_ci uint32_t vf2pf_update_interval_ms; 2288c2ecf20Sopenharmony_ci}; 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci#define amdgpu_sriov_enabled(adev) \ 2318c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV) 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci#define amdgpu_sriov_vf(adev) \ 2348c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_SRIOV_CAPS_IS_VF) 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci#define amdgpu_sriov_bios(adev) \ 2378c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS) 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ci#define amdgpu_sriov_runtime(adev) \ 2408c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_SRIOV_CAPS_RUNTIME) 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci#define amdgpu_sriov_fullaccess(adev) \ 2438c2ecf20Sopenharmony_ci(amdgpu_sriov_vf((adev)) && !amdgpu_sriov_runtime((adev))) 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci#define amdgpu_passthrough(adev) \ 2468c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_PASSTHROUGH_MODE) 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ci#define amdgpu_sriov_vf_mmio_access_protection(adev) \ 2498c2ecf20Sopenharmony_ci((adev)->virt.caps & AMDGPU_VF_MMIO_ACCESS_PROTECT) 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_cistatic inline bool is_virtual_machine(void) 2528c2ecf20Sopenharmony_ci{ 2538c2ecf20Sopenharmony_ci#ifdef CONFIG_X86 2548c2ecf20Sopenharmony_ci return boot_cpu_has(X86_FEATURE_HYPERVISOR); 2558c2ecf20Sopenharmony_ci#else 2568c2ecf20Sopenharmony_ci return false; 2578c2ecf20Sopenharmony_ci#endif 2588c2ecf20Sopenharmony_ci} 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define amdgpu_sriov_is_pp_one_vf(adev) \ 2618c2ecf20Sopenharmony_ci ((adev)->virt.gim_feature & AMDGIM_FEATURE_PP_ONE_VF) 2628c2ecf20Sopenharmony_ci#define amdgpu_sriov_is_debug(adev) \ 2638c2ecf20Sopenharmony_ci ((!amdgpu_in_reset(adev)) && adev->virt.tdr_debug) 2648c2ecf20Sopenharmony_ci#define amdgpu_sriov_is_normal(adev) \ 2658c2ecf20Sopenharmony_ci ((!amdgpu_in_reset(adev)) && (!adev->virt.tdr_debug)) 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_cibool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev); 2688c2ecf20Sopenharmony_civoid amdgpu_virt_init_setting(struct amdgpu_device *adev); 2698c2ecf20Sopenharmony_civoid amdgpu_virt_kiq_reg_write_reg_wait(struct amdgpu_device *adev, 2708c2ecf20Sopenharmony_ci uint32_t reg0, uint32_t rreg1, 2718c2ecf20Sopenharmony_ci uint32_t ref, uint32_t mask); 2728c2ecf20Sopenharmony_ciint amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init); 2738c2ecf20Sopenharmony_ciint amdgpu_virt_release_full_gpu(struct amdgpu_device *adev, bool init); 2748c2ecf20Sopenharmony_ciint amdgpu_virt_reset_gpu(struct amdgpu_device *adev); 2758c2ecf20Sopenharmony_civoid amdgpu_virt_request_init_data(struct amdgpu_device *adev); 2768c2ecf20Sopenharmony_ciint amdgpu_virt_wait_reset(struct amdgpu_device *adev); 2778c2ecf20Sopenharmony_ciint amdgpu_virt_alloc_mm_table(struct amdgpu_device *adev); 2788c2ecf20Sopenharmony_civoid amdgpu_virt_free_mm_table(struct amdgpu_device *adev); 2798c2ecf20Sopenharmony_civoid amdgpu_virt_release_ras_err_handler_data(struct amdgpu_device *adev); 2808c2ecf20Sopenharmony_civoid amdgpu_virt_init_data_exchange(struct amdgpu_device *adev); 2818c2ecf20Sopenharmony_civoid amdgpu_virt_exchange_data(struct amdgpu_device *adev); 2828c2ecf20Sopenharmony_civoid amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev); 2838c2ecf20Sopenharmony_civoid amdgpu_detect_virtualization(struct amdgpu_device *adev); 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_cibool amdgpu_virt_can_access_debugfs(struct amdgpu_device *adev); 2868c2ecf20Sopenharmony_ciint amdgpu_virt_enable_access_debugfs(struct amdgpu_device *adev); 2878c2ecf20Sopenharmony_civoid amdgpu_virt_disable_access_debugfs(struct amdgpu_device *adev); 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_cienum amdgpu_sriov_vf_mode amdgpu_virt_get_sriov_vf_mode(struct amdgpu_device *adev); 2908c2ecf20Sopenharmony_ci#endif 291