History

[media] media: davinci: vpif_capture: 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.

Prabhakar Lad committed 12 years ago

Commit c54d4a01 parent 81578921 file · +2 −2Browse files

Unified · Split

drivers/media/platform/davinci/vpif_capture.c+2−2
@@ -1596,7 +1596,7 @@ static int vpif_suspend(struct device *dev) · 1595 unmodified lines
15961596 ch = vpif_obj.dev[i];
15971597 common = &ch->common[VPIF_VIDEO_INDEX];
15981598
1599− if (!vb2_is_streaming(&common->buffer_queue))
1599+ if (!vb2_start_streaming_called(&common->buffer_queue))
16001600 continue;
16011601
16021602 mutex_lock(&common->lock);
@@ -1630,7 +1630,7 @@ static int vpif_resume(struct device *dev) · 27 unmodified lines
16301630 ch = vpif_obj.dev[i];
16311631 common = &ch->common[VPIF_VIDEO_INDEX];
16321632
1633− if (!vb2_is_streaming(&common->buffer_queue))
1633+ if (!vb2_start_streaming_called(&common->buffer_queue))
16341634 continue;
16351635
16361636 mutex_lock(&common->lock);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t