]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
media: omap3isp: Don't set streaming state on random subdevs
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 7 Aug 2019 14:21:27 +0000 (11:21 -0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:25:52 +0000 (04:25 -0400)
BugLink: https://bugs.launchpad.net/bugs/1848046
[ Upstream commit 7ef57be07ac146e70535747797ef4aee0f06e9f9 ]

The streaming state should be set to the first upstream sub-device only,
not everywhere, for a sub-device driver itself knows how to best control
the streaming state of its own upstream sub-devices.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/media/platform/omap3isp/isp.c

index 83216fc7156b373fed3217896614d1f3c22675c6..9cdb43859ae09bf7bcd384b57de2ce7bdf6bfb5a 100644 (file)
@@ -719,6 +719,10 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
                                        s_stream, mode);
                        pipe->do_propagation = true;
                }
+
+               /* Stop at the first external sub-device. */
+               if (subdev->dev != isp->dev)
+                       break;
        }
 
        return 0;
@@ -833,6 +837,10 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
                                                      &subdev->entity);
                        failure = -ETIMEDOUT;
                }
+
+               /* Stop at the first external sub-device. */
+               if (subdev->dev != isp->dev)
+                       break;
        }
 
        return failure;