#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/debugfs.h>
#include <drm/drm_exec.h>
#include <drm/drm_drv.h>
#include "amdgpu.h"
#include "amdgpu_umsch_mm.h"
#include "umsch_mm_v4_0.h"
struct umsch_mm_test_ctx_data { … };
struct umsch_mm_test_mqd_data { … };
struct umsch_mm_test_ring_data { … };
struct umsch_mm_test_queue_info { … };
struct umsch_mm_test { … };
static int map_ring_data(struct amdgpu_device *adev, struct amdgpu_vm *vm,
struct amdgpu_bo *bo, struct amdgpu_bo_va **bo_va,
uint64_t addr, uint32_t size)
{ … }
static int unmap_ring_data(struct amdgpu_device *adev, struct amdgpu_vm *vm,
struct amdgpu_bo *bo, struct amdgpu_bo_va *bo_va,
uint64_t addr)
{ … }
static void setup_vpe_queue(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static void setup_vcn_queue(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static int add_test_queue(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static int remove_test_queue(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static int submit_vpe_queue(struct amdgpu_device *adev, struct umsch_mm_test *test)
{ … }
static int submit_vcn_queue(struct amdgpu_device *adev, struct umsch_mm_test *test)
{ … }
static int setup_umsch_mm_test(struct amdgpu_device *adev,
struct umsch_mm_test *test)
{ … }
static void cleanup_umsch_mm_test(struct amdgpu_device *adev,
struct umsch_mm_test *test)
{ … }
static int setup_test_queues(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static int submit_test_queues(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static void cleanup_test_queues(struct amdgpu_device *adev,
struct umsch_mm_test *test,
struct umsch_mm_test_queue_info *qinfo)
{ … }
static int umsch_mm_test(struct amdgpu_device *adev)
{ … }
int amdgpu_umsch_mm_submit_pkt(struct amdgpu_umsch_mm *umsch, void *pkt, int ndws)
{ … }
int amdgpu_umsch_mm_query_fence(struct amdgpu_umsch_mm *umsch)
{ … }
static void umsch_mm_ring_set_wptr(struct amdgpu_ring *ring)
{ … }
static u64 umsch_mm_ring_get_rptr(struct amdgpu_ring *ring)
{ … }
static u64 umsch_mm_ring_get_wptr(struct amdgpu_ring *ring)
{ … }
static const struct amdgpu_ring_funcs umsch_v4_0_ring_funcs = …;
int amdgpu_umsch_mm_ring_init(struct amdgpu_umsch_mm *umsch)
{ … }
int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)
{ … }
int amdgpu_umsch_mm_allocate_ucode_buffer(struct amdgpu_umsch_mm *umsch)
{ … }
int amdgpu_umsch_mm_allocate_ucode_data_buffer(struct amdgpu_umsch_mm *umsch)
{ … }
int amdgpu_umsch_mm_psp_execute_cmd_buf(struct amdgpu_umsch_mm *umsch)
{ … }
static void umsch_mm_agdb_index_init(struct amdgpu_device *adev)
{ … }
static int umsch_mm_init(struct amdgpu_device *adev)
{ … }
static int umsch_mm_early_init(void *handle)
{ … }
static int umsch_mm_late_init(void *handle)
{ … }
static int umsch_mm_sw_init(void *handle)
{ … }
static int umsch_mm_sw_fini(void *handle)
{ … }
static int umsch_mm_hw_init(void *handle)
{ … }
static int umsch_mm_hw_fini(void *handle)
{ … }
static int umsch_mm_suspend(void *handle)
{ … }
static int umsch_mm_resume(void *handle)
{ … }
void amdgpu_umsch_fwlog_init(struct amdgpu_umsch_mm *umsch_mm)
{ … }
#if defined(CONFIG_DEBUG_FS)
static ssize_t amdgpu_debugfs_umsch_fwlog_read(struct file *f, char __user *buf,
size_t size, loff_t *pos)
{ … }
static const struct file_operations amdgpu_debugfs_umschfwlog_fops = …;
#endif
void amdgpu_debugfs_umsch_fwlog_init(struct amdgpu_device *adev,
struct amdgpu_umsch_mm *umsch_mm)
{ … }
static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = …;
const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = …;