13 Commits

Author SHA1 Message Date
Naomi Luis
7d0082bc06 libgralloc-qsd8k: Fallback to ashmem if pmem allocation fails
If we are not using MDP composition, and the pmem allocation fails,
try allocating the surface memory from the ashmem region, if a PMEM
surface is not explicitly requested.

Change-Id: I528cd6b31cc84fb3a4b4611cf197baffe1465ee9
2011-07-26 12:39:57 -07:00
Harshad Bhutada
950ab4c045 libgralloc-qsd8k: Dynamic ASHMEM
When USE_ASHMEM is set, ASHMEM will be used only for non-MDP composition.
This implementation will force to use PMEM for MDP composition case. This
will allow using ASHMEM or PMEM at run time, depending on the composition
type. USE_ASHMEM would mean that use ASHMEM where possible.
This will also make sure that video works properly when dynamic ASHMEM
feature is enabled on 7x27 / 7x27a / 7x25a targets.

Change-Id: I5860311aad20d33e2d078cd6f0d05e041ff3364a
2011-06-16 01:06:43 -06:00
Naseer Ahmed
16e6f7da94 Revert "libgralloc-qsd8k: Align the framebuffer only for GPU or C2D composition"
This reverts commit 80df10595720594cf661b8812507ba75b2bafd1e.

Revert "libgralloc-qsd8k: Set the framebuffer offsets correctly"

This reverts commit 09a31858f42978c29e0c7014713748d413b3c587.

It is no longer a requirement for GPU to be 4k aligned, hence
reverting these 2 changes.

Change-Id: I39e6f6324353a3c19bfdf523f8862408ef9a4093
2011-06-10 12:29:15 +05:30
Naomi Luis
32a41ee5dc libgralloc-qsd8k: Set the framebuffer offsets correctly
The offsets for the framebuffer needs to start at a 4K aligned address.
Calculate the additional delta for the yoffset, the virtual address for flipping
as well as the total framebuffer size required to achieve this

Change-Id: Idfd70be10a24ac464ec820494b66d506a03a983b
CRs-fixed: 273888
2011-04-28 13:03:56 -07:00
Naseer Ahmed
6780fe3a4e gralloc: Add support for YCrCb_420_SP allocs
CRs-fixed:272635
Change-Id: I61503b9591c7db2f0aa6c912dba2a829c30263dc
2011-01-28 16:20:45 +05:30
Shubhraprakash Das
c7c72810d0 libgralloc-qsd8k: Port part of change Ice6a7c28
Port over part of change Ice6a7c28 that frees ashmem
memory.

Change-Id: I467617f3bc35a0e448fbf41207853e669aed657a
2011-01-18 18:12:13 -07:00
Naomi Luis
736092e772 libgralloc-qsd8k: Update the gralloc HAL for Gingerbread
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: I36183bf1fa68e5c8ed80f1efbb5c535a060e0db0
2010-12-20 16:36:01 +05:30
Mathias Agopian
c4374041ac reject odd widths or heights for YV12 format
Change-Id: I66cbb5fbc20630218947cd41552a95503b58e15e
2010-09-10 14:40:10 -07:00
Mathias Agopian
e8a8dc32fd 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
3fe6e4e25d 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
71cce53197 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
018f4b572c Remove the YV16 format.
Change-Id: I3f7995ba0cf41bcde995df293bea78bce7d82fc9
2010-07-14 16:29:43 -07:00
Jamie Gennis
253d8b6ec7 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