]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: vsp1: Fix BRx conditional path in WPF
authorKieran Bingham <kieran.bingham@ideasonboard.com>
Mon, 26 Mar 2018 13:29:17 +0000 (09:29 -0400)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:48:13 +0000 (11:48 -0400)
commitfaeb496382a69d3983a857a81d523bda9225dcea
tree0b854916a4bbb467216b51620e1a698dd01fbd25
parent4f174430890954518d366d233253e07f903210ff
media: vsp1: Fix BRx conditional path in WPF

BugLink: http://bugs.launchpad.net/bugs/1773233
commit 639fa43d59e5a41ca8c55592cd5c1021fea2ab83 upstream.

When a BRx is provided by a pipeline, the WPF must determine the master
layer. Currently the condition to check this identifies pipe->bru ||
pipe->num_inputs > 1.

The code then moves on to dereference pipe->bru, thus the check fails
static analysers on the possibility that pipe->num_inputs could be
greater than 1 without pipe->bru being set.

The reality is that the pipeline must have a BRx to support more than
one input, thus this could never cause a fault - however it also
identifies that the num_inputs > 1 check is redundant.

Remove the redundant check - and always configure the master layer
appropriately when we have a BRx configured in our pipeline.

Fixes: 6134148f6098 ("v4l: vsp1: Add support for the BRS entity")
Cc: stable@vger.kernel.org
Suggested-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/vsp1/vsp1_wpf.c