Commit Graph

13 Commits

Author SHA1 Message Date
Naseer Ahmed
0371a6cfa9 display: Use a new flag for content protection
The GRALLOC_USAGE_PROTECTED flag that was used
earlier for content protection is also used for
some other use cases such as disabling of
screen captures. Define this new flag that
is explicitly used for allocating secured
buffers for DRM.

Change-Id: Ia33f79fa0dea7f2f16dd320f267203e6173af48e
CRs-fixed: 348454
(cherry picked from commit 440a996f13be732895524412762793f109681c11)
2012-06-02 23:39:24 -05:00
Prabhanjan Kandula
e80c89a867 libgralloc: fb size alignment to pagesize
Align framebuffer size and offset to pagesize, calculate
framebuffer size based on this alignment and use it for
mapping framebuffer in userspace and page flipping.

CRs-fixed: 332175

(cherry picked from commit d89b0493b4651fbaaeccccf0ae880cbf1a3a3479)

Change-Id: I7840f7f3c5c42852087cb9df6ae85680c971c601
2012-06-02 23:38:31 -05:00
Naseer Ahmed
d6ffef4cef gralloc: Add locking to alloc and free in ION
Change-Id: I16e24e3d366b15a458b19983827233a7bd27d9f7
(cherry picked from commit edad58e17deb0cb1d9ff4754fbac511eea8e4ecf)
2012-05-22 17:03:46 -05:00
Saurabh Shah
e15d259d8c hardware/qcom/display: External-only display.
Add support for external-only display. Layer buffers
marked with GRALLOC_USAGE_EXTERNAL_ONLY will be
displayed on external panel only, if available.

In addition if the layer buffer also has the flag
GRALLOC_USAGE_EXTERNAL_BLOCK then only that layer
will be displayed on external (During suspend).

When this mode is on, the default mirror mode for
external is stopped.

Conflicts:

	libhwcomposer/hwcomposer.cpp

Change-Id: I8ea2920384c5b68311ee3fe00707d01ab6568b52
2012-03-16 23:29:57 -05:00
Naseer Ahmed
128d5de4b5 gralloc: Add function to calculate buffer dimensions.
This function can be used from other components
to get the aligned dimensions and size of the buffer
given the width, height and color format.

Change-Id: I8d7532a262194f3883bf0f5166e806e0971392e2

Conflicts:

	libgralloc/gpu.cpp
2012-03-16 20:57:34 -05:00
Jeff Boody
1077e7cce3 add GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED for explicit synchronization.
Change-Id: I3d78f0517f7eeafc58ec5b0edfc6a04901ad48b2
(cherry picked from commit 35229ceb772a4a3c0a9dbfcb42fdb45344a91b4e)
2012-03-16 20:35:18 -05:00
Naomi Luis
6493734d01 libgralloc: Check if w and h are odd only for the YV12 format.
The mandate for the width and height to be even is only for the YV12
format. Add this check only for the YV12 format.

Change-Id: I1e8d2de174ecf2e62cd33cc40dfd8e97d70a3a59
2012-02-27 00:06:02 -06:00
Naomi Luis
8994068ce6 libgralloc: Add HAL_PIXEL_FORMAT_NV12_ENCODEABLE format.
Add HAL_PIXEL_FORMAT_NV12_ENCODEABLE which is the encoder specific
format.
Remove unused OEM formats from the gralloc.

Change-Id: I787203cd96b597c881f0acc10b60ea2ab2ffe1ab
2011-12-04 15:23:50 -08:00
Naomi Luis
1e74639826 libgralloc: Invoke genlock during gralloc_lock/gralloc_unlock
gralloc_lock and gralloc_unlock invokes genlock to perform the buffer
locking operation.
Remove unused gralloc handle variables.

Change-Id: I5283613c5f67f708123916653af1b2d1ec155577
2011-11-23 15:06:47 -08:00
Naomi Luis
1b5f80522b libgralloc: Create, attach and release genlock locks
Add support in the gralloc to:
- Create a lock during buffer allocation.
- Release a lock when the buffer is freed or unregistered.
- Attach a lock when the buffer is registered.

Change-Id: I788e411f43d5fcf88d7dcf39c530559a12d6361c
2011-11-23 14:58:23 -08:00
Naseer Ahmed
78ec9e4e53 display: Add support for pmem in the new gralloc
Change-Id: Ice6f436a01c3344a6d859ee0afc77673f151dbe4
2011-11-20 21:42:37 -08:00
Naseer Ahmed
96311b0091 Display: Compile gralloc for ICS
This disables certain features for compilation

Change-Id: I7e7533fa7db940a106b3520bef48c9fc2860707c
2011-11-19 21:16:20 -08:00
Naseer Ahmed
9c050e95ec gralloc: Refactor, ion support
- Add ION support
- Refactor the design

Change-Id: I5b067b0aca1235ee8c01c256e025f416bb56f560
2011-11-16 13:43:12 -08:00