aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci
diff options
context:
space:
mode:
authorPrabhakar Lad <prabhakar.csengg@gmail.com>2014-09-06 11:26:50 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 19:16:18 -0400
commit815789244eda0b3be11fb1824354ca20c8ec3508 (patch)
treefcc44a2495aa971adbc8a5c3bab3bb337ce1eb38 /drivers/media/platform/davinci
parentead130335f35fb732921ee0ffde6639be35aa108 (diff)
[media] media: davinci: vpif_display: fix the check on suspend/resume callbacks
It is possible to call STREAMON without having any buffers queued. So vb2_is_streaming() can return true without start_streaming() having been called. Only after at least one buffer has been queued will start_streaming be called. The check vb2_is_streaming() is incorrect as this would start the DMA without having proper DMA pointers set up. this patch uses vb2_start_streaming_called() instead to check is streaming was called. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r--drivers/media/platform/davinci/vpif_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 76f829d6b10b..8d6ced56253c 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -1400,7 +1400,7 @@ static int vpif_suspend(struct device *dev)
1400 ch = vpif_obj.dev[i]; 1400 ch = vpif_obj.dev[i];
1401 common = &ch->common[VPIF_VIDEO_INDEX]; 1401 common = &ch->common[VPIF_VIDEO_INDEX];
1402 1402
1403 if (!vb2_is_streaming(&common->buffer_queue)) 1403 if (!vb2_start_streaming_called(&common->buffer_queue))
1404 continue; 1404 continue;
1405 1405
1406 mutex_lock(&common->lock); 1406 mutex_lock(&common->lock);
@@ -1432,7 +1432,7 @@ static int vpif_resume(struct device *dev)
1432 ch = vpif_obj.dev[i]; 1432 ch = vpif_obj.dev[i];
1433 common = &ch->common[VPIF_VIDEO_INDEX]; 1433 common = &ch->common[VPIF_VIDEO_INDEX];
1434 1434
1435 if (!vb2_is_streaming(&common->buffer_queue)) 1435 if (!vb2_start_streaming_called(&common->buffer_queue))
1436 continue; 1436 continue;
1437 1437
1438 mutex_lock(&common->lock); 1438 mutex_lock(&common->lock);