I am trying to port the kernel version from 5.4 to 6.9, with which I noticed there are changes in the NXP drivers.
I set the format as SBGGR12_1X12.
With the 5.4 kernel version, I capture image from the image sensor and I see proper image captured.

On examining the raw image captured from 5.4 kernel version, I see the below value.
*
01f35f0 0000 0000 0000 0000 f700 f700 f700 f700
01f3600 f700 f700 f700 f700 f700 f700 f700 f700
*
01f3730 f700 f700 f700 f700 0000 f700 0000 f700
01f3740 0000 f700 0000 f700 0000 f700 0000 f700
*
01f3870 0000 f700 0000 f700 f700 f700 f700 f700
01f3880 f700 f700 f700 f700 f700 f700 f700 f700
*
But With 6.9 kernel version, the image looks very dark.

I see the hexdump of captured image (6.9 version) as below,
*
01f3730 0f70 0f70 0f70 0f70 0000 0f70 0000 0f70
01f3740 0000 0f70 0000 0f70 0000 0f70 0000 0f70
*
01f3870 0000 0f70 0000 0f70 0f70 0f70 0f70 0f70
01f3880 0f70 0f70 0f70 0f70 0f70 0f70 0f70 0f70
*
01f39b0 0f70 0f70 0f70 0f70 0000 0f70 0000 0f70
01f39c0 0000 0f70 0000 0f70 0000 0f70 0000 0f70
*
01f3af0 0000 0f70 0000 0f70 0f70 0000 0f70 0000
01f3b00 0f70 0000 0f70 0000 0f70 0000 0f70 0000
*
Is the pixel value not getting shifted by 4 bits in case of RAW12 format in 6.9 kernel version imx drivers?
I also saw the below comment in file /drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
/*
* RAW formats
*
* The ISI shifts the 10-bit and 12-bit formats left by 6 and 4 bits
* when using CHNL_IMG_CTRL_FORMAT_RAW10 or MXC_ISI_OUT_FMT_RAW12
* respectively, to align the bits to the left and pad with zeros in
* the LSBs. The corresponding V4L2 formats are however right-aligned,
* we have to use CHNL_IMG_CTRL_FORMAT_RAW16 to avoid the left shift.
*/
Is there something missing?