コード例 #1
0
bool s5p_vlayer_set_dest_position(unsigned long buf_in)
{
	u32 d_ox = 0;
	u32 d_oy = 0;
	struct s5p_img_offset *offset = (struct s5p_img_offset *)buf_in;
	enum s5p_tv_vp_err verr;

	g_s5ptv_status.vl_basic_param.dest_offset_x = offset->offset_x;
	g_s5ptv_status.vl_basic_param.dest_offset_y = offset->offset_y;
	s5p_vlayer_calc_inner_values();

	d_ox = g_s5ptv_status.vl_dest_offset_x;
	d_oy = g_s5ptv_status.vl_dest_offset_y;

	if (s5p_vlayer_wait_previous_update()) {
		pr_err("%s::s5p_vlayer_wait_previous_update() fail\n",
			__func__);
		return false;
	}

	s5p_vp_set_dest_position(d_ox, d_oy);

	verr = s5p_vp_update();
	if (verr != VPROC_NO_ERROR) {
		pr_err("%s::s5p_vp_update() fail\n", __func__);
		return false;
	}

	return true;
}
コード例 #2
0
enum s5p_tv_vp_err s5p_vp_init_layer(
	u32 top_y_addr,
	u32 top_c_addr,
	u32 bottom_y_addr,
	u32 bottom_c_addr,
	enum s5p_endian_type src_img_endian,
	u32 img_width,
	u32 img_height,
	u32 src_off_x,
	u32 src_x_fract_step,
	u32 src_off_y,
	u32 src_width,
	u32 src_height,
	u32 dst_off_x,
	u32 dst_off_y,
	u32 dst_width,
	u32 dst_height,
	bool ipc_2d)
{
	enum s5p_tv_vp_err ret = VPROC_NO_ERROR;

	VPPRINTK("src_img_endian(%d)\n", src_img_endian);

	writel(1, g_vp_base + S5P_VP_ENDIAN_MODE);

	ret = s5p_vp_set_top_field_address(top_y_addr, top_c_addr);
	if (ret != VPROC_NO_ERROR) {
		pr_err("s5p_vp_set_top_field_address(%d, %d) fail\n",
			top_y_addr, top_c_addr);
		return ret;
	}

	ret = s5p_vp_set_bottom_field_address(bottom_y_addr, bottom_c_addr);
	if (ret != VPROC_NO_ERROR) {
		pr_err("s5p_vp_set_bottom_field_address(%d, %d) fail\n",
			bottom_y_addr, bottom_c_addr);
		return ret;
	}

	ret = s5p_vp_set_img_size(img_width, img_height);
	if (ret != VPROC_NO_ERROR) {
		pr_err("s5p_vp_set_img_size(%d, %d) fail\n",
			img_width, img_height);
		return ret;
	}

	s5p_vp_set_src_position(src_off_x, src_x_fract_step, src_off_y);
	s5p_vp_set_dest_position(dst_off_x, dst_off_y);
	s5p_vp_set_src_dest_size(src_width, src_height, dst_width,
				dst_height, ipc_2d);

	VPPRINTK("S5P_VP_ENDIAN_MODE(0x%08x)\n", readl(g_vp_base + S5P_VP_ENDIAN_MODE));

	return ret;
}
コード例 #3
0
ファイル: vp.c プロジェクト: haraldh/samsung-kernel-galaxysii
int s5p_vp_init_layer(u32 top_y_addr,
			u32 top_c_addr,
			u32 bottom_y_addr,
			u32 bottom_c_addr,
			enum s5p_tv_endian src_img_endian,
			u32 img_width,
			u32 img_height,
			u32 src_off_x,
			u32 src_x_fract_step,
			u32 src_off_y,
			u32 src_width,
			u32 src_height,
			u32 dst_off_x,
			u32 dst_off_y,
			u32 dst_width,
			u32 dst_height,
			bool ipc_2d)
{
	int error = 0;

	VPPRINTK("%d\n\r", src_img_endian);

	writel(1, vp_base + S5P_VP_ENDIAN_MODE);

	error = s5p_vp_set_top_field_address(top_y_addr, top_c_addr);

	if (error != 0)
		return error;

	error = s5p_vp_set_bottom_field_address(bottom_y_addr,
		bottom_c_addr);

	if (error != 0)
		return error;

	error = s5p_vp_set_img_size(img_width, img_height);

	if (error != 0)
		return error;

	s5p_vp_set_src_position(src_off_x, src_x_fract_step, src_off_y);

	s5p_vp_set_dest_position(dst_off_x, dst_off_y);

	s5p_vp_set_src_dest_size(src_width, src_height, dst_width,
		dst_height, ipc_2d);

	return error;
}