#include <linux/slab.h>
#include <linux/mutex.h>
#include "kfd_device_queue_manager.h"
#include "kfd_kernel_queue.h"
#include "kfd_priv.h"
static inline void inc_wptr(unsigned int *wptr, unsigned int increment_bytes,
unsigned int buffer_size_bytes)
{ … }
static void pm_calc_rlib_size(struct packet_manager *pm,
unsigned int *rlib_size,
bool *over_subscription)
{ … }
static int pm_allocate_runlist_ib(struct packet_manager *pm,
unsigned int **rl_buffer,
uint64_t *rl_gpu_buffer,
unsigned int *rl_buffer_size,
bool *is_over_subscription)
{ … }
static int pm_create_runlist_ib(struct packet_manager *pm,
struct list_head *queues,
uint64_t *rl_gpu_addr,
size_t *rl_size_bytes)
{ … }
int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm)
{ … }
void pm_uninit(struct packet_manager *pm)
{ … }
int pm_send_set_resources(struct packet_manager *pm,
struct scheduling_resources *res)
{ … }
int pm_send_runlist(struct packet_manager *pm, struct list_head *dqm_queues)
{ … }
int pm_send_query_status(struct packet_manager *pm, uint64_t fence_address,
uint64_t fence_value)
{ … }
int pm_update_grace_period(struct packet_manager *pm, uint32_t grace_period)
{ … }
int pm_send_unmap_queue(struct packet_manager *pm,
enum kfd_unmap_queues_filter filter,
uint32_t filter_param, bool reset)
{ … }
void pm_release_ib(struct packet_manager *pm)
{ … }
#if defined(CONFIG_DEBUG_FS)
int pm_debugfs_runlist(struct seq_file *m, void *data)
{ … }
int pm_debugfs_hang_hws(struct packet_manager *pm)
{ … }
#endif