<?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のトピックYUYV 16bits LCD configuration and data organisation</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1331881#M179338</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We will use the LCD output of the iMX6 for one of our project, but I think something is missing for my LCD configuration.&lt;/P&gt;&lt;P&gt;We plan to use the LCD output, in YUYV format (packed, 16bits), with HSYNC, VSYNC, DE, CLK. The LCD data will be read by a FPGA (not a real screen), and we have flexibility on the parameters. DISP0_DAT0-15 are used (0-7 for Y, 8-15 for UV)&lt;/P&gt;&lt;P&gt;I have added a new screen in the mxc_lcdif.c file:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;{&lt;BR /&gt;/* 640x512 @ 60 Hz , pixel clk @ 27MHz */&lt;BR /&gt;/* name, rfresh, xres, yres, pixclk in ps, left, right, top, bot, hsynclen, vsynclen */&lt;BR /&gt;"640X512P", 60, 640, 512, 37037, 30, 30, 20, 20, 50, 48,&lt;BR /&gt;/* clock per row (cpr): xres + left + right + hsync = 640 + 30 + 30 + 50 = 750 */&lt;BR /&gt;/* total lines : lines + top + bottom + vsync = 512 + 20 + 20 + 48 = 600 */&lt;BR /&gt;/* clock per frame: cpf = cpr * total lines: 450000 */&lt;BR /&gt;/* max fps: clk/cpf = 27000000/450000 = 60 Hz */&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;FB_SYNC_CLK_LAT_FALL,&lt;BR /&gt;FB_VMODE_NONINTERLACED,&lt;BR /&gt;0,}&lt;/P&gt;&lt;P&gt;I have also added the support in the DTB:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;mxcfb1: fb@0 {&lt;BR /&gt;compatible = "fsl,mxc_sdc_fb";&lt;BR /&gt;disp_dev = "lcd";&lt;BR /&gt;interface_pix_fmt = "YUYV16";&lt;BR /&gt;mode_str ="640X512P";&lt;BR /&gt;default_bpp = &amp;lt;16&amp;gt;;&lt;BR /&gt;int_clk = &amp;lt;0&amp;gt;;&lt;BR /&gt;late_init = &amp;lt;0&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;lcd@0 {&lt;BR /&gt;compatible = "fsl,lcd";&lt;BR /&gt;ipu_id = &amp;lt;0&amp;gt;;&lt;BR /&gt;disp_id = &amp;lt;0&amp;gt;;&lt;BR /&gt;default_ifmt = "YUYV16";&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ipu1&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;pinctrl_ipu1: ipu1grp {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK PAD_CTRL_DISP_STD /*&amp;nbsp;0xa1 */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 PAD_CTRL_DISP_STD /* DRDY */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 PAD_CTRL_DISP_STD /* HSYNC */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 PAD_CTRL_DISP_STD /* VSYNC */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000000&lt;BR /&gt;MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 PAD_CTRL_DISP_STD&lt;BR /&gt;...&lt;BR /&gt;MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 PAD_CTRL_DISP_STD&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;Video args from uboot are also updated:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;video=mxcfb0:dev=lcd,640X512P,if=YUYV,bpp=16 ;video=mxcfb1:off fbmem=32M&lt;/P&gt;&lt;P&gt;Using an oscilloscope, the PIXCLK, HSYNC, VSYNC are correct. The frequencies are good, and the VSYNC is 60Hz as expected.&lt;/P&gt;&lt;P&gt;I tried to set some pixel values while monitoring DAT0 and DAT8 on an oscilloscope.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;cat /dev/random &amp;gt; /dev/fb0&amp;nbsp; -&amp;gt; Random Values seen on DAT0/DAT8&lt;/LI&gt;&lt;LI&gt;cat /dev/zero &amp;gt; /dev/fb0&amp;nbsp; -&amp;gt; DAT0/DAT8 at 0V (as expected).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;fbset output:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;mode "640x512-60"&lt;BR /&gt;# &lt;LI-EMOJI id="lia_anguished-face" title=":anguished_face:"&gt;&lt;/LI-EMOJI&gt; 27.000 MHz, H: 36.000 kHz, V: 60.000 Hz&lt;BR /&gt;geometry 640 512 640 512 16&lt;BR /&gt;timings 37037 30 30 20 20 50 48&lt;BR /&gt;accel false&lt;BR /&gt;rgba 5/11,6/5,5/0,0/0&lt;BR /&gt;endmode&lt;/P&gt;&lt;P&gt;With a small piece of software (attached), I can get infos on the fb device:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;smem_len: 655360 (as expected, 640*512*2)&lt;/LI&gt;&lt;LI&gt;line_lenght: 1280 (as expected, 640*2)&lt;/LI&gt;&lt;LI&gt;xres: 640 (as expected)&lt;/LI&gt;&lt;LI&gt;yres: 512 (as expected)&lt;/LI&gt;&lt;LI&gt;bpp: 16 (as expected)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But, If I modify the buffer using mmap, I get a strange behavior:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Setting all the buffer to 0, DAT0 and DAT8 are 0V (as expected)&lt;/LI&gt;&lt;LI&gt;Setting the first data to 0x1, DAT0 and DAT8 are '1' for one pixel clock every 16.6ms (60Hz)&lt;UL&gt;&lt;LI&gt;I understand why DAT0 is at '1', but DAT8 should stay at '0'&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Setting the second data to 0x1, DAT0 and DAT8 are '1' for one pixel clock every 16.6ms (60Hz)&lt;BR /&gt;I understand why DAT8 is at '1', but DAT1 should stay at '0'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In my mind, the memory is organised in YUYV format, packed, so 1st byte is Y, 2nd byte is U, third byte is Y...&lt;/P&gt;&lt;P&gt;Did I do something wrong? it seems the memory is not organised like YUYV format.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 16:09:14 GMT</pubDate>
    <dc:creator>pierre-olivierh</dc:creator>
    <dc:date>2021-08-30T16:09:14Z</dc:date>
    <item>
      <title>YUYV 16bits LCD configuration and data organisation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1331881#M179338</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We will use the LCD output of the iMX6 for one of our project, but I think something is missing for my LCD configuration.&lt;/P&gt;&lt;P&gt;We plan to use the LCD output, in YUYV format (packed, 16bits), with HSYNC, VSYNC, DE, CLK. The LCD data will be read by a FPGA (not a real screen), and we have flexibility on the parameters. DISP0_DAT0-15 are used (0-7 for Y, 8-15 for UV)&lt;/P&gt;&lt;P&gt;I have added a new screen in the mxc_lcdif.c file:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;{&lt;BR /&gt;/* 640x512 @ 60 Hz , pixel clk @ 27MHz */&lt;BR /&gt;/* name, rfresh, xres, yres, pixclk in ps, left, right, top, bot, hsynclen, vsynclen */&lt;BR /&gt;"640X512P", 60, 640, 512, 37037, 30, 30, 20, 20, 50, 48,&lt;BR /&gt;/* clock per row (cpr): xres + left + right + hsync = 640 + 30 + 30 + 50 = 750 */&lt;BR /&gt;/* total lines : lines + top + bottom + vsync = 512 + 20 + 20 + 48 = 600 */&lt;BR /&gt;/* clock per frame: cpf = cpr * total lines: 450000 */&lt;BR /&gt;/* max fps: clk/cpf = 27000000/450000 = 60 Hz */&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;FB_SYNC_CLK_LAT_FALL,&lt;BR /&gt;FB_VMODE_NONINTERLACED,&lt;BR /&gt;0,}&lt;/P&gt;&lt;P&gt;I have also added the support in the DTB:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;mxcfb1: fb@0 {&lt;BR /&gt;compatible = "fsl,mxc_sdc_fb";&lt;BR /&gt;disp_dev = "lcd";&lt;BR /&gt;interface_pix_fmt = "YUYV16";&lt;BR /&gt;mode_str ="640X512P";&lt;BR /&gt;default_bpp = &amp;lt;16&amp;gt;;&lt;BR /&gt;int_clk = &amp;lt;0&amp;gt;;&lt;BR /&gt;late_init = &amp;lt;0&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;...&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;lcd@0 {&lt;BR /&gt;compatible = "fsl,lcd";&lt;BR /&gt;ipu_id = &amp;lt;0&amp;gt;;&lt;BR /&gt;disp_id = &amp;lt;0&amp;gt;;&lt;BR /&gt;default_ifmt = "YUYV16";&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ipu1&amp;gt;;&lt;BR /&gt;status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;pinctrl_ipu1: ipu1grp {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK PAD_CTRL_DISP_STD /*&amp;nbsp;0xa1 */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15 PAD_CTRL_DISP_STD /* DRDY */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02 PAD_CTRL_DISP_STD /* HSYNC */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03 PAD_CTRL_DISP_STD /* VSYNC */&lt;BR /&gt;MX6QDL_PAD_DI0_PIN4__IPU1_DI0_PIN04 0x80000000&lt;BR /&gt;MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00 PAD_CTRL_DISP_STD&lt;BR /&gt;...&lt;BR /&gt;MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15 PAD_CTRL_DISP_STD&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;Video args from uboot are also updated:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;video=mxcfb0:dev=lcd,640X512P,if=YUYV,bpp=16 ;video=mxcfb1:off fbmem=32M&lt;/P&gt;&lt;P&gt;Using an oscilloscope, the PIXCLK, HSYNC, VSYNC are correct. The frequencies are good, and the VSYNC is 60Hz as expected.&lt;/P&gt;&lt;P&gt;I tried to set some pixel values while monitoring DAT0 and DAT8 on an oscilloscope.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;cat /dev/random &amp;gt; /dev/fb0&amp;nbsp; -&amp;gt; Random Values seen on DAT0/DAT8&lt;/LI&gt;&lt;LI&gt;cat /dev/zero &amp;gt; /dev/fb0&amp;nbsp; -&amp;gt; DAT0/DAT8 at 0V (as expected).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;fbset output:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;mode "640x512-60"&lt;BR /&gt;# &lt;LI-EMOJI id="lia_anguished-face" title=":anguished_face:"&gt;&lt;/LI-EMOJI&gt; 27.000 MHz, H: 36.000 kHz, V: 60.000 Hz&lt;BR /&gt;geometry 640 512 640 512 16&lt;BR /&gt;timings 37037 30 30 20 20 50 48&lt;BR /&gt;accel false&lt;BR /&gt;rgba 5/11,6/5,5/0,0/0&lt;BR /&gt;endmode&lt;/P&gt;&lt;P&gt;With a small piece of software (attached), I can get infos on the fb device:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;smem_len: 655360 (as expected, 640*512*2)&lt;/LI&gt;&lt;LI&gt;line_lenght: 1280 (as expected, 640*2)&lt;/LI&gt;&lt;LI&gt;xres: 640 (as expected)&lt;/LI&gt;&lt;LI&gt;yres: 512 (as expected)&lt;/LI&gt;&lt;LI&gt;bpp: 16 (as expected)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But, If I modify the buffer using mmap, I get a strange behavior:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Setting all the buffer to 0, DAT0 and DAT8 are 0V (as expected)&lt;/LI&gt;&lt;LI&gt;Setting the first data to 0x1, DAT0 and DAT8 are '1' for one pixel clock every 16.6ms (60Hz)&lt;UL&gt;&lt;LI&gt;I understand why DAT0 is at '1', but DAT8 should stay at '0'&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Setting the second data to 0x1, DAT0 and DAT8 are '1' for one pixel clock every 16.6ms (60Hz)&lt;BR /&gt;I understand why DAT8 is at '1', but DAT1 should stay at '0'&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In my mind, the memory is organised in YUYV format, packed, so 1st byte is Y, 2nd byte is U, third byte is Y...&lt;/P&gt;&lt;P&gt;Did I do something wrong? it seems the memory is not organised like YUYV format.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 16:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1331881#M179338</guid>
      <dc:creator>pierre-olivierh</dc:creator>
      <dc:date>2021-08-30T16:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: YUYV 16bits LCD configuration and data organisation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1331999#M179348</link>
      <description>&lt;P&gt;Hi Pierre-Olivier&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for this case one can consider sect.4.12.10.4 IPU Display Interface Signal Mapping&lt;/P&gt;
&lt;P&gt;&lt;A id="relatedDocsClick_1" href="https://www.nxp.com/docs/en/data-sheet/IMX6DQCEC.pdf" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;i.MX 6Dual/6Quad Applications Processors for Consumer Products - Data Sheet&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;from software side I am afraid LCD output in YUYV format is not supported in BSPs, probably may help below:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Patch-to-Support-BT656-and-BT1120-Output-For-i-MX6-BSP/ta-p/1125685" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Patch-to-Support-BT656-and-BT1120-Output-For-i-MX6-BSP/ta-p/1125685&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt; it seems the memory is not organised like YUYV format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in general GPU output can only be RGB format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 01:17:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1331999#M179348</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-08-31T01:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: YUYV 16bits LCD configuration and data organisation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1332322#M179375</link>
      <description>&lt;P&gt;Hi igor,&lt;/P&gt;&lt;P&gt;Thank you for the fast reply.&lt;/P&gt;&lt;P&gt;I thought the BSP support the YUV format as the mxc_ipuv3_fb.c file mention "YUYV16" format (equals to&amp;nbsp;IPU_PIX_FMT_YUYV).&lt;/P&gt;&lt;P&gt;I will try to apply the patches.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Pierre-Olivier&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 07:41:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1332322#M179375</guid>
      <dc:creator>pierre-olivierh</dc:creator>
      <dc:date>2021-08-31T07:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: YUYV 16bits LCD configuration and data organisation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1334865#M179551</link>
      <description>&lt;P&gt;I finally found the issue.&lt;/P&gt;&lt;P&gt;I applied the patch for BT656 but I don't use it at the end.&lt;/P&gt;&lt;P&gt;The "fbpix" was not set in the kernel command line. It defaults to RGB565. Th IPU converted the input framebuffer values from RGB565 to YUYV16, that's why the values changed.&lt;/P&gt;&lt;P&gt;I set the "if" and "fbpix" to the same format now, and the framebuffer values match the output values on the DAT pins.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 13:24:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/YUYV-16bits-LCD-configuration-and-data-organisation/m-p/1334865#M179551</guid>
      <dc:creator>pierre-olivierh</dc:creator>
      <dc:date>2021-09-03T13:24:09Z</dc:date>
    </item>
  </channel>
</rss>

