Skip to content

Commit

Permalink
bcm270x: Remove 4MB dma coherent pool
Browse files Browse the repository at this point in the history
Drop the call to init_dma_coherent_pool_size(). The default 256kB is
enough since vchiq dropped that atomic allocation some time back.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
  • Loading branch information
notro committed Oct 10, 2016
1 parent 04e627a commit f9f6017
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
11 changes: 0 additions & 11 deletions arch/arm/mach-bcm2708/bcm2708.c
Expand Up @@ -105,16 +105,6 @@ static void __init bcm2708_init(void)
system_serial_low = serial;
}

void __init bcm2708_init_early(void)
{
/*
* Some devices allocate their coherent buffers from atomic
* context. Increase size of atomic coherent pool to make sure such
* the allocations won't fail.
*/
init_dma_coherent_pool_size(SZ_4M);
}

static void __init board_reserve(void)
{
vc_cma_reserve();
Expand All @@ -129,7 +119,6 @@ MACHINE_START(BCM2708, "BCM2708")
/* Maintainer: Broadcom Europe Ltd. */
.map_io = bcm2708_map_io,
.init_machine = bcm2708_init,
.init_early = bcm2708_init_early,
.reserve = board_reserve,
.dt_compat = bcm2708_compat,
MACHINE_END
Expand Down
12 changes: 0 additions & 12 deletions arch/arm/mach-bcm2709/bcm2709.c
Expand Up @@ -117,16 +117,6 @@ static void __init bcm2709_init(void)
system_serial_low = serial;
}

void __init bcm2709_init_early(void)
{
/*
* Some devices allocate their coherent buffers from atomic
* context. Increase size of atomic coherent pool to make sure such
* the allocations won't fail.
*/
init_dma_coherent_pool_size(SZ_4M);
}

static void __init board_reserve(void)
{
vc_cma_reserve();
Expand All @@ -142,7 +132,6 @@ MACHINE_START(BCM2709, "BCM2709")
/* Maintainer: Broadcom Europe Ltd. */
.map_io = bcm2709_map_io,
.init_machine = bcm2709_init,
.init_early = bcm2709_init_early,
.reserve = board_reserve,
.dt_compat = bcm2709_compat,
MACHINE_END
Expand All @@ -151,7 +140,6 @@ MACHINE_START(BCM2708, "BCM2709")
/* Maintainer: Broadcom Europe Ltd. */
.map_io = bcm2709_map_io,
.init_machine = bcm2709_init,
.init_early = bcm2709_init_early,
.reserve = board_reserve,
.dt_compat = bcm2709_compat,
MACHINE_END
Expand Down

3 comments on commit f9f6017

@clivem
Copy link

@clivem clivem commented on f9f6017 Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I wonder if the removal of the 4MB cma pool is the cause of the failure to play anything out of a I2S device with the rpi-4.8.y tree?

[16:28:24.431273] ALSA snd_pcm_hw_start:620 SNDRV_PCM_IOCTL_START failed (-12)
[16:28:24.431522] output_thread:778 start error: Cannot allocate memory

@popcornmix
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does cma=4M added to cmdline.txt help?

@clivem
Copy link

@clivem clivem commented on f9f6017 Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know. I reverted all the devices I put a 4.8 kernel onto last night. There were multiple issues. This was just one of them. I'll come back to this when the 4.8 tree is more stable. I need stuff to just work at the moment, so I'll stick with rpi-4.7.y for the time being.

Please sign in to comment.