Skip to content

256 KiB atomic DMA coherent pool is too small! #170

Closed

Description

@viric

Testing ff1c7e1, all boots fine, but vchiq is not there. I hadn't any gpu_mem related option in config.txt. I've tried gpu_mem=128, and gpu_mem_512=128, but nothing helps.

The kernel log:

...
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xf bcm2708.serial=0xe3e92703 smsc95xx.macaddr=B8:27:EB:E9:27:03 sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 448MB = 448MB total
[    0.000000] Memory: 432232k/432232k available, 26520k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff000000   ( 552 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04ee148   (5017 kB)
[    0.000000]       .init : 0xc04ef000 - 0xc050fce8   ( 132 kB)
[    0.000000]       .data : 0xc0510000 - 0xc0544220   ( 209 kB)
[    0.000000]        .bss : 0xc0544244 - 0xc05ec8f0   ( 674 kB)
...
[    1.048574] bcm2708_dma: DMA manager at f2007000
[    1.053365] bcm2708_gpio: bcm2708_gpio_probe c051dd78
[    1.058806] vc-mem: phys_addr:0x00000000 mem_base=0x1c000000 mem_size:0x20000000(512 MiB)
...
[    1.287093] vc-cma: Videocore CMA driver
[    1.293417] vc-cma: vc_cma_base      = 0x00000000
[    1.300418] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.307943] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.324796] brd: module loaded
[    1.335179] loop: module loaded
[    1.340826] ERROR: 256 KiB atomic DMA coherent pool is too small!
[    1.340826] Please increase it with coherent_pool= kernel parameter!
[    1.357266] vchiq: Unable to allocate channel memory
[    1.364563] vchiq: could not load vchiq

Activity

  1. simonjhall commented on Dec 2, 2012

    @simonjhall

    On my kit on the kernel command line I'm using "coherent_pool=6M".
    EDIT: as per this http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=19334&start=125#p223549

  2. viric commented on Dec 2, 2012

    @viric
    ContributorAuthor

    Ah clear. I had no idea where to look. Maybe some commit log should have mentioned that :)

  3. viric commented on Dec 2, 2012

    @viric
    ContributorAuthor

    Maybe the defconfig could have that in the cmdline.

  4. Ferroin commented on Dec 2, 2012

    @Ferroin
    Contributor

    This could also be fixed by adding the following to the default config:

    CONFIG_CMA_SIZE_MBYTES=6
    CONFIG_CMA_SIZE_SEL_MBYTES=y
    

    The problem occurs because if you don't specify anything other than 'CONFIG_CMA=y', it defaults to using 10% of the available system memory.

  5. popcornmix commented on Dec 3, 2012

    @popcornmix
    Collaborator

    @Ferroin
    are you sure about those settings?
    I believe the coherent_pool is different from CMA.
    (specifically the coherent pool is needed for atomic allocations, which CMA can't provide).

  6. Ferroin commented on Dec 3, 2012

    @Ferroin
    Contributor

    You're right, I was thinking about the cma= commandline paramater, not the coherent_pool.
    Sorry for any confusion this might have caused.

  7. popcornmix commented on Dec 12, 2012

    @popcornmix
    Collaborator

    Latest "next" firmware increases default coherent_pool to 4M, which makes vchiq init okay.
    You may need to increase coherent_pool to 6M or more when CMA is enabled, but that is a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions