<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: imx8mq csi raw10 rx problem</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249544#M171193</link>
    <description>&lt;P&gt;thank you. that helped. 2bpp is indeed needed and shows a "correct" frame, with two-8bit-mode.&lt;/P&gt;&lt;P&gt;note that we had to fix the hardcoded 640x960 that's set in mx6s_capture to instead reflect the actual mode.&lt;/P&gt;&lt;P&gt;one problem persists though: the color range is not correct. white is grey and black is not fully black. see the attached raw file of 640x480 with a color bars test pattern.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 09:36:16 GMT</pubDate>
    <dc:creator>martinkepplinge</dc:creator>
    <dc:date>2021-03-22T09:36:16Z</dc:date>
    <item>
      <title>imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1239329#M170284</link>
      <description>&lt;P&gt;I try to capture mipi raw10 data from a sensor (so probably 5 bytes are 4 pixels) in bayer. the mxc-mipi-csi2_yav driver should be no problem afaik.&lt;BR /&gt;I apply the following to the mx6s_capture.c csi driver:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;--- a/drivers/media/platform/mxc/capture/mx6s_capture.c&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+++ b/drivers/media/platform/mxc/capture/mx6s_capture.c&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -266,6 +266,12 @@ static struct mx6s_fmt formats[] = {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .pixelformat = V4L2_PIX_FMT_SBGGR8,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .bpp = 1,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; }, {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .name = "RAWRGB10 (SBGGR10)",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .fourcc = V4L2_PIX_FMT_SBGGR10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .pixelformat = V4L2_PIX_FMT_SBGGR10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .bpp = 2,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -601,6 +607,10 @@ static void csi_set_imagpara(struct mx6s_csi_dev *csi,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int imag_para = 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned long cr3 = __raw_readl(csi-&amp;gt;regbase + CSI_CSICR3);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp; int rx_count;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; rx_count = (width * height) &amp;gt;&amp;gt; 2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; __raw_writel(rx_count, csi-&amp;gt;regbase + CSI_CSIRXCNT);&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; imag_para = (width &amp;lt;&amp;lt; 16) | height;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; __raw_writel(imag_para, csi-&amp;gt;regbase + CSI_CSIIMAG_PARA);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -838,6 +848,7 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (csi_dev-&amp;gt;fmt-&amp;gt;pixelformat) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case V4L2_PIX_FMT_YUV32:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case V4L2_PIX_FMT_SBGGR8:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp; case V4L2_PIX_FMT_SBGGR10:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; width = pix-&amp;gt;width;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case V4L2_PIX_FMT_UYVY:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -857,7 +868,6 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (csi_dev-&amp;gt;csi_mipi_mode == true) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cr1 = csi_read(csi_dev, CSI_CSICR1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cr1 &amp;amp;= ~BIT_GCLK_MODE;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-&amp;nbsp;&amp;nbsp; csi_write(csi_dev, cr1, CSI_CSICR1);&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cr18 = csi_read(csi_dev, CSI_CSICR18);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cr18 &amp;amp;= ~BIT_MIPI_DATA_FORMAT_MASK;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -871,12 +881,17 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case V4L2_PIX_FMT_SBGGR8:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; case V4L2_PIX_FMT_SBGGR10:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp; cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp; cr1 |= BIT_PIXEL_BIT;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp; break;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; default:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pr_debug(" fmt not supported\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -EINVAL;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; csi_write(csi_dev, cr18, CSI_CSICR18);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; csi_write(csi_dev, cr1, CSI_CSICR1);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;@@ -2002,7 +2017,7 @@ static const struct mx6s_csi_soc mx6sl_soc = {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static const struct mx6s_csi_soc mx8mq_soc = {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .rx_fifo_rst = true,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;- &amp;nbsp;&amp;nbsp; .baseaddr_switch = 0x80030,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ &amp;nbsp;&amp;nbsp; .baseaddr_switch = 0x80000,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;you can see I switched baseaddr switch from "vsync" to "atomically by DMA completed" because I don't get EOF (or the appropriate) interrupts for vsync.&lt;/P&gt;&lt;P&gt;the dts description for csi1 I:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mipi_csi_1: mipi_csi1@30a70000 { &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;compatible = "fsl,mxc-mipi-csi2_yav"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;reg = &amp;lt;0x30a70000 0x1000&amp;gt;; /* MIPI CSI1 Controller base addr */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;interrupts = &amp;lt;GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;clocks = &amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_CORE&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_ESC&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_PHY_REF&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CLKO2&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;clock-names = "clk_core", "clk_esc", "clk_pxl", "clk_clko2";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;assigned-clocks = &amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_CORE&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_PHY_REF&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_ESC&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;assigned-clock-rates = &amp;lt;266000000&amp;gt;, &amp;lt;150000000&amp;gt;, &amp;lt;66000000&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MQ_SYS1_PLL_266M&amp;gt;,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_SYS2_PLL_1000M&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_SYS1_PLL_800M&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;power-domains = &amp;lt;&amp;amp;pgc_mipi_csi1&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;csis-phy-reset = &amp;lt;&amp;amp;src 0x4c 7&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;phy-gpr = &amp;lt;&amp;amp;iomuxc_gpr 0x88&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;status = "okay"; &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;port {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;#size-cells = &amp;lt;0&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;mipi1_sensor_ep: endpoint@1 {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;reg = &amp;lt;1&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;remote-endpoint = &amp;lt;&amp;amp;camera1_ep&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;data-lanes = &amp;lt;1 2&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;csi1_mipi_ep: endpoint@2 {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;reg = &amp;lt;2&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;remote-endpoint = &amp;lt;&amp;amp;csi1_ep&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}; &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;csi1_bridge: csi1_bridge@30a90000 { &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;compatible = "fsl,imx8mq-csi", "fsl,imx6s-csi"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;reg = &amp;lt;0x30a90000 0x10000&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;interrupts = &amp;lt;GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;clocks = &amp;lt;&amp;amp;clk IMX8MQ_CLK_DUMMY&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_CSI1_ROOT&amp;gt;, &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;&amp;amp;clk IMX8MQ_CLK_DUMMY&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;clock-names = "disp-axi", "csi_mclk", "disp_dcic";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;power-domains = &amp;lt;&amp;amp;pgc_mipi_csi1&amp;gt;; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;interconnects = &amp;lt;&amp;amp;noc IMX8MQ_ICM_CSI1 &amp;amp;noc IMX8MQ_ICS_DRAM&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;fsl,mipi-mode;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;status = "okay";&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;port{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;csi1_ep: endpoint {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;remote-endpoint = &amp;lt;&amp;amp;csi1_mipi_ep&amp;gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;};&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the sensor driver uses MEDIA_BUS_FMT_SBGGR10_1X10. now CSI says raw10 to be (converted?) and padded to 16bits per pixel, so I used 2bpp in mx6s_capture.c.&lt;/P&gt;&lt;P&gt;When capturing one frame of 640x480 now, the size is indeed 2x640x480 bytes but it's actually 2 frames concatinated, with each one having obviously 1byte per pixel. (Therefore of course the data is not correct too because the sensor sends raw10):&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;v4l2-ctl -d 0 --set-fmt-video=width=640,height=480,pixelformat=BG10&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;v4l2-ctl -d 0 --stream-mmap --stream-to=640.raw --stream-count=1&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I attach `hexdump -v 640.raw &amp;gt; 640.raw.txt` and the png of it.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What can I do for RAW10 to be correctly processed by mipi and the csi bridge? Is anything missing here? thank you very much in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 06:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1239329#M170284</guid>
      <dc:creator>martinkepplinge</dc:creator>
      <dc:date>2021-03-04T06:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1239390#M170289</link>
      <description>&lt;P&gt;to follow up, here's what I receive in 1280x720 mode: the second frame isn't complete:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 13:21:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1239390#M170289</guid>
      <dc:creator>martinkepplinge</dc:creator>
      <dc:date>2021-03-03T13:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1247858#M171023</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .name = "RAWRGB10 (SBGGR10)",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .fourcc = V4L2_PIX_FMT_SBGGR10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .pixelformat = V4L2_PIX_FMT_SBGGR10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp;&amp;nbsp; .bpp = 2,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;how about setting bpp=1? and don't forget enable two-8bit-sensor-mode in the dts file&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 06:49:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1247858#M171023</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2021-03-18T06:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249544#M171193</link>
      <description>&lt;P&gt;thank you. that helped. 2bpp is indeed needed and shows a "correct" frame, with two-8bit-mode.&lt;/P&gt;&lt;P&gt;note that we had to fix the hardcoded 640x960 that's set in mx6s_capture to instead reflect the actual mode.&lt;/P&gt;&lt;P&gt;one problem persists though: the color range is not correct. white is grey and black is not fully black. see the attached raw file of 640x480 with a color bars test pattern.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 09:36:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249544#M171193</guid>
      <dc:creator>martinkepplinge</dc:creator>
      <dc:date>2021-03-22T09:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249565#M171197</link>
      <description>&lt;P&gt;why did you set &lt;FONT face="courier new,courier"&gt;baseaddr_switch&lt;/FONT&gt; to 0? which mean set BASEADDR_SWITCH_EN = 0, not care BASEADDR_SWITCH_SEL. The frame buffer only used one and the data is refresh by the embedded DMA. This is not used in the driver; but we have tested that the best way to set 0x80030, how about set to the default value 0x80030?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 09:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249565#M171197</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2021-03-22T09:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249567#M171198</link>
      <description>&lt;P&gt;absolutely. that's really only been for testing purposes. for correct modes, the default setting is even needed in order to all frames to be correctly in-sync. That's unrelated to a reduced color-space we currently see though.&lt;/P&gt;&lt;P&gt;Thanks a lot for having a look here.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 09:59:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1249567#M171198</guid>
      <dc:creator>martinkepplinge</dc:creator>
      <dc:date>2021-03-22T09:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1253410#M171668</link>
      <description>&lt;P&gt;let me update, your first question is about you set 640x480, but you get 2x640x480, then you fix this issue when you set bpp=1, right? now the new issue is that you couldn't get the completed second frame and correct color when you set 1280x720 frame size? right?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 07:34:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1253410#M171668</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2021-03-29T07:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: imx8mq csi raw10 rx problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1253419#M171671</link>
      <description>&lt;P&gt;oh thanks for asking! no, 2bpp is definitely correct for a 10-bit bayer format. it obviously doesn't fit into 1bpp and when looking at the data, it looks like correctly padded to 16bit. your previous answer helped. I didn't know that two-8bit is correct in that case (although it *is* mentioned correctly in the RM now that I know it &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;the size-issue could be resolved: previously&amp;nbsp; I called the problem "not completed second frame". with 2bpp it's "not completed frame": "imag_para = (640 &amp;lt;&amp;lt; 16) | 960;" was hard-coded and changing that to the actual size (allowing more data) fixes the problem.&lt;/P&gt;&lt;P&gt;for the color-issue I'm actually not even sure anymore: "v4l2-ctl --stream-to-host" and viewing with "qvidcap -p" on the host gives correct colors. Does that "debayer only" (and no other post-processing of the color space)? I'm not even sure yet.&lt;/P&gt;&lt;P&gt;to sum up: This ticket can actually be marked as resolved. I face minor other issues I could open new tickets for.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 07:53:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/imx8mq-csi-raw10-rx-problem/m-p/1253419#M171671</guid>
      <dc:creator>martinkepplinge</dc:creator>
      <dc:date>2021-03-29T07:53:49Z</dc:date>
    </item>
  </channel>
</rss>

