示例#1
0
enum ia_css_err
ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
			  unsigned int *or_mask,
			  unsigned int *and_mask)
{
	const struct ia_css_fw_info *fw = &sh_css_sp_fw;
	unsigned int HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
	unsigned int offset;
	struct sh_css_event_irq_mask event_irq_mask;

	(void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */

	sh_css_dtrace(SH_DBG_TRACE, "ia_css_event_get_irq_mask()\n");

	assert(pipe);
	assert(IA_CSS_PIPE_ID_NUM == NR_OF_PIPELINES);

	offset = offsetof(struct host_sp_communication,
					host2sp_event_irq_mask[ia_css_pipe_get_pipe_num(pipe)]);
	assert(offset % HRT_BUS_BYTES == 0);
	sp_dmem_load(SP0_ID,
		(unsigned int)sp_address_of(host_sp_com) + offset,
		&event_irq_mask, sizeof(event_irq_mask));

	if (or_mask)
		*or_mask = event_irq_mask.or_mask;

	if (and_mask)
		*and_mask = event_irq_mask.and_mask;

	return IA_CSS_SUCCESS;
}
static void isyspoc_dump_sp_stream_state(unsigned int stream_handle)
{
	if (INPUT_SYSTEM_N_STREAM_ID >= stream_handle) {
		unsigned int offset = stream_handle*sizeof(ia_css_isys_stream_holder_t);
		ia_css_isys_stream_holder_t isys_stream_state;
		sp_dmem_load(SP0_ID,
				(unsigned int) HIVE_ADDR_ia_css_isys_stream_container + offset,
				&isys_stream_state, sizeof(ia_css_isys_stream_holder_t));

		ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
				"sizeof(cmd)=%d sizeof(virtual_input_system_stream_t)=%d "
				"sizeof(ia_css_isys_stream_cfg_t)=%d sizeof(ia_css_isys_frame_buff_set)=%d\n",
				sizeof(ia_css_isyspoc_cmd_msg_t),
				sizeof(virtual_input_system_stream_t),
				sizeof(ia_css_isys_stream_cfg_t),
				sizeof(struct ia_css_isys_frame_buff_set));

		ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
				"sp.stream_handle=%d sp.stream.state=%d "
				"sp.stream.msg_addr=%x sp.stream.msg_cmd=%d sp.stream.msg_resp=%d "
				"sp.stream.stream_num=%d sp.stream.err=%d\n",
				stream_handle, isys_stream_state.state,
				isys_stream_state.msg_addr, isys_stream_state.msg.send_type,
				isys_stream_state.msg.resp_type,
				isys_stream_state.msg.stream_handle,
				isys_stream_state.msg.ret);

		isyspoc_dump_virtual_isys_handle(&isys_stream_state.msg.virtual_input_system);
		isyspoc_dump_isys_stream_cfg(&isys_stream_state.msg.payload.virtual_input_system_cfg);
	}
}
示例#3
0
bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipeline)
{
	/* Android compilation files if made an local variable
	stack size on android is limited to 2k and this structure
	is around 2.5K, in place of static malloc can be done but
	if this call is made too often it will lead to fragment memory
	versus a fixed allocation */
	static struct sh_css_sp_group sp_group;
	unsigned int thread_id;
	const struct ia_css_fw_info *fw;
	unsigned int HIVE_ADDR_sp_group;

	fw = &sh_css_sp_fw;
	HIVE_ADDR_sp_group = fw->info.sp.group;

	ia_css_pipeline_get_sp_thread_id(pipeline->pipe_num, &thread_id);
	sp_dmem_load(SP0_ID,
		     (unsigned int)sp_address_of(sp_group),
		     &sp_group, sizeof(struct sh_css_sp_group));
	return sp_group.pipe[thread_id].num_stages == 0;
}