]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00240988: gpu: allocate contiguous memory from CMA for 3.10 kernel
authorShawn Guo <shawn.guo@freescale.com>
Fri, 26 Jul 2013 08:49:39 +0000 (16:49 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:08 +0000 (10:06 +0200)
commitdb7a7189544310076c99eaa68b31dd741a1abf50
tree9b0170adedf8556762ce5ea309b01d93c5cd0601
parent0f26f76d5d1232c893e0d471635c105d72625587
ENGR00240988: gpu: allocate contiguous memory from CMA for 3.10 kernel

The Contiguous Memory Allocator (CMA) is mature in 3.10 kernel.  Let's
change gpu driver to allocate contiguous memory from CMA pool.  Doing so
will save not only the memblock reserve calls in machine code but also
the request_mem_region() and ioremap() in gpu driver.  And all the
system memory will be seen by kernel no matter whether gpu driver is
running or not.

It also changes the default contiguousSize to 128 MiB for Freescale
adjustment.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.h
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c