Hi,
I transplanted a camera with MIPI CSI interface on the IMX8 platform Android9.0, and the image output format of the camera is UYVY(YUV422) ,1920*1080p.
After debugging, I found that when I opened the camera preview, there was an image just opened, but the picture would get stuck immediately. The following error log message is prompted:
**************************************************************************
06-10 14:00:18.028 3111 3226 I FslCameraHAL: configureStreams:0: stream_config 0xf45ff500, num 2, streams 0xf4485008, mode 0
06-10 14:00:18.028 3111 3226 I FslCameraHAL: config 0, type 0, res 1920x1080, fmt 0x21, usage 0x3, maxbufs 1, priv 0xf44c3000, rotation 0
06-10 14:00:18.028 3111 3226 I FslCameraHAL: config 1, type 0, res 1920x1080, fmt 0x102, usage 0x100, maxbufs 2, priv 0xf44c30e0, rotation 0
06-10 14:00:18.029 4336 4407 D CAM_CommandExecutor: Executing command: com.android.camera.one.v2.commands.PreviewCommand@c383ecf END
06-10 14:00:18.030 3150 4400 D Camera3-Device: Set real time priority for request queue thread (tid 4400)
06-10 14:00:18.033 3116 3116 E gralloc : convertAndroidFormat invalid format:0x102
06-10 14:00:18.033 3116 3116 E display : checkFormat unsupported format:0x0
06-10 14:00:18.062 3150 4400 I display : open gpu gralloc module!
06-10 14:00:18.073 3111 3226 I display : open gpu gralloc module!
06-10 14:00:18.074 3111 3226 I FslCameraHAL: configure: w:1920, h:1080, sensor format:0x102, stream format:0x102, fps:30, num:3
06-10 14:00:18.074 3111 3200 I FslCameraHAL: onDeviceConfigureLocked
06-10 14:00:18.074 3111 3200 I FslCameraHAL: Width * Height 1920 x 1080 format UYVY, fps: 30
06-10 14:00:18.075 3116 3116 E gralloc : convertAndroidFormat invalid format:0x102
06-10 14:00:18.075 3116 3116 E display : checkFormat unsupported format:0x0
06-10 14:00:18.138 3111 3226 I FslCameraHAL: configure: w:1920, h:1080, sensor format:0x102, stream format:0x102, fps:30, num:3
06-10 14:00:18.138 3111 3200 I FslCameraHAL: onDeviceStartLocked
06-10 14:00:18.162 3140 3207 W SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen com.android.camera2#0
06-10 14:00:18.162 3140 3207 W SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen com.android.camera2#0
06-10 14:00:18.170 3111 3200 I FslCameraHAL: onDeviceStartLocked VIDIOC_QBUF phy:0x8f800000
06-10 14:00:18.170 3111 3200 I FslCameraHAL: onDeviceStartLocked VIDIOC_QBUF phy:0x8fc00000
06-10 14:00:18.170 3111 3200 I FslCameraHAL: onDeviceStartLocked VIDIOC_QBUF phy:0x90000000
06-10 14:00:18.197 4336 4336 V CAM_CaptureModule: AF status is state:INACTIVE
06-10 14:00:18.307 3111 3200 E : g2d_blitEx: Invalid dst planes[0] pointer=0x0 !
**************************************************************************
When the screen is stuck,The following log information appears:
**************************************************************************
06-10 14:00:41.063 3150 4400 E Camera3-Stream: getBuffer: wait for output buffer return timed out after 3000ms (max_buffers 2)
06-10 14:00:41.063 3150 4400 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Connection timed out (-110)
06-10 14:00:44.064 3150 4400 E Camera3-Stream: getBuffer: wait for output buffer return timed out after 3000ms (max_buffers 2)
06-10 14:00:44.064 3150 4400 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Connection timed out (-110)
**************************************************************************
Here's my question
1. Is there a patch to support UYVY(YUV422) cameras on Android9.0 ?
2.How to calculate and set the clock of MIPI CSI for 1920*1080P camera ? The current default output Mipi Csi clock signal is 333M
Thanks!
Hi Andrew
1. supported sensors used in i.MX8M Mini EVK, formats can be found in driver
2. one can look at below link
Best regards
igor
HI,igorpadykov
Thanks for your replay,I still have some questions:
1. Are there any reference examples support YUV422 (UYVY) sensors formats in android platform HAL ? as follow path: Android9.0/vendor/nxp-opensource/imx/libcamera3
2. Question 2 introduces the clock calculation method of MIPI DSI,I know this. but I want to know how to configure the clock of MIPI CSI ?
In the DTS file, I see that the clock of MIPI CIS default is set to 333M, Whether this value can be modified directly ? The camera output is 1080P. What clock do I need to set ?
" clock-frequency = <333000000>; "
***********************************************************
mipi_csi_1: mipi_csi@32e30000 {
compatible = "fsl,imx8mm-mipi-csi";
reg = <0x0 0x32e30000 0x0 0x1000>;
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <333000000>;
clocks = <&clk IMX8MM_CLK_CSI1_CORE_DIV>,
<&clk IMX8MM_CLK_CSI1_PHY_REF_DIV>,
<&clk IMX8MM_CLK_DISP_AXI_ROOT>,
<&clk IMX8MM_CLK_DISP_APB_ROOT>;
clock-names = "mipi_clk", "phy_clk", "disp_axi", "disp_apb";
bus-width = <4>;
csi-gpr = <&dispmix_gpr>;
power-domains = <&mipi_pd>;
status = "disabled";
};
***********************************************************
Thanks !