summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vivid/vivid-tpg.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-tpg.c
parentc501abcfbfd75da44f35992d0da39af92860fb01 (diff)
[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-tpg.c')
-rw-r--r--drivers/media/platform/vivid/vivid-tpg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c
index acb73b67b16a..f4e9108bfd06 100644
--- a/drivers/media/platform/vivid/vivid-tpg.c
+++ b/drivers/media/platform/vivid/vivid-tpg.c
@@ -1413,7 +1413,9 @@ void tpg_fillbuffer(struct tpg_data *tpg, v4l2_std_id std, unsigned p, u8 *vbuf)
linestart_older += line_offset;
linestart_newer += line_offset;
}
- if (is_60hz) {
+ if (tpg->field_alternate) {
+ linestart_top = linestart_bottom = linestart_older;
+ } else if (is_60hz) {
linestart_top = linestart_newer;
linestart_bottom = linestart_older;
} else {