示例#1
0
int fimc_hwset_org_input_size(struct fimc_control *ctrl, u32 width, u32 height)
{
	u32 cfg = 0;

	cfg |= S3C_ORGISIZE_HORIZONTAL(width);
	cfg |= S3C_ORGISIZE_VERTICAL(height);

	writel(cfg, ctrl->regs + S3C_ORGISIZE);

	return 0;
}
示例#2
0
static void s3c_fimc_set_input_dma_size(struct s3c_fimc_control *ctrl)
{
	struct s3c_fimc_in_frame *frame = &ctrl->in_frame;
	int ofs_h = frame->offset.y_h * 2;
	int ofs_v = frame->offset.y_v * 2;
	u32 cfg_o = 0, cfg_r = S3C_CIREAL_ISIZE_AUTOLOAD_ENABLE;

	cfg_o |= S3C_ORGISIZE_HORIZONTAL(frame->width - ofs_h);
	cfg_o |= S3C_ORGISIZE_VERTICAL(frame->height - ofs_v);
	cfg_r |= S3C_CIREAL_ISIZE_WIDTH(frame->width - ofs_h);
	cfg_r |= S3C_CIREAL_ISIZE_HEIGHT(frame->height - ofs_v);

	writel(cfg_o, ctrl->regs + S3C_ORGISIZE);
	writel(cfg_r, ctrl->regs + S3C_CIREAL_ISIZE);
}