aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1
diff options
context:
space:
mode:
authorTakanari Hayama <taki@igel.co.jp>2014-11-26 20:25:02 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-23 06:32:41 -0500
commit5d0beeec59e303c76160ddd67fa73dcfc5d76de0 (patch)
treea42207b528a294fe2bf786d12a2d974761effa40 /drivers/media/platform/vsp1
parent857161fc7d3734f8fd8707f1bc756c1158694371 (diff)
[media] v4l: vsp1: Always enable virtual RPF when BRU is in use
Regardless of a number of inputs, we should always enable virtual RPF when BRU is used. This allows the case when there's only one input to BRU, and a size of the input is smaller than a size of an output of BRU. Signed-off-by: Takanari Hayama <taki@igel.co.jp> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1')
-rw-r--r--drivers/media/platform/vsp1/vsp1_wpf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
index b1089d05583a..1d2b3a2f1573 100644
--- a/drivers/media/platform/vsp1/vsp1_wpf.c
+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
@@ -92,19 +92,20 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
92 return 0; 92 return 0;
93 } 93 }
94 94
95 /* Sources. If the pipeline has a single input configure it as the 95 /* Sources. If the pipeline has a single input and BRU is not used,
96 * master layer. Otherwise configure all inputs as sub-layers and 96 * configure it as the master layer. Otherwise configure all
97 * select the virtual RPF as the master layer. 97 * inputs as sub-layers and select the virtual RPF as the master
98 * layer.
98 */ 99 */
99 for (i = 0; i < pipe->num_inputs; ++i) { 100 for (i = 0; i < pipe->num_inputs; ++i) {
100 struct vsp1_rwpf *input = pipe->inputs[i]; 101 struct vsp1_rwpf *input = pipe->inputs[i];
101 102
102 srcrpf |= pipe->num_inputs == 1 103 srcrpf |= (!pipe->bru && pipe->num_inputs == 1)
103 ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index) 104 ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index)
104 : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index); 105 : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
105 } 106 }
106 107
107 if (pipe->num_inputs > 1) 108 if (pipe->bru || pipe->num_inputs > 1)
108 srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST; 109 srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST;
109 110
110 vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf); 111 vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf);