#include "amdgpu.h"
#include "nbio/nbio_6_1_offset.h"
#include "nbio/nbio_6_1_sh_mask.h"
#include "gc/gc_9_0_offset.h"
#include "gc/gc_9_0_sh_mask.h"
#include "mp/mp_9_0_offset.h"
#include "soc15.h"
#include "vega10_ih.h"
#include "soc15_common.h"
#include "mxgpu_ai.h"
#include "amdgpu_reset.h"
static void xgpu_ai_mailbox_send_ack(struct amdgpu_device *adev)
{ … }
static void xgpu_ai_mailbox_set_valid(struct amdgpu_device *adev, bool val)
{ … }
static enum idh_event xgpu_ai_mailbox_peek_msg(struct amdgpu_device *adev)
{ … }
static int xgpu_ai_mailbox_rcv_msg(struct amdgpu_device *adev,
enum idh_event event)
{ … }
static uint8_t xgpu_ai_peek_ack(struct amdgpu_device *adev) { … }
static int xgpu_ai_poll_ack(struct amdgpu_device *adev)
{ … }
static int xgpu_ai_poll_msg(struct amdgpu_device *adev, enum idh_event event)
{ … }
static void xgpu_ai_mailbox_trans_msg (struct amdgpu_device *adev,
enum idh_request req, u32 data1, u32 data2, u32 data3) { … }
static int xgpu_ai_send_access_requests(struct amdgpu_device *adev,
enum idh_request req)
{ … }
static int xgpu_ai_request_reset(struct amdgpu_device *adev)
{ … }
static int xgpu_ai_request_full_gpu_access(struct amdgpu_device *adev,
bool init)
{ … }
static int xgpu_ai_release_full_gpu_access(struct amdgpu_device *adev,
bool init)
{ … }
static int xgpu_ai_mailbox_ack_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{ … }
static int xgpu_ai_set_mailbox_ack_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
unsigned type,
enum amdgpu_interrupt_state state)
{ … }
static void xgpu_ai_ready_to_reset(struct amdgpu_device *adev)
{ … }
static int xgpu_ai_wait_reset(struct amdgpu_device *adev)
{ … }
static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
{ … }
static int xgpu_ai_set_mailbox_rcv_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *src,
unsigned type,
enum amdgpu_interrupt_state state)
{ … }
static int xgpu_ai_mailbox_rcv_irq(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{ … }
static const struct amdgpu_irq_src_funcs xgpu_ai_mailbox_ack_irq_funcs = …;
static const struct amdgpu_irq_src_funcs xgpu_ai_mailbox_rcv_irq_funcs = …;
void xgpu_ai_mailbox_set_irq_funcs(struct amdgpu_device *adev)
{ … }
int xgpu_ai_mailbox_add_irq_id(struct amdgpu_device *adev)
{ … }
int xgpu_ai_mailbox_get_irq(struct amdgpu_device *adev)
{ … }
void xgpu_ai_mailbox_put_irq(struct amdgpu_device *adev)
{ … }
static int xgpu_ai_request_init_data(struct amdgpu_device *adev)
{ … }
static void xgpu_ai_ras_poison_handler(struct amdgpu_device *adev,
enum amdgpu_ras_block block)
{ … }
static bool xgpu_ai_rcvd_ras_intr(struct amdgpu_device *adev)
{ … }
const struct amdgpu_virt_ops xgpu_ai_virt_ops = …;