Now I can get the RAW12 data on IMX8QM。
Use this way : sensor -> mipi csi (raw12) -> isi (raw16) -> user
But I found that data seems to have problems.
For example, Sensor raw data is 0x1234, but I get 0x3412,higher and low bytes have an interchange。
How can I modify to solve this problem?
for imx8qm ISI, you need to shift,
• RAW10 {valid_data, 4’b0} . After right shift 4 bits, you will get the correct image.
• RAW12 {valid_data, 2'b0} . After right shift 2 bits, you will get the correct image.
hi joanxie:
Thanks for your replay.
Now my way is to swap high and low bytes and then right shift 2 bits to get correct image.
I don't know why I need to exchange high and low bytes of data here.
I feel that there are some problems here.
you need to set 16bits as format, then shift two bits to get correct data, ISI doesn't have exchange issue, you need check your source code
hi:
My input and output configuration is as follows, is there any problem?
output:
{
+ .name = "SBGGR12",
+ .fourcc = V4L2_PIX_FMT_SBGGR12,
+ .depth = { 16 },
+ .color = MXC_ISI_OUT_FMT_RAW16,
+ .memplanes = 1,
+ .colplanes = 1,
+ .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
}
input:
{
+ .name = "SBGGR12",
+ .fourcc = V4L2_PIX_FMT_SBGGR12,
+ .depth = { 16 },
+ .memplanes = 1,
+ .colplanes = 1,
}
which file did you set this? is it the ISI file?
drivers/staging/media/imx/imx8-isi-cap.c