linux/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c

// SPDX-License-Identifier: MIT
/*
 * Copyright 2023 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 */

#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)
{}

/*
 * debugfs for mapping umsch firmware log buffer.
 */
#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 =;