Skip to content

Commit 3e22e97

Browse files
6by9popcornmix
authored andcommitted
media: i2c : imx415: Correct hmax_min values for 891Mbps/lane
I obviously backported V1 of the patchset sent to mainline, as code review there picked up these incorrect hmax_min values. https://lore.kernel.org/all/AS4PR08MB773533B9D04BE15F51548FEBF7182@AS4PR08MB7735.eurprd08.prod.outlook.com/ The upstream patches also fixed a return without pm_runtime_put and the fall-through from V4L2_CID_VBLANK to V4L2_CID_EXPOSURE not updating ctrl, so the wrong exposure would get set. Backport these fixes from mainline. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 73cbaad commit 3e22e97

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/media/i2c/imx415.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static const struct imx415_mode supported_modes[] = {
522522
},
523523
{
524524
.lane_rate = 891000000,
525-
.hmax_min = { 1100, 550 },
525+
.hmax_min = { 2200, 1100 },
526526
.reg_list = {
527527
.num_of_regs = ARRAY_SIZE(imx415_linkrate_891mbps),
528528
.regs = imx415_linkrate_891mbps,
@@ -725,6 +725,7 @@ static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
725725
* Deliberately fall through as exposure is set based on VMAX
726726
* which has just changed.
727727
*/
728+
ctrl = sensor->exposure;
728729
fallthrough;
729730
case V4L2_CID_EXPOSURE:
730731
/* clamp the exposure value to VMAX. */
@@ -752,10 +753,11 @@ static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
752753
break;
753754

754755
case V4L2_CID_HBLANK:
755-
return cci_write(sensor->regmap, IMX415_HMAX,
756-
(format->width + ctrl->val) /
756+
ret = cci_write(sensor->regmap, IMX415_HMAX,
757+
(format->width + ctrl->val) /
757758
IMX415_HMAX_MULTIPLIER,
758759
NULL);
760+
break;
759761

760762
default:
761763
ret = -EINVAL;

0 commit comments

Comments
 (0)