linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* dma_alloc_writecombine() and MAX_ORDER
@ 2011-04-29 12:50 Michael Hunold
  2011-04-29 14:27 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Hunold @ 2011-04-29 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I'm using dma_alloc_writecombine() to allocate memory in my framebuffer
device driver just like many other drivers do.

Now I have a new panel with a higher resolution and more bits-per-pixel.
I want to use double-buffering with DirectFB and so my framebuffer size
exceeds 4Mb.

Even though my embedded system has plenty of memory, now I receive the
following warning and the allocation fails:

WARNING: at /home/teemhu/mcu/has/topas/mm/page_alloc.c:2012
__alloc_pages_nodemask+0x444/0x650()

This is due to the following check in __alloc_pages_slowpath():
	if (order >= MAX_ORDER) {
		WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
		return NULL;
	}

Because MAX_ORDER is 11, only memory chunks of size (PAGE_SIZE <<
MAX_ORDER_NR_PAGES) = 4Mb can be allocated.

Apparently this topic has come up when using the OMAP DSS already:
http://www.spinics.net/lists/linux-omap/msg08124.html

Another user has asked this question on the linuxfb-dev mailing list in
October 2010, but did not receive an answer:
http://www.spinics.net/lists/linux-fbdev/msg01745.html

So, would increasing MAX_ORDER in order to allow bigger memory chunks to
be allocated via dma_alloc_writecombine() be acceptable?

If not, can anybody give me some advice how to do the memory allocation
for the framebuffer memory instead in order to circumvent the problem?

CU
Michael.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-03  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-29 12:50 dma_alloc_writecombine() and MAX_ORDER Michael Hunold
2011-04-29 14:27 ` Russell King - ARM Linux
2011-05-03  6:25   ` Michael Hunold
2011-05-03  8:44     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).