summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Kuo <joshk@nvidia.com>2016-12-04 22:42:14 -0500
committerBhanu Murthy V <bmurthyv@nvidia.com>2017-03-22 13:36:40 -0400
commit6e068f7935d5c5ac85bb1e9690c3bc54480d1ecd (patch)
treed1e75edd2e9c8686cfe4e7fe9e128171fc170e54
parentb58da711c608b1be3eb6b1e57881a2c706065558 (diff)
media: imx274: Add frame rate in format
Add frame size in format, which adds 60fps for all sensor modes. The resolution in format needs to match with default width and height. These change fixes below v4l2 compliance and vi mode failure INFO: No frame size specified (--nv --width [width] --height [height]). fail: Video Capture: TRY_FMT(G_FMT) != G_FMT Bug 200182641 Bug 200234298 Change-Id: I0aca164c28d767c06a9ea07670d20ff3a288977f Signed-off-by: Josh Kuo <joshk@nvidia.com> Reviewed-on: http://git-master/r/1264704 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/media/i2c/imx274.c6
-rw-r--r--drivers/media/i2c/imx274_mode_tbls.h11
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index d55a27f16..763629bb2 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * imx274.c - imx274 sensor driver 2 * imx274.c - imx274 sensor driver
3 * 3 *
4 * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -49,8 +49,8 @@
49 49
50#define IMX274_DEFAULT_MODE IMX274_MODE_3840X2160 50#define IMX274_DEFAULT_MODE IMX274_MODE_3840X2160
51 51
52#define IMX274_DEFAULT_WIDTH 3840 52#define IMX274_DEFAULT_WIDTH 3864
53#define IMX274_DEFAULT_HEIGHT 2160 53#define IMX274_DEFAULT_HEIGHT 2174
54#define IMX274_DEFAULT_DATAFMT MEDIA_BUS_FMT_SRGGB10_1X10 54#define IMX274_DEFAULT_DATAFMT MEDIA_BUS_FMT_SRGGB10_1X10
55#define IMX274_DEFAULT_CLK_FREQ 24000000 55#define IMX274_DEFAULT_CLK_FREQ 24000000
56 56
diff --git a/drivers/media/i2c/imx274_mode_tbls.h b/drivers/media/i2c/imx274_mode_tbls.h
index fcca28e31..81ca2a289 100644
--- a/drivers/media/i2c/imx274_mode_tbls.h
+++ b/drivers/media/i2c/imx274_mode_tbls.h
@@ -414,14 +414,17 @@ static const imx274_reg *mode_table[] = {
414 [IMX274_MODE_TEST_PATTERN] = tp_colorbars, 414 [IMX274_MODE_TEST_PATTERN] = tp_colorbars,
415}; 415};
416 416
417static const int imx274_framerates[] = { 417static const int imx274_30_fr[] = {
418 30, 418 30,
419};
420
421static const int imx274_60_fr[] = {
419 60, 422 60,
420}; 423};
421 424
422static const struct camera_common_frmfmt imx274_frmfmt[] = { 425static const struct camera_common_frmfmt imx274_frmfmt[] = {
423 {{3864, 2174}, 0, IMX274_MODE_3840X2160}, 426 {{3864, 2174}, imx274_60_fr, 1, 0, IMX274_MODE_3840X2160},
424 {{1920, 1080}, 0, IMX274_MODE_1920X1080}, 427 {{1920, 1080}, imx274_60_fr, 1, 0, IMX274_MODE_1920X1080},
425 {{1280, 720}, 0, IMX274_MODE_1280X720}, 428 {{1280, 720}, imx274_60_fr, 1, 0, IMX274_MODE_1280X720},
426}; 429};
427#endif /* __IMX274_I2C_TABLES__ */ 430#endif /* __IMX274_I2C_TABLES__ */