#ifndef AMDGPU_VIRT_H
#define AMDGPU_VIRT_H
#include "amdgv_sriovmsg.h"
#define AMDGPU_SRIOV_CAPS_SRIOV_VBIOS …
#define AMDGPU_SRIOV_CAPS_ENABLE_IOV …
#define AMDGPU_SRIOV_CAPS_IS_VF …
#define AMDGPU_PASSTHROUGH_MODE …
#define AMDGPU_SRIOV_CAPS_RUNTIME …
#define AMDGPU_VF_MMIO_ACCESS_PROTECT …
#define AMDGPU_RLCG_GC_WRITE_LEGACY …
#define AMDGPU_RLCG_GC_WRITE …
#define AMDGPU_RLCG_GC_READ …
#define AMDGPU_RLCG_MMHUB_WRITE …
#define AMDGPU_RLCG_VFGATE_DISABLED …
#define AMDGPU_RLCG_WRONG_OPERATION_TYPE …
#define AMDGPU_RLCG_REG_NOT_IN_RANGE …
#define AMDGPU_RLCG_SCRATCH1_ADDRESS_MASK …
#define AMDGPU_RLCG_SCRATCH1_ERROR_MASK …
#define mmRCC_IOV_FUNC_IDENTIFIER …
#define mmBIF_IOV_FUNC_IDENTIFIER …
#define AMDGPU_VF2PF_UPDATE_MAX_RETRY_LIMIT …
enum amdgpu_sriov_vf_mode { … };
struct amdgpu_mm_table { … };
#define AMDGPU_VF_ERROR_ENTRY_SIZE …
struct amdgpu_vf_error_buffer { … };
enum idh_request;
struct amdgpu_virt_ops { … };
struct amdgpu_virt_fw_reserve { … };
#define AMDGIM_DATAEXCHANGE_OFFSET …
#define AMDGIM_GET_STRUCTURE_RESERVED_SIZE(total, u8, u16, u32, u64) …
enum AMDGIM_FEATURE_FLAG { … };
enum AMDGIM_REG_ACCESS_FLAG { … };
struct amdgim_pf2vf_info_v1 { … } __aligned(…);
struct amdgim_vf2pf_info_v1 { … } __aligned(…);
struct amdgim_vf2pf_info_v2 { … } __aligned(…);
struct amdgpu_virt_ras_err_handler_data { … };
struct amdgpu_virt { … };
struct amdgpu_video_codec_info;
#define amdgpu_sriov_enabled(adev) …
#define amdgpu_sriov_vf(adev) …
#define amdgpu_sriov_bios(adev) …
#define amdgpu_sriov_runtime(adev) …
#define amdgpu_sriov_fullaccess(adev) …
#define amdgpu_sriov_reg_indirect_en(adev) …
#define amdgpu_sriov_reg_indirect_ih(adev) …
#define amdgpu_sriov_reg_indirect_mmhub(adev) …
#define amdgpu_sriov_reg_indirect_gc(adev) …
#define amdgpu_sriov_rlcg_error_report_enabled(adev) …
#define amdgpu_passthrough(adev) …
#define amdgpu_sriov_vf_mmio_access_protection(adev) …
static inline bool is_virtual_machine(void)
{ … }
#define amdgpu_sriov_is_pp_one_vf(adev) …
#define amdgpu_sriov_is_debug(adev) …
#define amdgpu_sriov_is_normal(adev) …
#define amdgpu_sriov_is_av1_support(adev) …
#define amdgpu_sriov_is_vcn_rb_decouple(adev) …
#define amdgpu_sriov_is_mes_info_enable(adev) …
bool amdgpu_virt_mmio_blocked(struct amdgpu_device *adev);
void amdgpu_virt_init_setting(struct amdgpu_device *adev);
int amdgpu_virt_request_full_gpu(struct amdgpu_device *adev, bool init);
int amdgpu_virt_release_full_gpu(struct amdgpu_device *adev, bool init);
int amdgpu_virt_reset_gpu(struct amdgpu_device *adev);
void amdgpu_virt_request_init_data(struct amdgpu_device *adev);
void amdgpu_virt_ready_to_reset(struct amdgpu_device *adev);
int amdgpu_virt_wait_reset(struct amdgpu_device *adev);
int amdgpu_virt_alloc_mm_table(struct amdgpu_device *adev);
void amdgpu_virt_free_mm_table(struct amdgpu_device *adev);
bool amdgpu_virt_rcvd_ras_interrupt(struct amdgpu_device *adev);
void amdgpu_virt_release_ras_err_handler_data(struct amdgpu_device *adev);
void amdgpu_virt_init_data_exchange(struct amdgpu_device *adev);
void amdgpu_virt_exchange_data(struct amdgpu_device *adev);
void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev);
void amdgpu_detect_virtualization(struct amdgpu_device *adev);
bool amdgpu_virt_can_access_debugfs(struct amdgpu_device *adev);
int amdgpu_virt_enable_access_debugfs(struct amdgpu_device *adev);
void amdgpu_virt_disable_access_debugfs(struct amdgpu_device *adev);
enum amdgpu_sriov_vf_mode amdgpu_virt_get_sriov_vf_mode(struct amdgpu_device *adev);
void amdgpu_virt_update_sriov_video_codec(struct amdgpu_device *adev,
struct amdgpu_video_codec_info *encode, uint32_t encode_array_size,
struct amdgpu_video_codec_info *decode, uint32_t decode_array_size);
void amdgpu_sriov_wreg(struct amdgpu_device *adev,
u32 offset, u32 value,
u32 acc_flags, u32 hwip, u32 xcc_id);
u32 amdgpu_sriov_rreg(struct amdgpu_device *adev,
u32 offset, u32 acc_flags, u32 hwip, u32 xcc_id);
bool amdgpu_virt_fw_load_skip_check(struct amdgpu_device *adev,
uint32_t ucode_id);
void amdgpu_virt_post_reset(struct amdgpu_device *adev);
bool amdgpu_sriov_xnack_support(struct amdgpu_device *adev);
bool amdgpu_virt_get_rlcg_reg_access_flag(struct amdgpu_device *adev,
u32 acc_flags, u32 hwip,
bool write, u32 *rlcg_flag);
u32 amdgpu_virt_rlcg_reg_rw(struct amdgpu_device *adev, u32 offset, u32 v, u32 flag, u32 xcc_id);
#endif