summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vivid/vivid-vid-cap.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-03-07 12:38:42 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 20:30:57 -0300
commit43047f6b7467c2c9e3ef0b8113469c40b0b78cc3 (patch)
tree347aebd39caa0dbb47ba16448a41e86e619b362a /drivers/media/platform/vivid/vivid-vid-cap.c
parentc501abcfbfd75da44f35992d0da39af92860fb01 (diff)
downloadtalos-obmc-linux-43047f6b7467c2c9e3ef0b8113469c40b0b78cc3.tar.gz
talos-obmc-linux-43047f6b7467c2c9e3ef0b8113469c40b0b78cc3.zip
[media] vivid: fix test pattern movement for V4L2_FIELD_ALTERNATE
The successive TOP/BOTTOM fields did not move as they should: only every other field actually changed position. The cause was that the tpg needs to know if it is dealing with a FIELD_ALTERNATE case since that requires slightly different handling. So tell the TPG whether or not the field setting is for the ALTERNATE case or not. 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/vivid/vivid-vid-cap.c')
-rw-r--r--drivers/media/platform/vivid/vivid-vid-cap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c
index 49f79a0aa2f6..d41ac4475317 100644
--- a/drivers/media/platform/vivid/vivid-vid-cap.c
+++ b/drivers/media/platform/vivid/vivid-vid-cap.c
@@ -733,7 +733,10 @@ int vivid_s_fmt_vid_cap(struct file *file, void *priv,
if (tpg_g_planes(&dev->tpg) > 1)
tpg_s_bytesperline(&dev->tpg, 1, mp->plane_fmt[1].bytesperline);
dev->field_cap = mp->field;
- tpg_s_field(&dev->tpg, dev->field_cap);
+ if (dev->field_cap == V4L2_FIELD_ALTERNATE)
+ tpg_s_field(&dev->tpg, V4L2_FIELD_TOP, true);
+ else
+ tpg_s_field(&dev->tpg, dev->field_cap, false);
tpg_s_crop_compose(&dev->tpg, &dev->crop_cap, &dev->compose_cap);
tpg_s_fourcc(&dev->tpg, dev->fmt_cap->fourcc);
if (vivid_is_sdtv_cap(dev))
OpenPOWER on IntegriCloud