summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorBryan Wu <pengw@nvidia.com>2016-04-14 18:54:27 -0400
committerBhanu Murthy V <bmurthyv@nvidia.com>2017-03-22 13:20:01 -0400
commit22a6db6182bbd5b98f7637b16805403a35082ff4 (patch)
tree13962e73eaaefbdf0133e3b29c8618b67e3b6758 /drivers/media
parentd55c90d94c4d000b59ca37b07fe6c71c2c772768 (diff)
media: imx274: add resolution, frame rate, code
Bug 1736471 Change-Id: Ieb8522b195fb0d34de52ecae489b4bf3c7f2fbcc Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com> Reviewed-on: http://git-master/r/1127009 (cherry picked from commit fcc57a0ab973a56408c8e045395bf18e4b87488b) Reviewed-on: http://git-master/r/1147738 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/imx274.c6
-rw-r--r--drivers/media/i2c/imx274_mode_tbls.h11
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 53cd8cb9c..e1f646f40 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -524,6 +524,8 @@ static struct v4l2_subdev_video_ops imx274_subdev_video_ops = {
524 .enum_mbus_fmt = camera_common_enum_fmt, 524 .enum_mbus_fmt = camera_common_enum_fmt,
525 .g_mbus_config = camera_common_g_mbus_config, 525 .g_mbus_config = camera_common_g_mbus_config,
526 .g_input_status = imx274_g_input_status, 526 .g_input_status = imx274_g_input_status,
527 .enum_framesizes = camera_common_enum_framesizes,
528 .enum_frameintervals = camera_common_enum_frameintervals,
527}; 529};
528 530
529static struct v4l2_subdev_core_ops imx274_subdev_core_ops = { 531static struct v4l2_subdev_core_ops imx274_subdev_core_ops = {
@@ -662,8 +664,8 @@ static int imx274_calculate_shr(struct imx274 *priv, u32 rep)
662 int shr; 664 int shr;
663 int min; 665 int min;
664 int max; 666 int max;
665 u32 vmax_l; 667 u8 vmax_l;
666 u32 vmax_m; 668 u8 vmax_m;
667 u32 vmax; 669 u32 vmax;
668 670
669 imx274_read_reg(priv->s_data, IMX274_SVR_ADDR, &svr); 671 imx274_read_reg(priv->s_data, IMX274_SVR_ADDR, &svr);
diff --git a/drivers/media/i2c/imx274_mode_tbls.h b/drivers/media/i2c/imx274_mode_tbls.h
index c86a5d70f..64a2d9e65 100644
--- a/drivers/media/i2c/imx274_mode_tbls.h
+++ b/drivers/media/i2c/imx274_mode_tbls.h
@@ -408,9 +408,14 @@ static const imx274_reg *mode_table[] = {
408 [IMX274_MODE_TEST_PATTERN] = tp_colorbars, 408 [IMX274_MODE_TEST_PATTERN] = tp_colorbars,
409}; 409};
410 410
411static const int imx274_framerates[] = {
412 30,
413 60,
414};
415
411static const struct camera_common_frmfmt imx274_frmfmt[] = { 416static const struct camera_common_frmfmt imx274_frmfmt[] = {
412 {{3840, 2160}, 0, IMX274_MODE_3840X2160}, 417 {{3840, 2160}, imx274_framerates, 2, 0, IMX274_MODE_3840X2160},
413 {{1920, 1080}, 0, IMX274_MODE_1920X1080}, 418 {{1920, 1080}, imx274_framerates, 2, 0, IMX274_MODE_1920X1080},
414 {{1280, 720}, 0, IMX274_MODE_1280X720}, 419 {{1280, 720}, imx274_framerates, 2, 0, IMX274_MODE_1280X720},
415}; 420};
416#endif /* __IMX274_I2C_TABLES__ */ 421#endif /* __IMX274_I2C_TABLES__ */