#include <linux/string.h>
#include "system_global.h"
#include "ia_css_isys.h"
#include "ia_css_debug.h"
#include "math_support.h"
#include "virtual_isys.h"
#include "isp.h"
#include "sh_css_defs.h"
static bool create_input_system_channel(
isp2401_input_system_cfg_t *cfg,
bool metadata,
input_system_channel_t *channel);
static void destroy_input_system_channel(
input_system_channel_t *channel);
static bool create_input_system_input_port(
isp2401_input_system_cfg_t *cfg,
input_system_input_port_t *input_port);
static void destroy_input_system_input_port(
input_system_input_port_t *input_port);
static bool calculate_input_system_channel_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
input_system_channel_cfg_t *channel_cfg,
bool metadata);
static bool calculate_input_system_input_port_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
input_system_input_port_cfg_t *input_port_cfg);
static bool acquire_sid(
stream2mmio_ID_t stream2mmio,
stream2mmio_sid_ID_t *sid);
static void release_sid(
stream2mmio_ID_t stream2mmio,
stream2mmio_sid_ID_t *sid);
static bool acquire_ib_buffer(
s32 bits_per_pixel,
s32 pixels_per_line,
s32 lines_per_frame,
s32 align_in_bytes,
bool online,
isp2401_ib_buffer_t *buf);
static void release_ib_buffer(
isp2401_ib_buffer_t *buf);
static bool acquire_dma_channel(
isys2401_dma_ID_t dma_id,
isys2401_dma_channel *channel);
static void release_dma_channel(
isys2401_dma_ID_t dma_id,
isys2401_dma_channel *channel);
static bool acquire_be_lut_entry(
csi_rx_backend_ID_t backend,
csi_mipi_packet_type_t packet_type,
csi_rx_backend_lut_entry_t *entry);
static void release_be_lut_entry(
csi_rx_backend_ID_t backend,
csi_mipi_packet_type_t packet_type,
csi_rx_backend_lut_entry_t *entry);
static bool calculate_prbs_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
pixelgen_prbs_cfg_t *cfg);
static bool calculate_fe_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
csi_rx_frontend_cfg_t *cfg);
static bool calculate_be_cfg(
const input_system_input_port_t *input_port,
const isp2401_input_system_cfg_t *isys_cfg,
bool metadata,
csi_rx_backend_cfg_t *cfg);
static bool calculate_stream2mmio_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
bool metadata,
stream2mmio_cfg_t *cfg);
static bool calculate_ibuf_ctrl_cfg(
const input_system_channel_t *channel,
const input_system_input_port_t *input_port,
const isp2401_input_system_cfg_t *isys_cfg,
ibuf_ctrl_cfg_t *cfg);
static bool calculate_isys2401_dma_cfg(
const input_system_channel_t *channel,
const isp2401_input_system_cfg_t *isys_cfg,
isys2401_dma_cfg_t *cfg);
static bool calculate_isys2401_dma_port_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
bool raw_packed,
bool metadata,
isys2401_dma_port_cfg_t *cfg);
static csi_mipi_packet_type_t get_csi_mipi_packet_type(
int32_t data_type);
static int32_t calculate_stride(
s32 bits_per_pixel,
s32 pixels_per_line,
bool raw_packed,
int32_t align_in_bytes);
ia_css_isys_error_t ia_css_isys_stream_create(
ia_css_isys_descr_t *isys_stream_descr,
ia_css_isys_stream_h isys_stream,
uint32_t isys_stream_id)
{ … }
void ia_css_isys_stream_destroy(
ia_css_isys_stream_h isys_stream)
{ … }
ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
ia_css_isys_stream_h isys_stream,
ia_css_isys_descr_t *isys_stream_descr,
ia_css_isys_stream_cfg_t *isys_stream_cfg)
{ … }
static bool create_input_system_channel(
isp2401_input_system_cfg_t *cfg,
bool metadata,
input_system_channel_t *me)
{ … }
static void destroy_input_system_channel(
input_system_channel_t *me)
{ … }
static bool create_input_system_input_port(
isp2401_input_system_cfg_t *cfg,
input_system_input_port_t *me)
{ … }
static void destroy_input_system_input_port(
input_system_input_port_t *me)
{ … }
static bool calculate_input_system_channel_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
input_system_channel_cfg_t *channel_cfg,
bool metadata)
{ … }
static bool calculate_input_system_input_port_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
input_system_input_port_cfg_t *input_port_cfg)
{ … }
static bool acquire_sid(
stream2mmio_ID_t stream2mmio,
stream2mmio_sid_ID_t *sid)
{ … }
static void release_sid(
stream2mmio_ID_t stream2mmio,
stream2mmio_sid_ID_t *sid)
{ … }
static int32_t calculate_stride(
s32 bits_per_pixel,
s32 pixels_per_line,
bool raw_packed,
int32_t align_in_bytes)
{ … }
static bool acquire_ib_buffer(
s32 bits_per_pixel,
s32 pixels_per_line,
s32 lines_per_frame,
s32 align_in_bytes,
bool online,
isp2401_ib_buffer_t *buf)
{ … }
static void release_ib_buffer(
isp2401_ib_buffer_t *buf)
{ … }
static bool acquire_dma_channel(
isys2401_dma_ID_t dma_id,
isys2401_dma_channel *channel)
{ … }
static void release_dma_channel(
isys2401_dma_ID_t dma_id,
isys2401_dma_channel *channel)
{ … }
static bool acquire_be_lut_entry(
csi_rx_backend_ID_t backend,
csi_mipi_packet_type_t packet_type,
csi_rx_backend_lut_entry_t *entry)
{ … }
static void release_be_lut_entry(
csi_rx_backend_ID_t backend,
csi_mipi_packet_type_t packet_type,
csi_rx_backend_lut_entry_t *entry)
{ … }
static bool calculate_prbs_cfg(
input_system_channel_t *channel,
input_system_input_port_t *input_port,
isp2401_input_system_cfg_t *isys_cfg,
pixelgen_prbs_cfg_t *cfg)
{ … }
static bool calculate_fe_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
csi_rx_frontend_cfg_t *cfg)
{ … }
static bool calculate_be_cfg(
const input_system_input_port_t *input_port,
const isp2401_input_system_cfg_t *isys_cfg,
bool metadata,
csi_rx_backend_cfg_t *cfg)
{ … }
static bool calculate_stream2mmio_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
bool metadata,
stream2mmio_cfg_t *cfg
)
{ … }
static bool calculate_ibuf_ctrl_cfg(
const input_system_channel_t *channel,
const input_system_input_port_t *input_port,
const isp2401_input_system_cfg_t *isys_cfg,
ibuf_ctrl_cfg_t *cfg)
{ … }
static bool calculate_isys2401_dma_cfg(
const input_system_channel_t *channel,
const isp2401_input_system_cfg_t *isys_cfg,
isys2401_dma_cfg_t *cfg)
{ … }
static bool calculate_isys2401_dma_port_cfg(
const isp2401_input_system_cfg_t *isys_cfg,
bool raw_packed,
bool metadata,
isys2401_dma_port_cfg_t *cfg)
{ … }
static csi_mipi_packet_type_t get_csi_mipi_packet_type(
int32_t data_type)
{ … }