4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>

[ Upstream commit 5e3e4cb5e24b92773b194aa90066170b12133bc6 ]

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+rene...@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.le...@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 drivers/media/platform/vsp1/vsp1_drm.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -504,6 +504,15 @@ void vsp1_du_atomic_flush(struct device
                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;
 


Reply via email to