void vidc_720p_get_interrupt_status(u32 *interrupt_status,
	u32 *cmd_err_status, u32 *disp_pic_err_status, u32 *op_failed)
{
	u32 err_status;
	VIDC_IO_IN(REG_512143, interrupt_status);
	VIDC_IO_IN(REG_300310, &err_status);
	*cmd_err_status = err_status & 0xffff;
	*disp_pic_err_status = (err_status & 0xffff0000) >> 16;
	VIDC_IO_INF(REG_724381, OPERATION_FAILED, \
				 op_failed);
}
Esempio n. 2
0
void vidc_720p_decode_display_info(struct vidc_720p_dec_disp_info
				    *disp_info)
{
	u32 display_status = 0;
	VIDC_IO_INF(REG_612715, DISPLAY_STATUS, &display_status);

	disp_info->disp_status =
	    (enum vidc_720p_display_status)((display_status & 0x3));

	disp_info->disp_is_interlace = ((display_status & 0x4) >> 2);
	disp_info->crop_exists = ((display_status & 0x8) >> 3);

	disp_info->resl_change = ((display_status & 0x30) >> 4);

	VIDC_IO_INF(REG_724381, RESOLUTION_CHANGE,
		     &disp_info->reconfig_flush_done);

	VIDC_IO_IN(REG_999267, &disp_info->img_size_x);

	VIDC_IO_IN(REG_345712, &disp_info->img_size_y);
	VIDC_IO_IN(REG_151345, &disp_info->y_addr);
	VIDC_IO_IN(REG_293983, &disp_info->c_addr);
	VIDC_IO_IN(REG_370409, &disp_info->tag_top);
	VIDC_IO_IN(REG_438677, &disp_info->tag_bottom);
	VIDC_IO_IN(REG_679165, &disp_info->pic_time_top);
	VIDC_IO_IN(REG_374150, &disp_info->pic_time_bottom);

	if (disp_info->crop_exists) {
		VIDC_IO_INF(REG_881638, CROP_RIGHT_OFFSET,
			&disp_info->crop_right_offset);
		VIDC_IO_INF(REG_881638, CROP_LEFT_OFFSET,
			&disp_info->crop_left_offset);
		VIDC_IO_INF(REG_161486, CROP_BOTTOM_OFFSET,
			&disp_info->crop_bottom_offset);
		VIDC_IO_INF(REG_161486, CROP_TOP_OFFSET,
			&disp_info->crop_top_offset);
	}
	VIDC_IO_IN(REG_613254, &disp_info->metadata_exists);

	VIDC_IO_IN(REG_580603,
		    &disp_info->input_bytes_consumed);

	VIDC_IO_IN(REG_757835, &disp_info->input_frame_num);

	VIDC_IO_INF(REG_441270, FRAME_TYPE,
			   &disp_info->input_frame);

	disp_info->input_is_interlace =
	    ((disp_info->input_frame & 0x4) >> 2);

	if (disp_info->input_frame & 0x10)
		disp_info->input_frame = VIDC_720P_IDRFRAME;
	else
		disp_info->input_frame &= 0x3;
}
void vidc_720p_decode_get_seq_hdr_info(struct vidc_720p_seq_hdr_info
					*seq_hdr_info)
{
	u32 display_status;
	VIDC_IO_IN(REG_999267, &seq_hdr_info->img_size_x);

	VIDC_IO_IN(REG_345712, &seq_hdr_info->img_size_y);

	VIDC_IO_IN(REG_257463, &seq_hdr_info->min_num_dpb);

	VIDC_IO_IN(REG_854281, &seq_hdr_info->min_dpb_size);

	VIDC_IO_IN(REG_580603, &seq_hdr_info->dec_frm_size);

	VIDC_IO_INF(REG_606447, DISP_PIC_PROFILE,
				 &seq_hdr_info->profile);

	VIDC_IO_INF(REG_606447, DIS_PIC_LEVEL,
				 &seq_hdr_info->level);

	VIDC_IO_INF(REG_612715, DISPLAY_STATUS,
				&display_status);
	seq_hdr_info->progressive =
			((display_status & 0x4) >> 2);
	/* bit 3 is for crop existence */
	seq_hdr_info->crop_exists = ((display_status & 0x8) >> 3);

	if (seq_hdr_info->crop_exists) {
		/* read the cropping information */
		VIDC_IO_INF(REG_881638, CROP_RIGHT_OFFSET, \
			&seq_hdr_info->crop_right_offset);
		VIDC_IO_INF(REG_881638, CROP_LEFT_OFFSET, \
			&seq_hdr_info->crop_left_offset);
		VIDC_IO_INF(REG_161486, CROP_BOTTOM_OFFSET, \
			&seq_hdr_info->crop_bottom_offset);
		VIDC_IO_INF(REG_161486, CROP_TOP_OFFSET, \
			&seq_hdr_info->crop_top_offset);
	}
	/* Read the MPEG4 data partitioning indication */
	VIDC_IO_INF(REG_441270, DATA_PARTITIONED, \
				&seq_hdr_info->data_partitioned);

}
void vidc_720p_eos_info(u32 *disp_status, u32 *resl_change)
{
   VIDC_IO_INF(REG_612715, DISPLAY_STATUS, disp_status);
   (*disp_status) = (*disp_status) & 0x3;
   VIDC_IO_INF(REG_724381, RESOLUTION_CHANGE, resl_change);
}
void vidc_720p_eos_info(u32 *p_disp_status)
{
   VIDC_IO_INF(REG_612715, DISPLAY_STATUS, p_disp_status);
   (*p_disp_status) = (*p_disp_status) & 0x3;
}