mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: i2c: ov13850 fixes exposure range
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: I01844942c9b6c36df7ec085d76638a6f0f25115c
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
#define OV13850_MODE_STREAMING BIT(0)
|
||||
|
||||
#define OV13850_REG_EXPOSURE 0x3500
|
||||
#define OV13850_EXPOSURE_MIN 4
|
||||
#define OV13850_EXPOSURE_MIN 2
|
||||
#define OV13850_EXPOSURE_STEP 1
|
||||
#define OV13850_VTS_MAX 0x7fff
|
||||
|
||||
@@ -1303,7 +1303,7 @@ static int ov13850_set_ctrl(struct v4l2_ctrl *ctrl)
|
||||
switch (ctrl->id) {
|
||||
case V4L2_CID_VBLANK:
|
||||
/* Update max exposure while meeting expected vblanking */
|
||||
max = ov13850->cur_mode->height + ctrl->val - 4;
|
||||
max = ov13850->cur_mode->height + ctrl->val - 16;
|
||||
__v4l2_ctrl_modify_range(ov13850->exposure,
|
||||
ov13850->exposure->minimum, max,
|
||||
ov13850->exposure->step,
|
||||
@@ -1393,7 +1393,7 @@ static int ov13850_initialize_controls(struct ov13850 *ov13850)
|
||||
OV13850_VTS_MAX - mode->height,
|
||||
1, vblank_def);
|
||||
|
||||
exposure_max = mode->vts_def - 4;
|
||||
exposure_max = mode->vts_def - 16;
|
||||
ov13850->exposure = v4l2_ctrl_new_std(handler, &ov13850_ctrl_ops,
|
||||
V4L2_CID_EXPOSURE, OV13850_EXPOSURE_MIN,
|
||||
exposure_max, OV13850_EXPOSURE_STEP,
|
||||
|
||||
Reference in New Issue
Block a user