]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: nvmap: single page allocation policy corrected
authorKirill Artamonov <kartamonov@nvidia.com>
Tue, 24 May 2011 10:12:43 +0000 (13:12 +0300)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 08:19:05 +0000 (01:19 -0700)
commite95023a736b4da3d07327f74e70326362eaf4201
treea3e0c58d78d9c781bd6f071f6a286c1a7db5bff5
parent440a133e1314cb76f3077c4f34ab9674f9f1ea68
video: tegra: nvmap: single page allocation policy corrected

When user doesn't use default heap policy and selects
GART or carveout allocation, automatic single-page-to-sysmem
rule doesn't work. Because of broken rule many single page
allocations take extra space in carveout and create
unnecessary page mappings in GART and SMMU.

The fix adds sysmem bit to heap mask when allocation is
single page and GART or carveout is present in heap mask.

bug 730124
bug 731923

The change also does sanity check of available system memory
before adding sysmem bit for carveout allocations.

bug 777839

Original-Change-Id: I13a62653825f6c80581adcd2682fb2608d3a284e
Reviewed-on: http://git-master/r/31383
Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com>
Tested-by: Kirill Artamonov <kartamonov@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R278606210f20aacc885fa9eb06b3a2a3d8677b55
drivers/video/tegra/nvmap/nvmap_handle.c