]> git.ipfire.org Git - thirdparty/linux.git/commit
media: mt9m114: Allow set_selection while streaming
authorMathis Foerst <mathis.foerst@mt.com>
Mon, 14 Jul 2025 07:59:26 +0000 (09:59 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 25 Aug 2025 13:40:38 +0000 (15:40 +0200)
commitb541288c515d91424e74055a7b2ef344446a92f7
tree883ecea70758767efb33430cd67afe26d2748b61
parentefe0832f57bd8a7155a63f3375353c27e3967959
media: mt9m114: Allow set_selection while streaming

The current implementation does not apply changes to the crop-
configuration of the sensor immediately if the sensor is in
streaming state. The user has to stop and restart the stream for
the changes to be applied.

This can be undesirable e.g. in a calibration usecase where the user
wants to see the impact of his changes in a live video stream.
Under the condition that the width & height of the cropped image area
does not change, the changed cropping configuration can be applied to
the pixel-array immediately without disturbing the IFP.

Call mt9m114_configure_pa() in mt9m114_pa_set_selection() if the sensor is
in streaming state and the size of the cropping rectangle didn't change,
issue a CONFIG_CHANGE to apply the changes immediately.

Signed-off-by: Mathis Foerst <mathis.foerst@mt.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/mt9m114.c