<?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: mxcfb ram memory in i.MX Graphics</title>
    <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2055011#M754</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239796"&gt;@lyashmik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're correct that adding the &lt;STRONG&gt;reg&lt;/STRONG&gt; property to the mxcfb1 node causes issues because the &lt;STRONG&gt;reg&lt;/STRONG&gt; property is typically used to define register space for memory-mapped devices, not for framebuffer.&lt;/P&gt;
&lt;P&gt;You can try add something like:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;/ {
    reserved-memory {
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;1&amp;gt;;
        ranges;

        framebuffer_reserved: framebuffer@3f000000 {
            compatible = "shared-dma-pool";
            reg = &amp;lt;0x3f000000 0x600000&amp;gt;; 
            reusable; 
        };
    };
};

&amp;amp;mxcfb1 {
    memory-region = &amp;lt;&amp;amp;framebuffer_reserved&amp;gt;;
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, could you please clarify what MPU are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Mar 2025 21:36:36 GMT</pubDate>
    <dc:creator>Manuel_Salas</dc:creator>
    <dc:date>2025-03-03T21:36:36Z</dc:date>
    <item>
      <title>mxcfb ram memory</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2053740#M750</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I am trying to preallocate RAM memory for framebuffer and if I understand correctly this should be done through the device tree. But if I add reg property to the mxcfb1 node the image no longer works:&lt;BR /&gt;mxcfb1: fb@0 {&lt;BR /&gt;compatible = "fsl,mxc_sdc_fb";&lt;BR /&gt;disp_dev = "ldb";&lt;BR /&gt;interface_pix_fmt = "RGB666";&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;STRONG&gt;reg = &amp;lt;0x3f000000 0x600000&amp;gt;;&lt;/STRONG&gt;&lt;BR /&gt;};&lt;BR /&gt;Is this because reg property is responsible for cpu internal registers? If so, how can I then preallocate RAM memory for the framebuffer?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 10:54:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2053740#M750</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2025-02-28T10:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: mxcfb ram memory</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2055011#M754</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239796"&gt;@lyashmik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're correct that adding the &lt;STRONG&gt;reg&lt;/STRONG&gt; property to the mxcfb1 node causes issues because the &lt;STRONG&gt;reg&lt;/STRONG&gt; property is typically used to define register space for memory-mapped devices, not for framebuffer.&lt;/P&gt;
&lt;P&gt;You can try add something like:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;/ {
    reserved-memory {
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;1&amp;gt;;
        ranges;

        framebuffer_reserved: framebuffer@3f000000 {
            compatible = "shared-dma-pool";
            reg = &amp;lt;0x3f000000 0x600000&amp;gt;; 
            reusable; 
        };
    };
};

&amp;amp;mxcfb1 {
    memory-region = &amp;lt;&amp;amp;framebuffer_reserved&amp;gt;;
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, could you please clarify what MPU are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Salas.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Mar 2025 21:36:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2055011#M754</guid>
      <dc:creator>Manuel_Salas</dc:creator>
      <dc:date>2025-03-03T21:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: mxcfb ram memory</title>
      <link>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2055434#M755</link>
      <description>&lt;P&gt;I am using sabrelite board, so MPU is imx6q.&amp;nbsp;&lt;BR /&gt;I've introduced what you've suggested but I think it still does not help me.&lt;BR /&gt;I've patched linux with a bit of debug logs. In mxc_ipuv3_fb.c in mxcfb_probe function I've added debug logs to this peace of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    if (res &amp;amp;&amp;amp; res-&amp;gt;start &amp;amp;&amp;amp; res-&amp;gt;end) {
        printk(KERN_DEBUG "%s: Memory resource found: start = %d, end = %d\n",
            MXCFB_NAME, res-&amp;gt;start, res-&amp;gt;end);
        fbi-&amp;gt;fix.smem_len = res-&amp;gt;end - res-&amp;gt;start + 1;
        fbi-&amp;gt;fix.smem_start = res-&amp;gt;start;
        fbi-&amp;gt;screen_base = ioremap(fbi-&amp;gt;fix.smem_start, fbi-&amp;gt;fix.smem_len);
        /* Do not clear the fb content drawn in bootloader. */
        if (!mxcfbi-&amp;gt;late_init)
            memset(fbi-&amp;gt;screen_base, 0, fbi-&amp;gt;fix.smem_len);
    } else {
        printk(KERN_DEBUG "%s: No memory resource found\n", MXCFB_NAME);
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I would suppose that after changing the device tree, linux would found the resources for mxcfb1, but "No memory resource found" message is outputted.&lt;BR /&gt;And if we look at the debug message from mxcfb_map_video_memory function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;dev_dbg(fbi-&amp;gt;device, "allocated fb @ paddr=0x%08X, size=%d.\n",
		(uint32_t) fbi-&amp;gt;fix.smem_start, fbi-&amp;gt;fix.smem_len);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The address in the device tree is not seen there.&lt;BR /&gt;I am also wondering, if the platform lets linux know what is the start address of the allocated framebuffer by putting it into some register and linux reading this value from the register?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Mar 2025 10:00:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Graphics/mxcfb-ram-memory/m-p/2055434#M755</guid>
      <dc:creator>lyashmik</dc:creator>
      <dc:date>2025-03-04T10:00:13Z</dc:date>
    </item>
  </channel>
</rss>

