<?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>topic Re: How to allocate IPU output buffer? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156762#M2432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Tarek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I don't know which version of kernel you are using. In user space we are using ioctl for IPU_ALLOC to get the DMA buffers.&amp;nbsp; e.g. ioctl(fd_ipu, IPU_ALLOC, &amp;amp;val), val is the size of allocated buffer as an input, and the physical address of the buffer as the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Ray&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 02:24:26 GMT</pubDate>
    <dc:creator>imxcommunitysco</dc:creator>
    <dc:date>2012-11-01T02:24:26Z</dc:date>
    <item>
      <title>How to allocate IPU output buffer?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156761#M2431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;mxc_ipu_lib_task_init() is suppose to allocate IPU output memory because the pointer passed in is null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (gdb) print pIpuInfo-&amp;gt;ipu_handle &lt;/P&gt;&lt;P&gt; $6 = {inbuf_start = {0x0, 0x0, 0x0}, ovbuf_start = {0x0, 0x0}, ovbuf_alpha_start = {0x0, 0x0}, &lt;STRONG&gt;outbuf_start = {0x0, 0x0, 0x0}&lt;/STRONG&gt;, ifr_size = 0, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ovfr_size = 0, ovfr_alpha_size = 0, ofr_size = 0, priv = 0x0}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; After calling the init function the pointer is still pointing to 0x0 which is resulting in segmentation fault after decoding the first frame and attempting to memcpy from decoder buffer to IPU buffer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;FB_RENDER_MEMCPY(pIpuInfo-&amp;gt;YUV[0],pY,ySize);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Do I need to make the following call myself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;mxc_ipu_lib_task_control(IPU_CTL_ALLOC_MEM, (void *)(&amp;amp;mem), NULL);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For reference I have printed the reset of the parameters passed to mxc_ipu_lib_task_init():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (gdb) print pIpuInfo-&amp;gt;sInParam&lt;/P&gt;&lt;P&gt; $8 = {width = 320, height = 256, fmt = 808596553, motion_sel = MED_MOTION, input_crop_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256},&amp;nbsp;&amp;nbsp; user_def_paddr = {0, 0, 0}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (gdb) print pIpuInfo-&amp;gt;sOutParam&lt;/P&gt;&lt;P&gt; $9 = {width = 240, height = 320, fmt = 1346520914, rot = 0, user_def_paddr = {0, 0, 0}, show_to_fb = 1, fb_disp = {pos = {x = 0, y = 0}, fb_num = 1},&amp;nbsp;&amp;nbsp; output_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256}}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt; (gdb) print mode&lt;/P&gt;&lt;P&gt; $10 = 16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2012 14:20:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156761#M2431</guid>
      <dc:creator>Tarek</dc:creator>
      <dc:date>2012-10-29T14:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate IPU output buffer?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156762#M2432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Tarek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I don't know which version of kernel you are using. In user space we are using ioctl for IPU_ALLOC to get the DMA buffers.&amp;nbsp; e.g. ioctl(fd_ipu, IPU_ALLOC, &amp;amp;val), val is the size of allocated buffer as an input, and the physical address of the buffer as the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Ray&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 02:24:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156762#M2432</guid>
      <dc:creator>imxcommunitysco</dc:creator>
      <dc:date>2012-11-01T02:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate IPU output buffer?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156763#M2433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ray,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using 3.0.35 Freescale kernel. Looks like the ioctl(fd_ipu,IPU_ALLOC,&amp;amp;val) is the correct way of allocating the memory.&lt;/P&gt;&lt;P&gt;One more question: How do I enable debugging message from the IPU driver?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tarek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 08:34:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156763#M2433</guid>
      <dc:creator>Tarek</dc:creator>
      <dc:date>2012-11-01T08:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate IPU output buffer?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156764#M2434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;same as others, we are using dev_dbg as the debug info print function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;you need to enable DEBUG to open the debug option, then set the debuglevel in your bootloader should be okay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Ray&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 01:57:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156764#M2434</guid>
      <dc:creator>imxcommunitysco</dc:creator>
      <dc:date>2012-11-08T01:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to allocate IPU output buffer?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156765#M2435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Ray,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently working on the IMX6. And I also need allocation of buffer but in kernel space.&lt;/P&gt;&lt;P&gt;How should I do ? Is that the same command ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks is advance for your help,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yann.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 08:41:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-allocate-IPU-output-buffer/m-p/156765#M2435</guid>
      <dc:creator>yanntinaugus</dc:creator>
      <dc:date>2014-05-13T08:41:45Z</dc:date>
    </item>
  </channel>
</rss>

