Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: imx335: Update HBLANK range on mode change

While switching modes, updating to a different value of HBLANK isn't
sufficient, as this is a read-only control with a single allowed value,
and thus hblank_min == hblank_max == hblank of the default mode.

So to correctly update the user-facing value of the HBLANK parameter,
which is necessary for correct framerate calculation, update the whole
range when switching modes.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Jai Luthra and committed by
Hans Verkuil
d64ec84a b82801a1

+2 -1
+2 -1
drivers/media/i2c/imx335.c
··· 493 493 if (ret) 494 494 return ret; 495 495 496 - ret = __v4l2_ctrl_s_ctrl(imx335->hblank_ctrl, mode->hblank); 496 + ret = __v4l2_ctrl_modify_range(imx335->hblank_ctrl, mode->hblank, 497 + mode->hblank, 1, mode->hblank); 497 498 if (ret) 498 499 return ret; 499 500