summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap_handle.c
AgeCommit message (Collapse)Author
2014-08-01nvmap: fix test condition to avoid infinite looptegra-l4t-r16-er-2014-08-01daily-2014.08.04.3_l4t/l4t-r16Bibek Basu
Make sure that we dont enter infinite loop due to negative value of pins in some cases. Also remove debugging check for refcount. Bug 1478467 Change-Id: I7df8efa5b3cf8927a0c18363add4f031aca48e48 Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/450209 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
2014-01-24media: nvmap: Allow access to videobuf2-dma-nvmapRahool Paliwal
Allow the "user" nvmap client to access the nvmap memory handle of "videobuf2-dma-nvmap" client. Bug 1421388 Change-Id: Id7a28c06214508d807098a6b258345023192a601 Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com> Reviewed-on: http://git-master/r/344620 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-08-16video: tegra: nvmap: Add sanity checks for page pools.Krishna Reddy
Check return code for set_page_array_* calls. Change-Id: Ie62ac78b82321939d5bd9d2a636d72dadea50d28 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/123544
2012-08-15video: tegra: nvmap: Add support for zeroed pagesAlex Waterman
Add support to alloc zeroed pages for user space alloc requests. Also define a config option to force userspace allocation requests to be zeroed. Change-Id: I75d3b2bc36e808f1470b423578ec4cba99e0f967 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/122549 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-27video: tegra: nvmap: Set PAGELIST_VMALLOC_MIN size correctKrishna Reddy
page list array size greater than PAGE_SIZE should use vmalloc. Change-Id: Ic03668ba7ff716bfb3cc08aaef5f86214ee0a9df Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/116875 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com> Tested-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> (cherry picked from commit ddacaacd2a9fff10187e026eaa0d898694eeb95f) Reviewed-on: http://git-master/r/118194
2012-06-29video: tegra: nvmap: resolve compilation time warningSanjay Singh Rawat
- Grouping variables around bitwise operators for safe operation. bug 949219 Change-Id: I8edf7fb241eb79ac07b63ab856d206fc453308f1 Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/109577 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-06-21video: tegra: nvmap: Use trace points in NvMap.Krishna Reddy
Change-Id: I2a5f0c9305bd53c42df181556d97efa5d6792ad7 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/106500 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bo Yan <byan@nvidia.com>
2012-05-25video: tegra: nvmap: Clean up carveout to iovmm conversion.Krishna Reddy
Clean up carveout to iovmm conversion code. Fixed bug in converting iovmm requests to carveout. Change-Id: I35a5238c955d0478f0e1a295e501bae9ee52b0a8 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/103991 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-05-23video: tegra: remove free memory checkKirill Artamonov
Used free memory check in allocation policy is not working, because it doesn't calculate available physical memory size in same way as android oom killer. It also breaks kernel build if swapping is enabled. Remove free memory check from allocation policy. Change-Id: I214d1829451f313dbace967e87ed4111e688865d Reviewed-on: http://git-master/r/85227 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-18video: tegra: nvmap: Use nvmap.h include file from kernel/includeKrishna Reddy
Use nvmap.h include file from kernel/include instead of mach-tegra/include. Bug 854182 Change-Id: I385657f45483f2696e99fc2b4ed934fef5decd1e Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/102720 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-05-07video: tegra: nvmap: config option to enable page pools.Krishna Reddy
Add config option to enable/disable nvmap page pools. Change-Id: I873e81a675fecd768534d4ce03c2f8fdd3c6a063 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/100424 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2012-03-30video: tegra: nvmap: Refactor page pool code.Krishna Reddy
Refactor page pool code. Add page pool support for all memory types. Add support to enable/disable page pools. Add support to allow configuring page pool size. Change-Id: I07c79004542efdd5909547928b3aa5d470e38909 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/91914 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-03-19video: tegra: nvmap: Optimze nvmap page pool shrink timeKrishna Reddy
Bug 925987 Change-Id: Ifab4e515c7dd06b92d798e7eb93094c35e02b878 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/89414 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-15video: tegra: nvmap: Fix issue in handle_page_allocKrishna Reddy
Fix race condition in handle_page_alloc. Page allocations should not try allocate from pool, once it fails for a request. If it tries and allocation passes during subsequent attempts, the page_index is not valid for CPA and cache won't be flushed for all the necessary pages. Change-Id: I5548e11b713f271cc8473a3f2ae193a69e832f99 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/89611 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-12video: tegra: nvmap: optimize uc & wc allocations.Krishna Reddy
Changing page attributes and cache maintenance reduces performance in applications doing runtime reallocations. Keep pool of UC & WC pages to avoid expensive operations when doing allocations. bug 865816 (refactored initial changes from Kirill and added shrinker notification handling) Change-Id: I43206efb1adc750ded672bfe074e0648f2f9490b Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/87532 Reviewed-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-02-24video: tegra: nvmap: don't override contiguous flagKrishna Reddy
Don't override contiguous flag in nvmap_page_alloc(). This is causing incorrect iovm_commit accounting. Bug 938864 Change-Id: If30ea43702465980914b12816fa28eac9e14581d Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/85319 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com> Tested-by: Kamal Balagopalan <kbalagopalan@nvidia.com>
2012-01-19video: tegra: nvmap: Remove high mem page cache flush.Krishna Reddy
Remove cache flush for high mem pages from nvmap as CPA is taking care of cache flush for high mem pages. Bug 865816 Change-Id: Ia7b06cdd80a16de0996c119dd950e68c5fd24b5b Reviewed-on: http://git-master/r/71726 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/75881 Reviewed-by: Automatic_Commit_Validation_User
2011-12-15video: tegra: nvmap: Update page attributes as per request.Krishna Reddy
After allocating pages, Update page attributes in kernel page table as per mem type requested. Bug 865816 Reviewed-on: http://git-master/r/56334 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> (cherry picked from commit bea4d449f4ff7090e0c2797693d2348f4586d8f6) Reviewed-on: http://git-master/r/62720 Tested-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Hiro Sugawara <hsugawara@nvidia.com> Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> (cherry picked from commit 975fb95585543124de282faa4481433b147f61c6) Change-Id: Iee71f8b37c405731314a1441cdb30ca848b41399 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/68744 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
2011-11-30video: tegra: nvmap: expose allocation flags in debugfsKirill Artamonov
Allocation flags provide useful information about how allocations were created. Expose allocation flags in allocation debugfs list. bug 882345 bug 889003 Reviewed-on: http://git-master/r/61517 (cherry picked from commit 5100f1b09584f079a1547f65ac8b49b27df73292) Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com> Change-Id: I2aed0150fe76791550daa1f37d1b5a238af50e1e Reviewed-on: http://git-master/r/64939 Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Tested-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R38ccb94a1d41207b1fe92d345e626963912b2379
2011-11-30video: tegra: nvmap: Add VPR heap support.Krishna Reddy
Reviewed-on: http://git-master/r/51026 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> (cherry picked from commit 060055eea2082adb6da4cf27462ff699fdf2b4e9) Change-Id: I9244dff21e9cd62b14f97bfb5a5349eb46f73847 Reviewed-on: http://git-master/r/56107 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: Rd3f4f8799a3acad27234422b39a4def0a439e3f3
2011-11-30video: tegra: nvmap: Don't allocate more than iovm limit.Krishna Reddy
Don't allow root user allocating more than iovm limit to avoid pin time issues. Bug 864535 (cherry picked from commit 52e6b556bfc08cb085b283b5ee8d11efb1b07617) Change-Id: If61577eb09cb96475d5fae5b58813beaee1f7b6f Reviewed-on: http://git-master/r/54837 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R59951f6ecba2ed2b075b170630c0ce7c6a84aad5
2011-11-30video: tegra: nvmap: fix checkpatch.pl issuesKen Adams
Change-Id: Ic7fab1575312afd27430b46a50aa6f7a7de0ac4e Reviewed-on: http://git-master/r/53843 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R44abb981f52475b4431975c5d38611e7ca93b59a
2011-11-30arm: tegra: nvmap: Remove dependency on CONFIG_TEGRA_IOVMMHiro Sugawara
Make kernel boot up with CONFIG_TEGRA_IOVMM=n (cherry picked from commit f10b613bbd27b8a5f25cbbaebecfe50fd9c0be3f) Change-Id: I980d762bd9feac3881e00015e6db753ae36e79f9 Reviewed-on: http://git-master/r/54509 Tested-by: Hiro Sugawara <hsugawara@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R0c90a78e3a9e8d5316faa1fee012f6269ee82035
2011-11-30video: tegra: nvmap: Add debugfs for iovmm allocations.Krishna Reddy
Original-Change-Id: Ic50111924d7adf7838926cb534bbf841b7e8003a Reviewed-on: http://git-master/r/45358 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R6399e487b817aa16c39e685d3f7860d1eefa8b09
2011-11-30video: tegra: nvmap: handle free null conditionsKen Adams
Original-Change-Id: I75e88d6cef2daf625c6ede38a937207b95e2b84c Reviewed-on: http://git-master/r/44364 Reviewed-by: Ken Adams <kadams@nvidia.com> Tested-by: Ken Adams <kadams@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Rebase-Id: Rd79c4aac3d3e03e601be5b35934fe36a35cd358f
2011-11-30video: tegra: nvmap: Fix cache flush issue during page alloc.Krishna Reddy
Bug 39790 Original-Change-Id: I5ce0e35501442ed1a6818aebfeae1670ebb9d08d Reviewed-on: http://git-master/r/39867 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R5679d529af4779bde735d3055b04d368b765c620
2011-11-30video: tegra: nvmap: Fix nvmap_handle.c compileDan Willemsen
Rebase-Id: Re05bf8da51b75cfd7c8a10677fce557c76593a43
2011-11-30video: tegra: nvmap: Fix iovm_commit accounting issue.vdumpa
Bug 835748 Original-Change-Id: I67766cc94496162816cbef4689fa806553d6edfa Reviewed-on: http://git-master/r/35792 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Krishna Reddy <vdumpa@nvidia.com> Rebase-Id: Ree8a45408d5763ec8db2cc4072add4c347326f99
2011-11-30video: tegra: nvmap: Add support to allocate specific IOVMvdumpa
Original-Change-Id: I95cdf71e74947d4394e0cfd272a29c47562d4059 Reviewed-on: http://git-master/r/31648 Reviewed-by: Niket Sirsi <nsirsi@nvidia.com> Tested-by: Niket Sirsi <nsirsi@nvidia.com> Rebase-Id: Rb8c6f92bdfd0bf124a878800a793828fa61c0043
2011-11-30video: tegra: nvmap: single page allocation policy correctedKirill Artamonov
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
2011-11-30arm: tegra: nvmap: Forcing to convert CarveOut requests to IOVMHiro Sugawara
Adding a build time CONFIG option to enable forcing of conversion of non-IRAM CarveOut memory allocation requests to IOVM requests. Default is "y" to force the conversion. Each forced conversion is reported to console. Allocation alignments larger than page size for IOVM are enabled. Single page CarveOut allocations are converted to system memory. CarveOut memory reservation has been removed for aruba, cardhu, and enterprise. Original-Change-Id: I3a598431d15b92ce853b3bec97be4b583d021264 Reviewed-on: http://git-master/r/29849 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R602260e283f721b7e0f0d802092516ff68c068fe
2011-11-30Update copyrightsScott Williams
Original-Change-Id: I2ffeaf6f8dfeb279b40ca6f69f6c9157401a746a Rebase-Id: R5a6d087b717731c957b016f903fb82b4ea22b92d
2011-11-30tegra:video:nvmap: optimize cache_maint operation.vdumpa
video:tegra:nvmap: Clean whole L1 instead of cleaning by MVA For large allocations, cleaning each page of the allocation can take a significant amount of time. If an allocation that nvmap needs to clean or invalidate out of the cache is significantly larger than the cache, just flush the entire cache by set/ways. bug 788967 Reviewed-on: http://git-master/r/19354 (cherry picked from commit c01c12e63b1476501204152356867aeb5091fb80) tegra:video:nvmap: optimize cache_maint operation. optimize cache_maint operation for carveout and heap memories. flush carveout memory allocations on memory free. Bug 761637 Reviewed-on: http://git-master/r/21205 Conflicts: drivers/video/tegra/nvmap/nvmap_dev.c drivers/video/tegra/nvmap/nvmap_heap.c drivers/video/tegra/nvmap/nvmap_ioctl.c (cherry picked from commit 731df4df5e895e1d4999359d6d5939fc2095f883) tegra:video:nvmap: optimize cache flush for system heap pages. optimize cache flush for pages allocated from system heap. Bug 788187 Reviewed-on: http://git-master/r/21687 (cherry picked from commit 3f318911ad91410aed53c90494210e2b8f74308b) Original-Change-Id: Ia7b90ba0b50acfef1b88dd8095219c51733e027f Reviewed-on: http://git-master/r/23465 Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Tested-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R04f618f88ed1d2c7a680d51a8c5113f42de3f667
2011-11-30video: tegra: nvmap: fix potential deadlockKirill Artamonov
Enabled mutex debugging reavealed potential deadlocks introduced with compaction. Handle spin lock replaced with mutex. Heap functions cannot be protected with spinlock because they call kernel slab allocation functions which cannot be called from atomic context. nvmap_client ref_lock is also replaced with mutex. Otherwise we cannot access heap parameters protected by mutex nvmap_handle lock. Extra locking for handle->owner removed. bug 793364 Original-Change-Id: I635ce9ebf259dd7bf8802457567f93b7be5795ea Reviewed-on: http://git-master/r/19850 Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Tested-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Rebase-Id: Reaa132703e278d75371d5e2b25426794aa8e0e4e
2011-11-30video: tegra: nvmap: replace mutex with spinlockKirill Artamonov
There are places where nvmap_free_handle_id is called when interrupts are disabled and mutex cannot be used as nvmap handle lock. Original-Change-Id: Icc220fe627c08f21c677d936a54f70c818dc8e8c Reviewed-on: http://git-master/r/19489 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rb5a58e8226ad14340d1acae007d6b632960fae16
2011-11-30nvmap: implementing K36 carveout compactorKirill Artamonov
bug 762482 Original-Change-Id: Ifadebc1b0c4eb0df89e179091acca0ff6e527e56 Reviewed-on: http://git-master/r/15743 Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Tested-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R639e7f09f44c8919bd57a16a577b87db91160555
2011-11-30video: tegra: nvmap: Clear handle->owner on releaseRobert Morell
A struct nvmap_handle may be shared by multiple clients. If the original client (the handle "owner") is destroyed, but the handle is still referenced by other clients, h->owner points to freed memory. To prevent this, clear h->owner when the owner frees its reference to that struct nvmap_handle. Change-Id: I54722091568ce2058f5988e5f6e00e68605a8100 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-11-30video: tegra: nvmap: Fix per client accountingRebecca Schultz Zavin
Fix the way the total number of carveout allocations is managed per client. Change-Id: I3e12e2a98a74cafc1f4c51a48e3c3c549e930160 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-11-30video: tegra: nvmap: Fix handle ref countingRebecca Schultz Zavin
In the current implementation handles hold references to a client and clients hold references to their handles. As a result when a process terminates it's handles can't be cleaned up and we leak memory. Instead only hold references to handles from clients. Change-Id: Iba699e740a043deaf0a78b13b4ea01544675078f Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-11-30video: tegra: nvmap: Track carveout clientsRebecca Schultz Zavin
This patch adds the ability to track the total allocations in a given carveout heap by client. It also adds a sys file to print the list of clients, their pids and their respective carveout sizes Change-Id: I34fc97c3be574d2bd30d7594320ff05f6e13c476 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-11-30video: tegra: nvmap: Prevent reverting to sysmem for small allocationsColin Cross
Change-Id: Icfe552ad4a968329a1a2959d5b438062587a83b6 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30video: tegra: nvmap: eliminate arm_attrib_allocator dependencyGary King
remove the dependency that nvmap has on the arm_attrib_allocator and the lowmem in PTEs change by adding a private page allocator utility function and calling vm_map_ram unconditionally for all sysmem handles. also, add Kconfig variables to allow platforms to disallow the SYSMEM heap, and to optionally restrict the SYSMEM and IOVMM heaps to just HIGHMEM. Change-Id: I3dab1c7323f54a8ab3994dc672b27fd79a9057d7 Signed-off-by: Gary King <gking@nvidia.com>
2011-11-30video: tegra: nvmap: Only allow allocations out of highmemRebecca Schultz Zavin
Low mem pages are allocated in larger super pages and their caching attributes can't be controlled on a per page basis. This patch forces nvmap to map out of highmem pages which are guaranteed to have page mappings. Change-Id: Id3921342ecceb0345d43365d4dd90b82ca8cfd11 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-11-30video: tegra: add GPU memory management driver (nvmap)Gary King
nvmap provides an interface for user- and kernel-space clients to allocate and access memory "handles" which can be pinned to enable the memory to be shared with DMA devices on the system, and may also be mapped (using caller-specified cache attributes) so that they are directly accessible by the CPU. the memory handle object gives clients a common API to allocate from multiple types of memory: platform-reserved physically contiguous "carveout" memory, physically contiguous (order > 0) OS pages, or physically discontiguous order-0 OS pages that can be remapped into a contiguous region of the DMA device's virtual address space through the tegra IOVMM subsystem. unpinned and unmapped memory handles are relocatable at run-time by the nvmap system. handles may also be shared between multiple clients, allowing (for example) a window manager and its client applications to directly share framebuffers Change-Id: Ie8ead17fe7ab64f1c27d922b1b494f2487a478b6 Signed-off-by: Gary King <gking@nvidia.com>