 +		imr_tri_set_type_c(dl_vaddr, map, vbo, item_size);
 +	}
 +
-+	/* ...input is verified; lock context data */
-+	spin_lock_irqsave(&imr->lock, flags);
-+
-+	/* ...configuration index will be toggled later when job is submitted */
-+	cfg = &ctx->cfg[ctx->active_cfg ^ 1];
-+
-+    /* ...clear "apply" bit to prevent switch to the bank we are going to configure */
-+    cfg->apply = 0;
-+
-+    /* ...release context lock */
-+    spin_unlock_irqrestore(&imr->lock, flags);
-+
-+	/* ...discard pending configuration if needed (cannot do that with IRQ disabled) */
-+	if (cfg->dl_vaddr)
-+		dma_free_writecombine(imr->dev, cfg->dl_size, cfg->dl_vaddr, cfg->dl_dma_addr);
-+
-+	cfg->dl_vaddr = dl_vaddr;
-+	cfg->dl_size = dl_size;
-+	cfg->dl_start_offset = dl_start_offset;
-+	cfg->dl_dma_addr = dl_dma_addr;
-+
 +	/* ...prepare main DL-program */
-+	imr_dl_program_setup(ctx, cfg, desc.type, dl_vaddr + dl_start_offset, (u32)dl_dma_addr);
++	imr_dl_program_setup(ctx, cfg, type, dl_vaddr + dl_start_offset, (u32)dl_dma_addr);
++
++	/* ...update cropping parameters */
++	cfg->dst_subpixel = (type & IMR_MAP_DDP ? 2 : 0);
 +
 +	/* ...display list updated successfully */
-+	v4l2_dbg(2, debug, &ctx->imr->v4l2_dev, "display-list updated: %p[%08X]:%u[%u]\n",
-+		dl_vaddr, (u32)dl_dma_addr, dl_size, dl_start_offset);
-+
-+	/* ...update cropping parameters */
-+	cfg->dst_subpixel = (desc.type & IMR_MAP_DDP ? 2 : 0);
++	v4l2_dbg(2, debug, &ctx->imr->v4l2_dev, "display-list created: #%u[%08X]:%u[%u]\n",
++		cfg->id, (u32)dl_dma_addr, dl_size, dl_start_offset);
 +
 +	if (debug >= 4)
 +		print_hex_dump_bytes("DL-", DUMP_PREFIX_OFFSET, dl_vaddr + dl_start_offset, dl_size - dl_start_offset);
 +
-+    /* ...put "apply" bit in atomic fashion (overkill? - surely) */
-+	spin_lock_irqsave(&imr->lock, flags);
-+	cfg->apply = 1;
-+	spin_unlock_irqrestore(&imr->lock, flags);
-+
++	/* ...success */
 +	ret = 0;
 +
 +out:

+	struct vb2_v4l2_buffer     *vb;
+	unsigned long               flags;
+
+	/* ...protect against interrupt handler? - tbd */
+	spin_lock_irqsave(&ctx->imr->lock, flags);
+
+	/* ...purge all buffers from a queue - tbd - shall be available from framework */
+	for (;;) {
+		if (V4L2_TYPE_IS_OUTPUT(vq->type))
+			vb = v4l2_m2m_src_buf_remove(ctx->m2m_ctx);
+		else
+			vb = v4l2_m2m_dst_buf_remove(ctx->m2m_ctx);
+		if (vb == NULL)
+			break;
+
+		v4l2_m2m_buf_done(vb, VB2_BUF_STATE_ERROR);
+	}
+
+	spin_unlock_irqrestore(&ctx->imr->lock, flags);
+}
+
+/* ...buffer queue operations */

+{
+	struct imr_ctx     *ctx = priv;
+	struct imr_device  *imr = ctx->imr;
+	struct imr_cfg     *cfg;
+	struct vb2_buffer  *src_buf, *dst_buf;
+	u32                 src_addr, dst_addr;
+	unsigned long       flags;
+
+	v4l2_dbg(3, debug, &imr->v4l2_dev, "run next job...\n");
+
+	/* ...protect access to internal device state */
+	spin_lock_irqsave(&imr->lock, flags);
+
+	/* ...retrieve input/output buffers */
+	src_buf = v4l2_m2m_next_src_buf(ctx->m2m_ctx);
+	dst_buf = v4l2_m2m_next_dst_buf(ctx->m2m_ctx);
+
+	/* ...take configuration pointer associated with input buffer */
+	cfg = to_imr_buffer(to_vb2_v4l2_buffer(src_buf))->cfg;
+
+	/* ...cancel software reset state as needed */
+	iowrite32(0, imr->mmio + IMR_CR);
+
+	/* ...set cropping data with respect to destination sub-pixel mode */
+	iowrite32(ctx->crop[0] << cfg->dst_subpixel, imr->mmio + IMR_XMINR);
+	iowrite32(ctx->crop[1] << cfg->dst_subpixel, imr->mmio + IMR_XMAXR);
+	iowrite32(ctx->crop[2] << cfg->dst_subpixel, imr->mmio + IMR_YMINR);
+	iowrite32(ctx->crop[3] << cfg->dst_subpixel, imr->mmio + IMR_YMAXR);
+
+	/* ...adjust source/destination parameters of the program (interleaved / semiplanar) */
+	*cfg->src_pa_ptr[0] = src_addr = (u32)vb2_dma_contig_plane_dma_addr(src_buf, 0);
+	*cfg->dst_pa_ptr[0] = dst_addr = (u32)vb2_dma_contig_plane_dma_addr(dst_buf, 0);
+
+	/* ...adjust source/destination parameters of the UV-plane as needed */
+	if (cfg->src_pa_ptr[1] && cfg->dst_pa_ptr[1]) {
