<?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: i.MX6 GPU Memory Allocation</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/1163190#M162945</link>
    <description>&lt;P&gt;&lt;SPAN&gt;In Linux kernel 5.4 or maybe even before the Video memory is governed by&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;contiguous_mem&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;whose setting seems to be&amp;nbsp;&amp;lt;0x0 0x8000000&amp;gt;. It is enabled even if cma is completely commented out from the device tree.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Oct 2020 03:08:04 GMT</pubDate>
    <dc:creator>phanikirankara</dc:creator>
    <dc:date>2020-10-06T03:08:04Z</dc:date>
    <item>
      <title>i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/718999#M111739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a custom i.MX6Q based board with 1 GiB of RAM. I am using Linux kernel version 4.1.15-2.0.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the GPU is allocated 32MB of RAM as confirmed by:&lt;/P&gt;&lt;PRE&gt;# cat /sys/kernel/debug/gc/meminfo
VIDEO MEMORY:
 gcvPOOL_SYSTEM:
 Free : 9792956 B
 Used : 23761476 B
 Total : 33554432 B
 gcvPOOL_CONTIGUOUS:
 Used : 0 B
 gcvPOOL_VIRTUAL:
 Used : 0 B

NON PAGED MEMORY:
 Used : 0 B&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to increase this allocation to 64 or 128 MB. I have tried to achieve this by setting the kernel command line parameter galcore.contiguousSize=67108864, but /sys/kernel/debug/gc/meminfo still reports 32 MB. The galcore info on the other hand indicates that the driver seems to have accepted my kernel command line:&lt;/P&gt;&lt;PRE&gt;Galcore version 5.0.11.41671
Galcore options:
 irqLine = 301
 registerMemBase = 0x00130000
 registerMemSize = 0x00004000
 irqLine2D = 302
 registerMemBase2D = 0x00134000
 registerMemSize2D = 0x00004000
 irqLineVG = 303
 registerMemBaseVG = 0x02204000
 registerMemSizeVG = 0x00004000
 &lt;SPAN style="color: #ff0000;"&gt;contiguousSize = 67108864&lt;/SPAN&gt;
 contiguousBase = 0x00000000
 bankSize = 0x00000000
 fastClear = -1
 compression = -1
 signal = 48
 powerManagement = -1
 baseAddress = 0x00000000
 physSize = 0x80000000
 logFileSize = 0 KB 
 recovery = 1
 stuckDump = 0
 gpuProfiler = 0&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the same command line parameter to lower the memory allocation works for me e.g. setting galcore.contiguousSize=8388608, gives:&lt;/P&gt;&lt;PRE&gt;
# cat /sys/kernel/debug/gc/meminfo
VIDEO MEMORY:
 gcvPOOL_SYSTEM:
 Free : 185276 B
 Used : 8203332 B
 Total : 8388608 B
 gcvPOOL_CONTIGUOUS:
 Used : 15558144 B
 gcvPOOL_VIRTUAL:
 Used : 0 B

NON PAGED MEMORY:
 Used : 0 B

&lt;/PRE&gt;&lt;P&gt;This makes me think I need to adjust the size of some other memory area to allocate more to the GPU. I just cannot figure out what. Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 14:37:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/718999#M111739</guid>
      <dc:creator>davidwretman</dc:creator>
      <dc:date>2018-03-21T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719000#M111740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Uboot, try gpumem = 128M.&lt;SPAN style="color: #1f497d;"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:45:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719000#M111740</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2018-03-21T18:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719001#M111741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but unfortunately it has no effect. My kernel command line is now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;console=ttymxc1,115200 vt.global_cursor_default=0 consoleblank=0 no_console_suspend=1 root=/dev/mmcblk3p3 rootwait rw rootfstype=ext4 galcore.contiguousSize=67108864 galcore.showArgs=1 gpumem=128M&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reference, the memory layout reported by the kernel on boot is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;Memory: 701612K/1048576K available (5766K kernel code, 220K rwdata, 1864K rodata, 1688K init, 398K bss, 346964K reserved, 0K cma-reserved)

Virtual kernel memory layout:
 vector : 0xffff0000 - 0xffff1000 ( 4 kB)
 fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
 vmalloc : 0xc0800000 - 0xff000000 (1000 MB)
 lowmem : 0x80000000 - 0xc0000000 (1024 MB)
 modules : 0x7f000000 - 0x80000000 ( 16 MB)
 .text : 0x80008000 - 0x8077be54 (7632 kB)
 .init : 0x8077c000 - 0x80922000 (1688 kB)
 .data : 0x80922000 - 0x809591a0 ( 221 kB)
 .bss : 0x809591a0 - 0x809bcc50 ( 399 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 08:34:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719001#M111741</guid>
      <dc:creator>davidwretman</dc:creator>
      <dc:date>2018-03-22T08:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719002#M111742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI David.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gpu memory problem like you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you resolve this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 02:28:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719002#M111742</guid>
      <dc:creator>solkim</dc:creator>
      <dc:date>2018-09-28T02:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719003#M111743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turned out not to be a real problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;P&gt;The GPU memory appeared to be only 32MB:&lt;/P&gt;&lt;P&gt;$ cat /sys/kernel/debug/gc/meminfo&lt;BR /&gt; VIDEO MEMORY:&lt;BR /&gt; gcvPOOL_SYSTEM:&lt;BR /&gt; Free : 9792956 B&lt;BR /&gt; Used : 23761476 B&lt;BR /&gt; Total : 33554432 B&lt;BR /&gt; gcvPOOL_CONTIGUOUS:&lt;BR /&gt; Used : 0 B&lt;BR /&gt; gcvPOOL_VIRTUAL:&lt;BR /&gt; Used : 0 B&lt;/P&gt;&lt;P&gt;NON PAGED MEMORY:&lt;BR /&gt; Used : 0 B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is confusing as it only shows the system pool at 32MB and not the total GPU memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the kernel module reports this value if you enable the correct switch on the kernel command line ...&lt;/P&gt;&lt;P&gt;galcore.showArgs=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct total is shown as 128MB (contiguousSize = 134217728)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is controlled by the device-tree item contiguous_mem for the gpu. Which in the example is 0x8000000 (128MB).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Worth noting is that this is allocated from the "shared-dma-pool" (cma) which should always be larger than the gpu contiguous_mem.&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 08:13:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/719003#M111743</guid>
      <dc:creator>davidwretman</dc:creator>
      <dc:date>2018-10-01T08:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/1163190#M162945</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In Linux kernel 5.4 or maybe even before the Video memory is governed by&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;contiguous_mem&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;whose setting seems to be&amp;nbsp;&amp;lt;0x0 0x8000000&amp;gt;. It is enabled even if cma is completely commented out from the device tree.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 03:08:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/1163190#M162945</guid>
      <dc:creator>phanikirankara</dc:creator>
      <dc:date>2020-10-06T03:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 GPU Memory Allocation</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/1694093#M209789</link>
      <description>I am not able to found gc folder itself. could you please help</description>
      <pubDate>Thu, 27 Jul 2023 10:16:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-GPU-Memory-Allocation/m-p/1694093#M209789</guid>
      <dc:creator>ravicalm</dc:creator>
      <dc:date>2023-07-27T10:16:11Z</dc:date>
    </item>
  </channel>
</rss>

