Ejemplo n.º 1
0
static void wpf_set_memory(struct vsp1_entity *entity, struct vsp1_dl_list *dl)
{
	struct vsp1_rwpf *wpf = entity_to_rwpf(entity);
	const struct v4l2_pix_format_mplane *format = &wpf->format;
	struct vsp1_rwpf_memory mem = wpf->mem;
	unsigned int flip = wpf->flip.active;
	unsigned int offset;

	/* Update the memory offsets based on flipping configuration. The
	 * destination addresses point to the locations where the VSP starts
	 * writing to memory, which can be different corners of the image
	 * depending on vertical flipping. Horizontal flipping is handled
	 * through a line buffer and doesn't modify the start address.
	 */
	if (flip & BIT(WPF_CTRL_VFLIP)) {
		mem.addr[0] += (format->height - 1)
			     * format->plane_fmt[0].bytesperline;

		if (format->num_planes > 1) {
			offset = (format->height / wpf->fmtinfo->vsub - 1)
			       * format->plane_fmt[1].bytesperline;
			mem.addr[1] += offset;
			mem.addr[2] += offset;
		}
	}

	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_Y, mem.addr[0]);
	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_C0, mem.addr[1]);
	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_C1, mem.addr[2]);
}
Ejemplo n.º 2
0
static void wpf_set_memory(struct vsp1_entity *entity, struct vsp1_dl_list *dl)
{
	struct vsp1_rwpf *wpf = entity_to_rwpf(entity);

	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_Y, wpf->mem.addr[0]);
	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_C0, wpf->mem.addr[1]);
	vsp1_wpf_write(wpf, dl, VI6_WPF_DSTM_ADDR_C1, wpf->mem.addr[2]);
}
Ejemplo n.º 3
0
static void vsp1_wpf_destroy(struct vsp1_entity *entity)
{
	struct vsp1_rwpf *wpf = entity_to_rwpf(entity);

	vsp1_dlm_destroy(wpf->dlm);
}