summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vsp1
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2017-12-03 05:06:57 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-26 10:21:40 -0500
commit5e3e4cb5e24b92773b194aa90066170b12133bc6 (patch)
tree23f5a91fe16e231854dde1344355e84c97f2ef7d /drivers/media/platform/vsp1
parented3056f015de90a53127d05c34d49fe3e04675a4 (diff)
downloadop-kernel-dev-5e3e4cb5e24b92773b194aa90066170b12133bc6.zip
op-kernel-dev-5e3e4cb5e24b92773b194aa90066170b12133bc6.tar.gz
media: v4l: vsp1: Fix display stalls when requesting too many inputs
Make sure we don't accept more inputs than the hardware can handle. This is a temporary fix to avoid display stall, we need to instead allocate the BRU or BRS to display pipelines dynamically based on the number of planes they each use. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1')
-rw-r--r--drivers/media/platform/vsp1/vsp1_drm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index 7ce69f2..ac85942 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -530,6 +530,15 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index)
struct vsp1_rwpf *rpf = vsp1->rpf[i];
unsigned int j;
+ /*
+ * Make sure we don't accept more inputs than the hardware can
+ * handle. This is a temporary fix to avoid display stall, we
+ * need to instead allocate the BRU or BRS to display pipelines
+ * dynamically based on the number of planes they each use.
+ */
+ if (pipe->num_inputs >= pipe->bru->source_pad)
+ pipe->inputs[i] = NULL;
+
if (!pipe->inputs[i])
continue;
OpenPOWER on IntegriCloud