summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1/vsp1_wpf.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-07-10 18:03:46 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-23 10:20:15 -0300
commit629bb6d4b38fe62d36ab52ad22c3ab726f6ce6e8 (patch)
treef826d26c1ecabf02fd1a3d8be8408e1d637e8ae7 /drivers/media/platform/vsp1/vsp1_wpf.c
parentd9b45ed3d8b75e8cf38c8cd1563c29217eecba27 (diff)
[media] v4l: vsp1: Add BRU support
The Blend ROP Unit performs blending and ROP operations for up to four sources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_wpf.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_wpf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
index ef9f88ead31..1294340dcb3 100644
--- a/drivers/media/platform/vsp1/vsp1_wpf.c
+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
@@ -58,13 +58,21 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
return 0;
}
- /* Sources */
+ /* Sources. If the pipeline has a single input configure it as the
+ * master layer. Otherwise configure all inputs as sub-layers and
+ * select the virtual RPF as the master layer.
+ */
for (i = 0; i < pipe->num_inputs; ++i) {
struct vsp1_rwpf *input = pipe->inputs[i];
- srcrpf |= VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index);
+ srcrpf |= pipe->num_inputs == 1
+ ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index)
+ : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
}
+ if (pipe->num_inputs > 1)
+ srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST;
+
vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf);
/* Destination stride. */