summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispccdc.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-06-07 20:57:07 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-21 15:25:15 -0500
commit93d7badf1b929120cbc886f3dfec3ca55549d086 (patch)
tree86343a499f2221aeb8a994883baf0b4ac8cd6450 /drivers/media/platform/omap3isp/ispccdc.h
parentaec2de0e93e34e27ef60e7a8f48bc68ec4b4fcbb (diff)
downloadlinux-93d7badf1b929120cbc886f3dfec3ca55549d086.tar.bz2
[media] omap3isp: ccdc: Only complete buffer when all fields are captured
Checking that the captured field corresponds to the last required field depending on the requested field order before completing the buffer isn't enough. When the first field at stream start corresponds to the last required field, this would result in returning an interlaced buffer containing a single field. Fix this by keeping track of the fields captured in the buffer, and make sure that both fields are present for alternate field orders. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Enrico Butera <ebutera@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispccdc.h')
-rw-r--r--drivers/media/platform/omap3isp/ispccdc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/omap3isp/ispccdc.h b/drivers/media/platform/omap3isp/ispccdc.h
index c325b8901159..731ecc768197 100644
--- a/drivers/media/platform/omap3isp/ispccdc.h
+++ b/drivers/media/platform/omap3isp/ispccdc.h
@@ -93,6 +93,10 @@ struct ispccdc_lsc {
#define CCDC_PAD_SOURCE_VP 2
#define CCDC_PADS_NUM 3
+#define CCDC_FIELD_TOP 1
+#define CCDC_FIELD_BOTTOM 2
+#define CCDC_FIELD_BOTH 3
+
/*
* struct isp_ccdc_device - Structure for the CCDC module to store its own
* information
@@ -114,6 +118,7 @@ struct ispccdc_lsc {
* @update: Bitmask of controls to update during the next interrupt
* @shadow_update: Controls update in progress by userspace
* @bt656: Whether the input interface uses BT.656 synchronization
+ * @fields: The fields (CCDC_FIELD_*) stored in the current buffer
* @underrun: A buffer underrun occurred and a new buffer has been queued
* @state: Streaming state
* @lock: Serializes shadow_update with interrupt handler
@@ -143,6 +148,8 @@ struct isp_ccdc_device {
unsigned int shadow_update;
bool bt656;
+ unsigned int fields;
+
unsigned int underrun:1;
enum isp_pipeline_stream_state state;
spinlock_t lock;