#include "amdgpu.h"
#include "amdgpu_jpeg.h"
#include "amdgpu_pm.h"
#include "soc15.h"
#include "soc15d.h"
#include "jpeg_v2_0.h"
#include "jpeg_v4_0_5.h"
#include "mmsch_v4_0.h"
#include "vcn/vcn_4_0_5_offset.h"
#include "vcn/vcn_4_0_5_sh_mask.h"
#include "ivsrcid/vcn/irqsrcs_vcn_4_0.h"
#define mmUVD_DPG_LMA_CTL …
#define mmUVD_DPG_LMA_CTL_BASE_IDX …
#define mmUVD_DPG_LMA_DATA …
#define mmUVD_DPG_LMA_DATA_BASE_IDX …
#define regUVD_JPEG_PITCH_INTERNAL_OFFSET …
#define regJPEG_DEC_GFX10_ADDR_CONFIG_INTERNAL_OFFSET …
#define regJPEG_SYS_INT_EN_INTERNAL_OFFSET …
#define regJPEG_CGC_CTRL_INTERNAL_OFFSET …
#define regJPEG_CGC_GATE_INTERNAL_OFFSET …
#define regUVD_NO_OP_INTERNAL_OFFSET …
static void jpeg_v4_0_5_set_dec_ring_funcs(struct amdgpu_device *adev);
static void jpeg_v4_0_5_set_irq_funcs(struct amdgpu_device *adev);
static int jpeg_v4_0_5_set_powergating_state(void *handle,
enum amd_powergating_state state);
static void jpeg_v4_0_5_dec_ring_set_wptr(struct amdgpu_ring *ring);
static int amdgpu_ih_clientid_jpeg[] = …;
static int jpeg_v4_0_5_early_init(void *handle)
{ … }
static int jpeg_v4_0_5_sw_init(void *handle)
{ … }
static int jpeg_v4_0_5_sw_fini(void *handle)
{ … }
static int jpeg_v4_0_5_hw_init(void *handle)
{ … }
static int jpeg_v4_0_5_hw_fini(void *handle)
{ … }
static int jpeg_v4_0_5_suspend(void *handle)
{ … }
static int jpeg_v4_0_5_resume(void *handle)
{ … }
static void jpeg_v4_0_5_disable_clock_gating(struct amdgpu_device *adev, int inst)
{ … }
static void jpeg_v4_0_5_enable_clock_gating(struct amdgpu_device *adev, int inst)
{ … }
static void jpeg_engine_4_0_5_dpg_clock_gating_mode(struct amdgpu_device *adev,
int inst_idx, uint8_t indirect)
{ … }
static int jpeg_v4_0_5_disable_static_power_gating(struct amdgpu_device *adev, int inst)
{ … }
static int jpeg_v4_0_5_enable_static_power_gating(struct amdgpu_device *adev, int inst)
{ … }
static void jpeg_v4_0_5_start_dpg_mode(struct amdgpu_device *adev, int inst_idx, bool indirect)
{ … }
static void jpeg_v4_0_5_stop_dpg_mode(struct amdgpu_device *adev, int inst_idx)
{ … }
static int jpeg_v4_0_5_start(struct amdgpu_device *adev)
{ … }
static int jpeg_v4_0_5_stop(struct amdgpu_device *adev)
{ … }
static uint64_t jpeg_v4_0_5_dec_ring_get_rptr(struct amdgpu_ring *ring)
{ … }
static uint64_t jpeg_v4_0_5_dec_ring_get_wptr(struct amdgpu_ring *ring)
{ … }
static void jpeg_v4_0_5_dec_ring_set_wptr(struct amdgpu_ring *ring)
{ … }
static bool jpeg_v4_0_5_is_idle(void *handle)
{ … }
static int jpeg_v4_0_5_wait_for_idle(void *handle)
{ … }
static int jpeg_v4_0_5_set_clockgating_state(void *handle,
enum amd_clockgating_state state)
{ … }
static int jpeg_v4_0_5_set_powergating_state(void *handle,
enum amd_powergating_state state)
{ … }
static int jpeg_v4_0_5_process_interrupt(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{ … }
static const struct amd_ip_funcs jpeg_v4_0_5_ip_funcs = …;
static const struct amdgpu_ring_funcs jpeg_v4_0_5_dec_ring_vm_funcs = …;
static void jpeg_v4_0_5_set_dec_ring_funcs(struct amdgpu_device *adev)
{ … }
static const struct amdgpu_irq_src_funcs jpeg_v4_0_5_irq_funcs = …;
static void jpeg_v4_0_5_set_irq_funcs(struct amdgpu_device *adev)
{ … }
const struct amdgpu_ip_block_version jpeg_v4_0_5_ip_block = …;