Camera sensor hi846 MIPI CSI for IMX8MM: Image issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Camera sensor hi846 MIPI CSI for IMX8MM: Image issue

1,315件の閲覧回数
shixuanlin-ddcx
Contributor II

Dear all

I used imx8mm board, and hi846 camera sensor. The os is yocto, my kernel branch version is lf-5.15.y and hi846 driver copy from lf-6.1.y. I also add some patches like this link #https://community.nxp.com/t5/i-MX-Graphics/gst-launch-1-0-returns-Internal-data-stream-error/m-p/157.... But unfortunately, I still can’t get right output by v4lt-ctl or gst-launch-1.0 commands

 v4l2-ctl -d /dev/video0 --verbose --set-fmt-video=width=1632,height=1224,pixelformat=GB10 --stream-mmap --stream-count=1 --stream-to=raw10.raw
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1632/1224
Pixel Format : 'GB10' (10-bit Bayer GBGB/RGRG)
Field : None
Bytes per Line : 3264
Size Image : 3995136
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: ITU-R 601
Quantization : Full Range
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
gst-launch-1.0 -vvv v4l2src device=/dev/video0 num-buffers=1 \! "video/x-bayer,width=1632,height=1224,framerate=(fraction)30/1,format=(string)gbrg" \! bayer2rgb ! pngenc ! filesink location=test.png 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, format=(string)gbrg, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, format=(string)gbrg, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:src: caps = video/x-raw, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, format=(string)RGBA, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstPngEnc:pngenc0.GstPad:sink: caps = video/x-raw, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)sRGB, format=(string)RGBA, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:sink: caps = video/x-bayer, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, format=(string)gbrg, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)1632, height=(int)1224, framerate=(fraction)30/1, format=(string)gbrg, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)sRGB

These two commands are always running, test.png and raw actually have no content.v4l2-ctl --list-formats-ext:

v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'GB10' (10-bit Bayer GBGB/RGRG)
Size: Discrete 640x480
Size: Discrete 1280x720
Size: Discrete 1632x1224

My dts code:

&i2c4 {
hi846: hi846@20 {
status = "okay";

compatible = "hynix,hi846";
reg = <0x20>;
clocks = <&clk IMX8MM_CLK_CLKO2>;
assigned-clocks = <&clk IMX8MM_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
assigned-clock-rates = <24000000>;
pinctrl-name
pinctrl-0 = <&cif_clk>;
reset-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
shutdown-gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
port {
         hi846_out: endpoint {
             remote-endpoint = <&mipi1_sensor_ep>;
             data-lanes = <1 2>;
             link-frequencies = /bits/ 64
                <80000000 200000000>;
};
};
};
};
&mipi1_sensor_ep {
remote-endpoint = <&hi846_out>;
data-lanes = <1 2>;
csis-hs-settle = <13>;
csis-clk-settle = <0>;
csis-wclk;
};

How should I check? I sincerely hope to get your help. Thanks!

ラベル(2)
タグ(1)
0 件の賞賛
返信
1 返信

1,261件の閲覧回数
pengyong_zhang
NXP Employee
NXP Employee

HI @shixuanlin-ddcx 

Sorry for reply late. Firstly, In our default BSP code, our i2c4 for i.mx8mm was disabled, did you enable it? 

And about the dts file configuration, please refer the ov5640 on the imx8mm-evk-dtsi file

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi

B.R

 

0 件の賞賛
返信