11 Commits

Author SHA1 Message Date
Naseer Ahmed
0856a1cf2f gralloc: header change for ION support
Change-Id: Ibbb81034c1c4cbc6ddc79719c7d47ded97bd816e
2011-11-08 10:57:43 -08:00
Naomi Luis
28bb235bc3 libgralloc-qsd8k: Use correct vaddr for clean/invalidate pmem regions
CRs-fixed: 304740
Change-Id: Id72bb9ae874a56be89aec79d23e8d2e79856409d
2011-09-19 19:16:37 -05:00
Naseer Ahmed
3de087d0bb gralloc: Clean pmem caches after memset
Change-Id: If403dde70863e0d6ea221f2a105b86bdec134261
2011-09-19 19:16:37 -05:00
Naomi Luis
3ae7f52726 libgralloc-qsd8k: Support for additional gralloc usage flags.
Add support for the GRALLOC_USAGE_EXTERNAL_DISP and the
GRALLOC_USAGE_PROTECTED usage bits. If any of the two usage bits are
set, we need to send the buffers to the overlay.
Since we send the buffers to the overlay, we need to allocate these
buffers from the PMEM region.

(cherry picked from commit 195345cd63f0e19cfee4cf055587d5fffe76d0ef)

Change-Id: I64116b9be07c8ddadbd5a132ef21b19e5326737b
2011-09-19 19:16:36 -05:00
Naomi Luis
42c6d72977 libgralloc-qsd8k: Remove submaps for PmemKernelAllocators
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
2011-09-19 19:16:36 -05:00
Naomi Luis
e03a345a11 libgralloc-qsd8k: Flush the cache after buffer allocation
Change-Id: Idb720b8c64b323216f77de834c83c328caccd6ef
2011-09-19 19:16:33 -05:00
Naomi Luis
06304d437b Align pmem for NV12 Tiled buffers
The decoder requires the NV12Tiled buffers to be physically aligned to 8k.

Change-Id: I07a40d2a390601192a01213a5de94df2ab1ee06c
2011-09-19 19:16:33 -05:00
Naomi Luis
3be64f08f9 libgralloc-qsd8k: Close the masterFd when freeing video/camera buffers
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
2011-09-19 19:16:33 -05:00
Naomi Luis
d1fc805f34 libgralloc-qsd8k: Initial gralloc changes for honeycomb
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
2011-09-19 19:16:32 -05:00
Naomi Luis
a709f0300c libgralloc-qsd8k: Initial gralloc commit
Update the gralloc HAL to match commit:

        commit 4d3c9ca6fabf2b0111ef6b567df7d244e124b9c2
        Author: Arun Kumar K.R <akkr@codeaurora.org>
        Date:   Fri Dec 17 13:14:58 2010 -0800

            libgralloc-qsd8k: Add support for non-aligned width on HDMI

            While creating overlay channel for HDMI consider the aligned
            width and set the crop rectangle to the actual width and height.

Change-Id: I8858d71bb10b2be4c57edb605b5da680f53051dc
2011-09-19 19:16:32 -05:00
Jamie Gennis
5bc176b1a6 Refactor the qsd8k gralloc implementation.
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
2010-07-02 12:57:36 -07:00