Commit Graph

20 Commits

Author SHA1 Message Date
Naomi Luis
7e2db6e3d0 liboverlay: Add YV12 support
Add support in the overlay for the YV12 color format.

(cherry picked from commit 0f9a27cc39b6d4202b54059bc7c64eea9efcf3f1)

Change-Id: I4b57eb383ca8f728243bd7e397696932e26c8889
2011-09-19 19:16:36 -05:00
Naomi Luis
1efe8832e9 libgralloc-qsd8k: ashmem changes
- Remove unused GRALLOC_USAGE_PRIVATE_PMEM flag. This flag is no
longer used.
- Flush ashmem region cache instead of Invalidating it.

(cherry picked from commit 12254ff74f5a97dcf5ded90f53e9d6fd0fa47b9c)

Change-Id: I92e4dcd8c89eb9ae0c0484f039d152b7bbb28bbe
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
dc7076e724 libgralloc-qsd8k: Modify buffer sizes for NV12, NV21 and YV12 formats
Allocate buffer sizes that are multiples of 4K for the NV21, NV12 and
YV12 formats.

Change-Id: I3febaef9dda2586ef3b35945f30f655e07f5e369
CRs-fixed: 287882
2011-09-19 19:16:35 -05:00
Naomi Luis
d71c65326e libgralloc-qsd8k: Clean getGrallocInformationFromFormat function
- Stagefright no longer sends the OMX Formats to the gralloc, remove
unnecessary code from the function.
- Add support for the YV12 format in getGrallocInformationFromFormat

Change-Id: Id21baf8890f07ef8fb8a32d3b0d218540005f469
2011-09-19 19:16:35 -05:00
Naomi Luis
7a23eb34e1 libgralloc-qsd8k: support for specifying buffer size during allocation
Add support in the gralloc to specify the desired buffer size during
buffer allocation. This is done via a new function in the gralloc(allocSize).

If the specified size is lesser that the calculated size,
set the buffer size to the calculated size.

Change-Id: Iad9609d3b9074dcf3af07430966590078081ab72
2011-09-19 19:16:34 -05:00
Shubhraprakash Das
76595c17bd libgralloc-qsd8k: Port part of change Ice6a7c28
Port over part of change Ice6a7c28 that frees ashmem
memory.

Change-Id: I467617f3bc35a0e448fbf41207853e669aed657a
2011-09-19 19:16:33 -05:00
Naomi Luis
9cdf0b93ca libgralloc-qsd8k: Align the chroma size for NV12Tiled formats to 8K
The video decoder requires the chroma and luma sizes to be aligned to 8K.

Change-Id: Ie378728647348812197b48ca4a9299344e56c3af
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
5a1bf4cb9e overlay: Add support for additional S3D formats
Add support for Side-by-Side full, Side-By-Side-half formats in the overlay.
The Side by Side half formats could either be in Left-Right or Right-Left mode.

Change-Id: Ie1f0ccb5b1a8254f7256aafdd3f0ce9a3faa0df4
2011-09-19 19:16:32 -05:00
Naomi Luis
1e95e224d6 libgralloc-qsd8k: Move the OMX format definitions to gpu.cpp
Change-Id: Ieb6e1f07b6e676d6d9556572a61b70780e4483fc
2011-09-19 19:16:32 -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
Mathias Agopian
9efee771b2 reject odd widths or heights for YV12 format
Change-Id: I66cbb5fbc20630218947cd41552a95503b58e15e
2010-09-10 14:40:10 -07:00
Mathias Agopian
31f0df4eba don't revert to ashmem if HW usage bits are set
this wouldn't make sense, since the h/w wouldn't be able
to use the buffer. in this case it it better to fail to
let the caller a change to try again with different usage bits.

Change-Id: Ibecaf069b6b58ee9c026affc95a45512660d5881
2010-08-20 16:02:29 -07:00
Jamie Gennis
38b90c13c4 Change the constant name identifying the NV21 Adreno format.
This updates the qsd8k gralloc to support the new name for the NV21 Adreno
pixel format.

Change-Id: I358bf12db058d3740a5e49ee30d95c2afb708295
2010-08-06 12:09:15 -07:00
Mathias Agopian
041cfdf2cf fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
we were dereferencing the null pointer when freeing ashmem buffers.

Change-Id: I7be6e1ae064148bea1076193c21a73b5a3f90297
2010-07-28 18:12:39 -07:00
Mathias Agopian
fce1cc8a83 Remove the YV16 format.
Change-Id: I3f7995ba0cf41bcde995df293bea78bce7d82fc9
2010-07-14 16:29:43 -07: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