]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: v4l: vsp1: Fix display stalls when requesting too many inputs
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 3 Dec 2017 10:06:57 +0000 (05:06 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:40 +0000 (12:29 +0200)
BugLink: http://bugs.launchpad.net/bugs/1783418
[ 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+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/vsp1/vsp1_drm.c

index 4dfbeac8f42c90c97cb63308efbe84e352c035ee..d3cd57f6ba529065e5037abd2fb3c038d1a30051 100644 (file)
@@ -504,6 +504,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;