#include <linux/slab.h>
#include "kfd_priv.h"
#include "kfd_topology.h"
#include "kfd_svm.h"
void print_queue_properties(struct queue_properties *q)
{ … }
void print_queue(struct queue *q)
{ … }
int init_queue(struct queue **q, const struct queue_properties *properties)
{ … }
void uninit_queue(struct queue *q)
{ … }
#if IS_ENABLED(CONFIG_HSA_AMD_SVM)
static int kfd_queue_buffer_svm_get(struct kfd_process_device *pdd, u64 addr, u64 size)
{ … }
static void kfd_queue_buffer_svm_put(struct kfd_process_device *pdd, u64 addr, u64 size)
{ … }
#else
static int kfd_queue_buffer_svm_get(struct kfd_process_device *pdd, u64 addr, u64 size)
{
return -EINVAL;
}
static void kfd_queue_buffer_svm_put(struct kfd_process_device *pdd, u64 addr, u64 size)
{
}
#endif
int kfd_queue_buffer_get(struct amdgpu_vm *vm, void __user *addr, struct amdgpu_bo **pbo,
u64 expected_size)
{ … }
void kfd_queue_buffer_put(struct amdgpu_bo **bo)
{ … }
int kfd_queue_acquire_buffers(struct kfd_process_device *pdd, struct queue_properties *properties)
{ … }
int kfd_queue_release_buffers(struct kfd_process_device *pdd, struct queue_properties *properties)
{ … }
void kfd_queue_unref_bo_va(struct amdgpu_vm *vm, struct amdgpu_bo **bo)
{ … }
int kfd_queue_unref_bo_vas(struct kfd_process_device *pdd,
struct queue_properties *properties)
{ … }
#define SGPR_SIZE_PER_CU …
#define LDS_SIZE_PER_CU …
#define HWREG_SIZE_PER_CU …
#define DEBUGGER_BYTES_ALIGN …
#define DEBUGGER_BYTES_PER_WAVE …
static u32 kfd_get_vgpr_size_per_cu(u32 gfxv)
{ … }
#define WG_CONTEXT_DATA_SIZE_PER_CU(gfxv) …
#define CNTL_STACK_BYTES_PER_WAVE(gfxv) …
#define SIZEOF_HSA_USER_CONTEXT_SAVE_AREA_HEADER …
void kfd_queue_ctx_save_restore_size(struct kfd_topology_device *dev)
{ … }