#include <linux/firmware.h>
#include "amdgpu.h"
#include "amdgpu_cs.h"
#include "amdgpu_vcn.h"
#include "amdgpu_pm.h"
#include "soc15.h"
#include "soc15d.h"
#include "soc15_common.h"
#include "vcn/vcn_1_0_offset.h"
#include "vcn/vcn_1_0_sh_mask.h"
#include "mmhub/mmhub_9_1_offset.h"
#include "mmhub/mmhub_9_1_sh_mask.h"
#include "ivsrcid/vcn/irqsrcs_vcn_1_0.h"
#include "jpeg_v1_0.h"
#include "vcn_v1_0.h"
#define mmUVD_RBC_XX_IB_REG_CHECK_1_0 …
#define mmUVD_RBC_XX_IB_REG_CHECK_1_0_BASE_IDX …
#define mmUVD_REG_XX_MASK_1_0 …
#define mmUVD_REG_XX_MASK_1_0_BASE_IDX …
static int vcn_v1_0_stop(struct amdgpu_device *adev);
static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev);
static void vcn_v1_0_set_enc_ring_funcs(struct amdgpu_device *adev);
static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev);
static int vcn_v1_0_set_powergating_state(void *handle, enum amd_powergating_state state);
static int vcn_v1_0_pause_dpg_mode(struct amdgpu_device *adev,
int inst_idx, struct dpg_pause_state *new_state);
static void vcn_v1_0_idle_work_handler(struct work_struct *work);
static void vcn_v1_0_ring_begin_use(struct amdgpu_ring *ring);
static int vcn_v1_0_early_init(void *handle)
{ … }
static int vcn_v1_0_sw_init(void *handle)
{ … }
static int vcn_v1_0_sw_fini(void *handle)
{ … }
static int vcn_v1_0_hw_init(void *handle)
{ … }
static int vcn_v1_0_hw_fini(void *handle)
{ … }
static int vcn_v1_0_suspend(void *handle)
{ … }
static int vcn_v1_0_resume(void *handle)
{ … }
static void vcn_v1_0_mc_resume_spg_mode(struct amdgpu_device *adev)
{ … }
static void vcn_v1_0_mc_resume_dpg_mode(struct amdgpu_device *adev)
{ … }
static void vcn_v1_0_disable_clock_gating(struct amdgpu_device *adev)
{ … }
static void vcn_v1_0_enable_clock_gating(struct amdgpu_device *adev)
{ … }
static void vcn_v1_0_clock_gating_dpg_mode(struct amdgpu_device *adev, uint8_t sram_sel)
{ … }
static void vcn_1_0_disable_static_power_gating(struct amdgpu_device *adev)
{ … }
static void vcn_1_0_enable_static_power_gating(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_start_spg_mode(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_start_dpg_mode(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_start(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_stop_spg_mode(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_stop_dpg_mode(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_stop(struct amdgpu_device *adev)
{ … }
static int vcn_v1_0_pause_dpg_mode(struct amdgpu_device *adev,
int inst_idx, struct dpg_pause_state *new_state)
{ … }
static bool vcn_v1_0_is_idle(void *handle)
{ … }
static int vcn_v1_0_wait_for_idle(void *handle)
{ … }
static int vcn_v1_0_set_clockgating_state(void *handle,
enum amd_clockgating_state state)
{ … }
static uint64_t vcn_v1_0_dec_ring_get_rptr(struct amdgpu_ring *ring)
{ … }
static uint64_t vcn_v1_0_dec_ring_get_wptr(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_dec_ring_set_wptr(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_dec_ring_insert_start(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_dec_ring_insert_end(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
unsigned flags)
{ … }
static void vcn_v1_0_dec_ring_emit_ib(struct amdgpu_ring *ring,
struct amdgpu_job *job,
struct amdgpu_ib *ib,
uint32_t flags)
{ … }
static void vcn_v1_0_dec_ring_emit_reg_wait(struct amdgpu_ring *ring,
uint32_t reg, uint32_t val,
uint32_t mask)
{ … }
static void vcn_v1_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
unsigned vmid, uint64_t pd_addr)
{ … }
static void vcn_v1_0_dec_ring_emit_wreg(struct amdgpu_ring *ring,
uint32_t reg, uint32_t val)
{ … }
static uint64_t vcn_v1_0_enc_ring_get_rptr(struct amdgpu_ring *ring)
{ … }
static uint64_t vcn_v1_0_enc_ring_get_wptr(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_enc_ring_set_wptr(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_enc_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
u64 seq, unsigned flags)
{ … }
static void vcn_v1_0_enc_ring_insert_end(struct amdgpu_ring *ring)
{ … }
static void vcn_v1_0_enc_ring_emit_ib(struct amdgpu_ring *ring,
struct amdgpu_job *job,
struct amdgpu_ib *ib,
uint32_t flags)
{ … }
static void vcn_v1_0_enc_ring_emit_reg_wait(struct amdgpu_ring *ring,
uint32_t reg, uint32_t val,
uint32_t mask)
{ … }
static void vcn_v1_0_enc_ring_emit_vm_flush(struct amdgpu_ring *ring,
unsigned int vmid, uint64_t pd_addr)
{ … }
static void vcn_v1_0_enc_ring_emit_wreg(struct amdgpu_ring *ring,
uint32_t reg, uint32_t val)
{ … }
static int vcn_v1_0_set_interrupt_state(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
unsigned type,
enum amdgpu_interrupt_state state)
{ … }
static int vcn_v1_0_process_interrupt(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{ … }
static void vcn_v1_0_dec_ring_insert_nop(struct amdgpu_ring *ring, uint32_t count)
{ … }
static int vcn_v1_0_set_powergating_state(void *handle,
enum amd_powergating_state state)
{ … }
static void vcn_v1_0_idle_work_handler(struct work_struct *work)
{ … }
static void vcn_v1_0_ring_begin_use(struct amdgpu_ring *ring)
{ … }
void vcn_v1_0_set_pg_for_begin_use(struct amdgpu_ring *ring, bool set_clocks)
{ … }
void vcn_v1_0_ring_end_use(struct amdgpu_ring *ring)
{ … }
static const struct amd_ip_funcs vcn_v1_0_ip_funcs = …;
static int vcn_v1_0_validate_bo(struct amdgpu_cs_parser *parser,
struct amdgpu_job *job,
uint64_t addr)
{ … }
static int vcn_v1_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p,
struct amdgpu_job *job,
struct amdgpu_ib *ib)
{ … }
static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = …;
static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = …;
static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev)
{ … }
static void vcn_v1_0_set_enc_ring_funcs(struct amdgpu_device *adev)
{ … }
static const struct amdgpu_irq_src_funcs vcn_v1_0_irq_funcs = …;
static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev)
{ … }
const struct amdgpu_ip_block_version vcn_v1_0_ip_block = …;