diff options
author | Frank Chen <frankc@nvidia.com> | 2019-05-30 12:12:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-06-04 00:59:47 -0400 |
commit | 7727cd7e554fb6e6496e7f4bfa13e89d0fe56757 (patch) | |
tree | b58e868d9a9a58d744ed12faf8b46e856e106549 | |
parent | b1d2cf923bf8637be5866c684e482a03e4d76560 (diff) |
driver: ov5693: don't update control range
Don't update exposure control range after
changing frame rate. This will limit the manaul
exposure control for tuning tools.
Bug 200497783
Change-Id: Ia83f70368460b981c60ad9b0541e538c0c24e7fa
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127940
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/media/i2c/ov5693.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 96cc9063e..5af906774 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c | |||
@@ -84,9 +84,6 @@ static struct regmap_config ov5693_regmap_config = { | |||
84 | .val_bits = 8, | 84 | .val_bits = 8, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | static void ov5693_update_ctrl_range(struct camera_common_data *s_data, | ||
88 | s32 frame_length); | ||
89 | |||
90 | static inline void ov5693_get_frame_length_regs(ov5693_reg *regs, | 87 | static inline void ov5693_get_frame_length_regs(ov5693_reg *regs, |
91 | u32 frame_length) | 88 | u32 frame_length) |
92 | { | 89 | { |
@@ -473,42 +470,6 @@ fail: | |||
473 | return err; | 470 | return err; |
474 | } | 471 | } |
475 | 472 | ||
476 | static void ov5693_update_ctrl_range(struct camera_common_data *s_data, | ||
477 | s32 frame_length) | ||
478 | { | ||
479 | struct device *dev = s_data->dev; | ||
480 | struct v4l2_ctrl *ctrl = NULL; | ||
481 | int ctrl_ids[2] = {TEGRA_CAMERA_CID_EXPOSURE, | ||
482 | TEGRA_CAMERA_CID_EXPOSURE_SHORT}; | ||
483 | s32 max, min, def; | ||
484 | int i, j; | ||
485 | |||
486 | for (i = 0; i < ARRAY_SIZE(ctrl_ids); i++) { | ||
487 | for (j = 0; j < s_data->numctrls; j++) { | ||
488 | if (s_data->ctrls[j]->id == ctrl_ids[i]) { | ||
489 | ctrl = s_data->ctrls[j]; | ||
490 | break; | ||
491 | } | ||
492 | } | ||
493 | |||
494 | if (j == s_data->numctrls) { | ||
495 | dev_err(dev, "could not find ctrl %x\n", ctrl_ids[i]); | ||
496 | continue; | ||
497 | } | ||
498 | |||
499 | max = frame_length - OV5693_MAX_COARSE_DIFF; | ||
500 | /* clamp the value in case above is negative */ | ||
501 | max = clamp_val(max, OV5693_MIN_EXPOSURE_COARSE, | ||
502 | OV5693_MAX_EXPOSURE_COARSE); | ||
503 | min = OV5693_MIN_EXPOSURE_COARSE; | ||
504 | def = clamp_val(OV5693_DEFAULT_EXPOSURE_COARSE, min, max); | ||
505 | if (__v4l2_ctrl_modify_range(ctrl, min, max, 1, def)) | ||
506 | dev_err(dev, "ctrl %x: range update failed\n", | ||
507 | ctrl_ids[i]); | ||
508 | } | ||
509 | |||
510 | } | ||
511 | |||
512 | static int ov5693_set_frame_rate(struct tegracam_device *tc_dev, s64 val) | 473 | static int ov5693_set_frame_rate(struct tegracam_device *tc_dev, s64 val) |
513 | { | 474 | { |
514 | struct camera_common_data *s_data = tc_dev->s_data; | 475 | struct camera_common_data *s_data = tc_dev->s_data; |
@@ -540,7 +501,6 @@ static int ov5693_set_frame_rate(struct tegracam_device *tc_dev, s64 val) | |||
540 | 501 | ||
541 | priv->frame_length = frame_length; | 502 | priv->frame_length = frame_length; |
542 | 503 | ||
543 | ov5693_update_ctrl_range(s_data, val); | ||
544 | return 0; | 504 | return 0; |
545 | 505 | ||
546 | fail: | 506 | fail: |
@@ -965,8 +925,6 @@ static int ov5693_stop_streaming(struct tegracam_device *tc_dev) | |||
965 | u32 frame_time; | 925 | u32 frame_time; |
966 | int err; | 926 | int err; |
967 | 927 | ||
968 | ov5693_update_ctrl_range(s_data, OV5693_MAX_FRAME_LENGTH); | ||
969 | |||
970 | mutex_lock(&priv->streaming_lock); | 928 | mutex_lock(&priv->streaming_lock); |
971 | err = ov5693_write_table(priv, | 929 | err = ov5693_write_table(priv, |
972 | mode_table[OV5693_MODE_STOP_STREAM]); | 930 | mode_table[OV5693_MODE_STOP_STREAM]); |