Removing submapping for buffers allocated by the PmemKernelAllocator
This can be done since the restriction on multiple master maps has
been removed from the kernel
Change-Id: Iabe9cdfaa121bbffbfaf6503e037afebf5ac8455
Buffers allocated from the adsp or smipool regions have a masterFd associated with each buffer.
Make sure both the fds are closed when the buffers are freed to avoid memory leaks.
Change-Id: I7dd194bae9ebfffb5e8c1ed647bff6210409a731
This commit contains the following changes in the gralloc:
- Add buffertype in the gralloc handle i.e video buffer or UI buffer
- Add support for allocating memory from the /dev/pmem_smipool
- Add support for obtaining the buffer type and the HAL formats from the
input format which could be an OMX format.
- Add buffer type, format, width and height in the gralloc handle
Change-Id: Ie801cfcf5cea9c4b718b75e88abf71be6b087de7
The purpose of this change is to add support for allocating gralloc buffers
from either /dev/pmem or /dev/pmem_adsp depending on the usage flags. It does
this by factoring out and abstracting the interactions with the pmem device.
For /dev/pmem allocations, the kernel allocator is not used, so a single master
fd is opened, and all the allocations are sub-allocated from that by gralloc.
For /dev/pmem_adsp the kernel allocator is used, so it simply opens a new fd
for each allocation.
A very basic unit test that can be run on the host is included. It requires
gtest, so to run it on a host system gtest must (currently) be compiled with
BUILD_WITH_ASTL=true.
Change-Id: If2ae0151698fad8107e18e808a3fa012a846263f