<?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 GraphicsのトピックRe: G2D Problems</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2013312#M685</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Have you tested this reference code in conjunction with your own image files?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 05:26:30 GMT</pubDate>
    <dc:creator>Zhiming_Liu</dc:creator>
    <dc:date>2024-12-13T05:26:30Z</dc:date>
    <item>
      <title>G2D Problems</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010599#M678</link>
      <description>&lt;P&gt;Hi, There was a problem with the g2d module, My board is IMX8QM,&amp;nbsp;Linux version 5.4.129-5.4.0-devel+git.cb88cc157bfb (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP PREEMPT Wed Sep 29 18:17:21 UTC 2021.&lt;/P&gt;&lt;P&gt;My code as follow, All api return is success, but&amp;nbsp;output_buffer-&amp;gt;buf_vaddr&amp;nbsp;value is 0. Could you help me to solve this problem? Thank you~&lt;/P&gt;&lt;P&gt;g2d_buf* input_buffer = nullptr;&lt;BR /&gt;g2d_buf* output_buffer = nullptr;&lt;BR /&gt;void* g2d_handle = nullptr;&lt;BR /&gt;g2d_surface* src_surface = new g2d_surface;&lt;BR /&gt;g2d_surface* dst_surface = new g2d_surface;&lt;BR /&gt;g2d_open(&amp;amp;g2d_handle);&lt;BR /&gt;input_buffer = g2d_alloc(1280*800*4, 1);&lt;BR /&gt;output_buffer = g2d_alloc(1280*800*4, 1);&lt;BR /&gt;FILE* fp = fopen("/home/root/user_test/P118_1280x800-32_0001_FB152.rgb", "rb");&lt;BR /&gt;if(fp != nullptr){&lt;BR /&gt;fread(input_buffer-&amp;gt;buf_vaddr, 1, input_buffer-&amp;gt;buf_size, fp);&lt;BR /&gt;fclose(fp);&lt;BR /&gt;}else{}&lt;/P&gt;&lt;P&gt;memset(src_surface, 0, sizeof(g2d_surface));&lt;BR /&gt;memset(dst_surface, 0, sizeof(g2d_surface));&lt;/P&gt;&lt;P&gt;src_surface-&amp;gt;planes[0] = input_buffer-&amp;gt;buf_paddr;&lt;BR /&gt;src_surface-&amp;gt;left = 0;&lt;BR /&gt;src_surface-&amp;gt;top = 0;&lt;BR /&gt;src_surface-&amp;gt;right = 1280;&lt;BR /&gt;src_surface-&amp;gt;bottom = 800;&lt;BR /&gt;src_surface-&amp;gt;stride = 1280;&lt;BR /&gt;src_surface-&amp;gt;width = 1280;&lt;BR /&gt;src_surface-&amp;gt;height = 800;&lt;BR /&gt;src_surface-&amp;gt;rot = G2D_ROTATION_0;&lt;BR /&gt;src_surface-&amp;gt;format = G2D_RGBX8888;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;dst_surface-&amp;gt;planes[0] = input_buffer-&amp;gt;buf_paddr;&lt;BR /&gt;dst_surface-&amp;gt;left = 0;&lt;BR /&gt;dst_surface-&amp;gt;top = 0;&lt;BR /&gt;dst_surface-&amp;gt;right = 1280;&lt;BR /&gt;dst_surface-&amp;gt;bottom = 800;&lt;BR /&gt;dst_surface-&amp;gt;stride = 1280;&lt;BR /&gt;dst_surface-&amp;gt;width = 1280;&lt;BR /&gt;dst_surface-&amp;gt;height = 800;&lt;BR /&gt;dst_surface-&amp;gt;rot = G2D_ROTATION_0;&lt;BR /&gt;dst_surface-&amp;gt;format = G2D_RGBX8888;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; input_buffer &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; input_buffer-&amp;gt;buf_size &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; input_buffer-&amp;gt;buf_vaddr &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;std::cout &amp;lt;&amp;lt; g2d_blit(g2d_handle, src_surface, dst_surface) &amp;lt;&amp;lt; std::endl;&lt;BR /&gt;std::cout &amp;lt;&amp;lt; g2d_finish(g2d_handle) &amp;lt;&amp;lt; std::endl;&lt;/P&gt;&lt;P&gt;fp = fopen("/home/root/user_test/P118_1280x800-32_0001_FB152-test111.rgb", "wb");&lt;BR /&gt;if(fp != nullptr){&lt;BR /&gt;std::cout &amp;lt;&amp;lt; fwrite(output_buffer-&amp;gt;buf_vaddr, 1, 1280*800*4, fp) &amp;lt;&amp;lt; std::endl ;&lt;BR /&gt;fclose(fp);&lt;BR /&gt;}else{}&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 02:11:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010599#M678</guid>
      <dc:creator>ZHIYUANSONG</dc:creator>
      <dc:date>2024-12-10T02:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: G2D Problems</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010689#M679</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Please refer&amp;nbsp;&lt;A href="https://github.com/nxp-imx/g2d-samples/blob/imx_2.1/multiblit_test/g2d_multiblit.c" target="_blank"&gt;https://github.com/nxp-imx/g2d-samples/blob/imx_2.1/multiblit_test/g2d_multiblit.c&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Need to modify&amp;nbsp;&lt;SPAN&gt;dst_surface-&amp;gt;planes[0]&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; dst_surface-&amp;gt;planes[0] = output_buffer-&amp;gt;buf_paddr;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 05:06:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010689#M679</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-12-10T05:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: G2D Problems</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010701#M680</link>
      <description>sorry,It was my negligence. When I corrected the error, the result was the same. output_buffer-&amp;gt;buf_vaddr all is 0.</description>
      <pubDate>Tue, 10 Dec 2024 05:24:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010701#M680</guid>
      <dc:creator>ZHIYUANSONG</dc:creator>
      <dc:date>2024-12-10T05:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: G2D Problems</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010703#M681</link>
      <description>When I compile g2d_multiblit.c into an executable file，running result as follow:&lt;BR /&gt;Width 1920, Height 1088, Format RGBA, Bpp 32&lt;BR /&gt;&lt;BR /&gt;----- g2d blit -----&lt;BR /&gt;g2d blit fail!!!&lt;BR /&gt;g2d blit time 21522us, 46fps, 97Mpixel/s ........&lt;BR /&gt;&lt;BR /&gt;--- g2d blit with multiblit ---&lt;BR /&gt;g2d_feature 'G2D_MULTI_SOURCE_BLT' Not Supported for this hardware!&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Dec 2024 05:28:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2010703#M681</guid>
      <dc:creator>ZHIYUANSONG</dc:creator>
      <dc:date>2024-12-10T05:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: G2D Problems</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2013312#M685</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Have you tested this reference code in conjunction with your own image files?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 05:26:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/G2D-Problems/m-p/2013312#M685</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2024-12-13T05:26:30Z</dc:date>
    </item>
  </channel>
</rss>

