Skip to content

Commit 5d0beee

Browse files
thayamamchehab
authored andcommitted
[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>
1 parent 857161f commit 5d0beee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/media/platform/vsp1/vsp1_wpf.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,20 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
9292
return 0;
9393
}
9494

95-
/* Sources. If the pipeline has a single input configure it as the
96-
* master layer. Otherwise configure all inputs as sub-layers and
97-
* select the virtual RPF as the master layer.
95+
/* Sources. If the pipeline has a single input and BRU is not used,
96+
* configure it as the master layer. Otherwise configure all
97+
* inputs as sub-layers and select the virtual RPF as the master
98+
* layer.
9899
*/
99100
for (i = 0; i < pipe->num_inputs; ++i) {
100101
struct vsp1_rwpf *input = pipe->inputs[i];
101102

102-
srcrpf |= pipe->num_inputs == 1
103+
srcrpf |= (!pipe->bru && pipe->num_inputs == 1)
103104
? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index)
104105
: VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
105106
}
106107

107-
if (pipe->num_inputs > 1)
108+
if (pipe->bru || pipe->num_inputs > 1)
108109
srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST;
109110

110111
vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf);

0 commit comments

Comments
 (0)