]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: mt9m114: Adjust IFP selections and source format when source format changes...
authorHans de Goede <johannes.goede@oss.qualcomm.com>
Tue, 30 Dec 2025 17:03:06 +0000 (18:03 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 14 Jan 2026 22:33:04 +0000 (23:33 +0100)
commit5e3c0bd3f864fec9f895bd42c172f56ac4cdeb63
tree59f49bae5cf77c9ce3fb50efc5ca2f14f6603ee1
parent633deb131082f41a3467f8a77abb9c95fb390008
media: mt9m114: Adjust IFP selections and source format when source format changes to/from RAW10

Changing the IFP source pad format to RAW10 means disabling the scaler,
which means that the crop and compose rectangles must be reset to
match the sink format size with no border.

And when changing the source pad format back from RAW10 to another format
which require demosaicing the crop and compose rectangles must be reset
to the sink format size minus a 4 pixels border all around it.

Also when changing the source pad format back from RAW10 to another format
the colorspace, ycbcr_enc and quantization need to be updated too.

Add a new mt9m114_ifp_update_sel_and_src_fmt() helper which resets all
these taking the bordersize for the new source format into account and
call this helper whenever the source pad format changes to/from RAW10.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.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