#include "assert_support.h"
#include "ia_css_buffer.h"
#include "sp.h"
#include "ia_css_bufq.h"
#include "ia_css_queue.h"
#include "sw_event_global.h"
#include "ia_css_eventq.h"
#include "ia_css_debug.h"
#include "sh_css_internal.h"
#include "sp_local.h"
#include "sh_css_firmware.h"
#define BUFQ_DUMP_FILE_NAME_PREFIX_SIZE …
static char prefix[BUFQ_DUMP_FILE_NAME_PREFIX_SIZE] = …;
struct sh_css_queues { … };
static struct sh_css_queues css_queues;
static int
buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
static bool queue_availability[SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
static void map_buffer_type_to_queue_id(
unsigned int thread_id,
enum ia_css_buffer_type buf_type
);
static void unmap_buffer_type_to_queue_id(
unsigned int thread_id,
enum ia_css_buffer_type buf_type
);
static ia_css_queue_t *bufq_get_qhandle(
enum sh_css_queue_type type,
enum sh_css_queue_id id,
int thread
);
void ia_css_queue_map_init(void)
{ … }
void ia_css_queue_map(
unsigned int thread_id,
enum ia_css_buffer_type buf_type,
bool map)
{ … }
bool ia_css_query_internal_queue_id(
enum ia_css_buffer_type buf_type,
unsigned int thread_id,
enum sh_css_queue_id *val)
{ … }
static void map_buffer_type_to_queue_id(
unsigned int thread_id,
enum ia_css_buffer_type buf_type)
{ … }
static void unmap_buffer_type_to_queue_id(
unsigned int thread_id,
enum ia_css_buffer_type buf_type)
{ … }
static ia_css_queue_t *bufq_get_qhandle(
enum sh_css_queue_type type,
enum sh_css_queue_id id,
int thread)
{ … }
static inline void
init_bufq(unsigned int desc_offset,
unsigned int elems_offset,
ia_css_queue_t *handle)
{ … }
void ia_css_bufq_init(void)
{ … }
int ia_css_bufq_enqueue_buffer(
int thread_index,
int queue_id,
uint32_t item)
{ … }
int ia_css_bufq_dequeue_buffer(
int queue_id,
uint32_t *item)
{ … }
int ia_css_bufq_enqueue_psys_event(
u8 evt_id,
u8 evt_payload_0,
u8 evt_payload_1,
uint8_t evt_payload_2)
{ … }
int ia_css_bufq_dequeue_psys_event(
u8 item[BUFQ_EVENT_SIZE])
{ … }
int ia_css_bufq_dequeue_isys_event(
u8 item[BUFQ_EVENT_SIZE])
{ … }
int ia_css_bufq_enqueue_isys_event(uint8_t evt_id)
{ … }
int ia_css_bufq_enqueue_tag_cmd(
uint32_t item)
{ … }
int ia_css_bufq_deinit(void)
{ … }
static void bufq_dump_queue_info(const char *prefix, ia_css_queue_t *qhandle)
{ … }
void ia_css_bufq_dump_queue_info(void)
{ … }