aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/tegra-video/tegra210.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/media/tegra-video/tegra210.c')
-rw-r--r--drivers/staging/media/tegra-video/tegra210.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/staging/media/tegra-video/tegra210.c b/drivers/staging/media/tegra-video/tegra210.c
index e540b44bf0de..7e45f9a625fd 100644
--- a/drivers/staging/media/tegra-video/tegra210.c
+++ b/drivers/staging/media/tegra-video/tegra210.c
@@ -456,6 +456,7 @@ static int chan_capture_kthread_start(void *data)
{
struct tegra_vi_channel *chan = data;
struct tegra_channel_buffer *buf;
+ unsigned int retries = 0;
int err = 0;
while (1) {
@@ -485,8 +486,15 @@ static int chan_capture_kthread_start(void *data)
spin_unlock(&chan->start_lock);
err = tegra_channel_capture_frame(chan, buf);
- if (err)
+ if (!err) {
+ retries = 0;
+ continue;
+ }
+
+ if (retries++ > chan->syncpt_timeout_retry)
vb2_queue_error(&chan->queue);
+ else
+ err = 0;
}
return 0;

Privacy Policy