# Re: \[PATCH 1/2\] ARM: omapfb: add coherent dma memory support

- From: Tony Lindgren \<tony@atomide.com\>
- Date: 2014-01-07 23:59:51 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2014/01/8671314
- Thread: https://ratatoskr.run/linux-arm-kernel/2013/12/8670550/t.md

```text
* Tomi Valkeinen [ref] [131230 05:21]:
> The omapfb driver uses dma_alloc to reserve memory for the framebuffers.
> However, on some use cases, even when CMA is in use, it's quite probable
> that omapfb fails to allocate the fb, either due to not enough free dma
> memory, fragmented dma memory, or CMA failing to make enough contiguous
> space.
> 
> This patch adds a kernel cmdline parameter 'omapfb_vram' which can be
> used to give the size of a memory area reserved exclusively for omapfb,
> and optionally a physical address where the memory area is reserved.
> 
> The memory area is reserved with memblock, and assigned to omapfb with
> dma_declare_coherent_memory. The dma_alloc function will first try to
> allocate the fb from the coherent memory area, and if that fails, it'll
> use the normal method of allocation.
> 
> Signed-off-by: Tomi Valkeinen <redacted>
> Cc: Ivaylo Dimitrov <redacted>

Feel free to queue this along with the DSS patches:

Acked-by: Tony Lindgren <tony@atomide.com>
```
