Hi,
We are currently working on the IMX8M-MINI board for bringing up the camera module IMX298.
Here the issue is that the RAW10 format is not supported in IMX8MM MIPI-CSI capture driver.
Is it possible?
Can you please share me, how to add the RAW10 patches in the MIPI-CSI capture driver?
IMX298 support RAW8/10, Our driver has been configured with the below format and tried to stream the camera but it got failed.
MEDIA_BUS_FMT_SRGGB10_1X10 => MIPI-CSI capture driver doesn't have the configuration
MEDIA_BUS_FMT_SBGGR8_1X8 => MIPI-CSI capture driver support this format
In my imx298 driver code, we have tried to configure in RAW8 in the mbus_code "MEDIA_BUS_FMT_SBGGR8_1X8" but we are failed to stream the camera.
Can you please share the procedure to capture the raw image in a specific format RAW8/RAW10 and include the addition of RAW10 patches in the IMX8MM MIPI-CSI capture driver?
Thanks in Advance.
Hi,
Is there any difference about BGGR and RGGB format because of the patch configured the BGGR format. Our camera driver is configured to rggb can you please add related to the color format patch
if you don't use the same bayer pattern, you need change this register
We are trying to stream the camera in RGGB format & getting the interrupt of CSI but not the raw image is captured using the below command
gst-launch-1.0 -vvv v4l2src device=/dev/video0 num-buffers=1 \! "video/x-bayer,width=1476,height=834,framerate=(fraction)25/1,format=(string)rggb" \! bayer2rgb ! pngenc ! filesink location=test.png
Below changes for RGGB
in the function changed as per your suggestions
csi_dmareq_rff_enable()
//cr2 |= 0xC0000000;
cr2 |= 0xC0080000;
[ 68.921246] Zumi CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
[ 69.673795] Zumi CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
[ 69.680190] Zumi CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
[ 70.432761] Zumi CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
[ 70.439151] Zumi CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
root@imx8mmevk:~# cat /proc/interrupts | grep csi
56: 81 0 0 0 GICv3 48 Level csi
57: 9266 0 0 0 GICv3 49 Level 32e30000.mipi_csi
root@imx8mmevk:~# cat /proc/interrupts | grep csi
56: 84 0 0 0 GICv3 48 Level csi
57: 9391 0 0 0 GICv3 49 Level 32e30000.mipi_csi
root@imx8mmevk:~# cat /proc/interrupts | grep csi
56: 87 0 0 0 GICv3 48 Level csi
57: 9806 0 0 0 GICv3 49 Level 32e30000.mipi_csi
root@imx8mmevk:~#
Thanks for replying back.
Please check the below registers want to change
#define CSI_CSICR2 0x4
After adding the patch using the gstreamer command to stream the camera below logs are attached.
The below issue of running RAW10
SBGGR8 => It calls the stream function
SRGGB10 => It doesn't calls the stream function
My driver was called imx298_enum_mbus_code but not the imx298_enum_frame_size
sent message to you, pls check
Joan,
Can you reply this below and support the issue
Using v4l2-ctl command to stream the camera below the logs
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=1476,height=834,pixelformat=RG10 --stream-mmap --stream-count=1 --stream-to=output.raw
CAPTURE warn mx6s_csi_irq_handler Rx fifo overflow
mx6s_csi_irq_handler 1176 cr19 = 0xff
sorry, I take annual leave this week, since I couldn't reproduce this issue and other customer can set raw10 on im8mm without any fifo overflow issue, I only can give you some suggestions
1) you should already notice this link, you can try to change the register as the the internal team said
https://community.nxp.com/t5/i-MX-Processors/RX-fifo-overflow-on-MIPI-CSI2-i-MX8MQ/m-p/1087696
2) try to change the data lane to 2
1. Lane Changed :
We are tried changes from lane 4 to 2 but still the issue RX FIFO overflow came.
2. Go through the RX FIFO link and sees the patches but it seems the imx8mq. Can you please sent the imx8mm patch files regarding the RX fifo overflow issue?
imx8mm and imx8mq uses the same csi ip, you can find they use the same csi driver, try to change the registers as link mentions, no finding other patches for this issue
Hi,
1. Are you telling the below patch to be apply in the IMX8MM board?
2. If this is the patch, IMX8MM driver is not using the below file
drivers/media/platform/imx8/mxc-mipi-csi2_yav.c
3. Can you please confirm the below changes for the RGGB
Filename: drivers/media/platform/mxc/capture/mx6s_capture.c
API: csi_dmareq_rff_enable
Code changes:
/* Burst Type of DMA Transfer from RxFIFO. INCR16 */
+ //cr2 |= 0xC0000000;
+ cr2 |= 0xC0080000;
Please confirm the above points which patch will resolve the CSI RXFIFO overflow error?
1)I'm not saying this patch, I mean you can change the csi phy register when you get the wrong value from CSICR19, if you get overflow error, try the stpes: 1)Disable the CSI, 2)Clear the RX FIFO,3) Reflash the DMA controller, 4) then enable CSI
2)try to change the cr2 register under function "mx6s_configure_csi", for example
csi_dev->fmt->pixelformat == BIT_MIPI_DATA_FORMAT_RAW10) {
cr2 |= (0x2 << 19);
csi_write(csi_dev, cr2, CSI_CSICR2);}
this is just an example, pls change it according to your camera
Joan,
Connecting the IMX298 camera module to the IMX8MM evk board we have an issue in the below lines.
1. CSI RX FIFO overflow occured
2. How to check my IMX8MM configured as MIPI-CSI2 interface? Observed the drver difference between the IMX8QXP and IMX8MM.
Next step:
We are connected the IMX298 module to the IMX8QXP board.
Added the RAW10 patches on my own in the kernel BSP 5.4.24.
Able to capture the stream and got the ISI interrupt and raw image file also captured.
Attached the raw file there is data available but only the lines are displayed.
Using the below command
v4l2-ctl --device=/dev/video0 --set-fmt-video=width=1476,height=834,pixelformat=RG10 --stream-mmap --stream-count=1 --stream-to=output.raw
Please give us the support to stream the camera in at-least in the IMX8QXP platform?
@joanxie
already replied to you in your another thread
https://community.nxp.com/t5/i-MX-Processors/RAW10-image-capture-in-IMX8QXP-B0-board/td-p/1998494
Joan,
We tried calling the below steps in the irq_handler functions but still the same RX FIFO overflow occurs?
1)Disable the CSI, 2)Clear the RX FIFO,3) Reflash the DMA controller, 4) then enable CSI
Could you please tell me about the imx298 tested with NXP platforms? If they are tested can you please tell the name of the platforms?
Joan,
As per you told the m4 code running in the IMX8MM EVK board but the code is hanging in the below function while streaming the camera.
Below API:
result = rpmsg_queue_recv_nocopy(csim_rpmsg, csim_queue, (unsigned long *)&remote_addr, (char **)&rx_buf, &len,
timeout);
As well we tested the example codes of Multocore example code ping pong between the M4 and A7 is working successfully.
you can refer to the link as below