aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25840/cx25840-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 7dc7bb155df..d8eac3e30a7 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -1380,11 +1380,21 @@ static int cx25840_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt
1380 fmt->field = V4L2_FIELD_INTERLACED; 1380 fmt->field = V4L2_FIELD_INTERLACED;
1381 fmt->colorspace = V4L2_COLORSPACE_SMPTE170M; 1381 fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
1382 1382
1383 Vsrc = (cx25840_read(client, 0x476) & 0x3f) << 4; 1383 if (is_cx23888(state)) {
1384 Vsrc |= (cx25840_read(client, 0x475) & 0xf0) >> 4; 1384 Vsrc = (cx25840_read(client, 0x42a) & 0x3f) << 4;
1385 Vsrc |= (cx25840_read(client, 0x429) & 0xf0) >> 4;
1386 } else {
1387 Vsrc = (cx25840_read(client, 0x476) & 0x3f) << 4;
1388 Vsrc |= (cx25840_read(client, 0x475) & 0xf0) >> 4;
1389 }
1385 1390
1386 Hsrc = (cx25840_read(client, 0x472) & 0x3f) << 4; 1391 if (is_cx23888(state)) {
1387 Hsrc |= (cx25840_read(client, 0x471) & 0xf0) >> 4; 1392 Hsrc = (cx25840_read(client, 0x426) & 0x3f) << 4;
1393 Hsrc |= (cx25840_read(client, 0x425) & 0xf0) >> 4;
1394 } else {
1395 Hsrc = (cx25840_read(client, 0x472) & 0x3f) << 4;
1396 Hsrc |= (cx25840_read(client, 0x471) & 0xf0) >> 4;
1397 }
1388 1398
1389 Vlines = fmt->height + (is_50Hz ? 4 : 7); 1399 Vlines = fmt->height + (is_50Hz ? 4 : 7);
1390 1400