int fimc_hw_save_output_addr(struct fimc_dev *fimc)
{
	int i;
	for (i = 0; i < FIMC_MAX_OUT_BUFS; i++) {
		fimc->paddr[i].y = readl(fimc->regs + S5P_CIOYSA(i));
		fimc->paddr[i].cb = readl(fimc->regs + S5P_CIOCBSA(i));
		fimc->paddr[i].cr = readl(fimc->regs + S5P_CIOCRSA(i));
	}

	return 0;
}
Exemple #2
0
void fimc_hw_set_output_addr(struct fimc_dev *dev,
			     struct fimc_addr *paddr, int index)
{
	int i = (index == -1) ? 0 : index;
	do {
		writel(paddr->y, dev->regs + S5P_CIOYSA(i));
		writel(paddr->cb, dev->regs + S5P_CIOCBSA(i));
		writel(paddr->cr, dev->regs + S5P_CIOCRSA(i));
		dbg("dst_buf[%d]: 0x%X, cb: 0x%X, cr: 0x%X",
		    i, paddr->y, paddr->cb, paddr->cr);
	} while (index == -1 && ++i < FIMC_MAX_OUT_BUFS);
}