Commit Graph

28 Commits

Author SHA1 Message Date
Naseer Ahmed
f5ff33a0de gralloc: Fix incorrect handle validation check
The YUV plane info reported to driver has an incorrect handle
check. Use the check correctly.

Change-Id: Ice6388a3d8b91bfa5373e850e3102c6ccf92eb75
2014-04-30 15:30:39 -04:00
Naseer Ahmed
b29fdfdd84 gralloc: Report YUV plane info
The android_ycbcr structure in graphics.h is populated to give
the luma and chroma addresses. Use the same structure to give
this information to graphics via a gralloc perform call.

Change-Id: Ib42866a9ea90873886dcb60a1aac6cb375292642
2014-04-25 09:56:38 -07:00
Naseer Ahmed
69669978f7 gralloc: Remove pmem includes
Remove android_pmem as it is no longer used

Change-Id: Ib4328c57306da1ef87f9b822e70ff91da302c99a
2014-04-11 20:41:06 -04:00
Linux Build Service Account
43da51a308 Merge "gralloc: Perform func to return stride and height" 2014-04-03 08:13:42 -07:00
Raj Kamal
3d01d8d75e gralloc: Perform func to return stride and height
The custom stride and height can be set by video
decoder for smooth streaming. Return this in
perform so that graphics can use it

Change-Id: I44c814b2bae1f61d3ec5c36a22d1c6119542b10a
2014-04-02 08:38:41 +05:30
Naseer Ahmed
34d33bc907 gralloc: Add support for lock_ycbcr
Fill the android_ycbcr struct for HAL_PIXEL_FORMAT_YCbCr_*_888
formats.
This is a flexible YUV format that allows gralloc to set a
hardware specific YUV format based on the usage flags passed in.
Here we set the format similar to how we set the implementation
defined format and set the android_ycbcr structure to point to
the appropriate plane offsets.
Reference:  HAL_PIXEL_FORMAT_YCbCr_420_888 definition in
system/core/include/system/graphics.h

Change-Id: If0c7abf5e206bf982ad333da2dae57cbac302733
2014-04-01 18:17:38 -04:00
Arun Kumar K.R
6c85f050b2 libgralloc: use proper types and type casts
- Use proper types for pointers
- Resolve compiler errors
- handle proper type casts
- remove unused variables

Change-Id: I628ebe174485d30abadea4ca40b67f9aab1a0652
2014-03-28 15:14:58 -07:00
Shuzhen Wang
c502c873e8 gralloc: add GRALLOC_MODULE_PERFORM_GET_COLOR_SPACE_FROM_HANDLE
Provide query for graphics to determine the color space.

Change-Id: Ib710f44845f7449db6c62906b424d4a1b54400cb
2014-02-27 08:58:38 -08:00
Manoj Kumar AVM
8a22081e49 hwc: Add support for Macro Tile feature
Macro tile is enabled only if all the conditions are met:
  1. GPU hardware should support Macro Tiling.
  2. MDSS hardware should support Macro Tiling.
  3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
     GRALLOC_USAGE_SW_WRITE_OFTEN.
  4. RGB 16bit and 32bit formats.
  5. persist.hwc.macro_tile_enable flag should be enabled.

PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.

Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
2014-01-14 13:32:31 -08:00
Ramkumar Radhakrishnan
473f4085e3 libgralloc: Use new GFX API to calculate stride
Use new GFX API compute_aligned_width_and_height to get the stride
value for RGB surfaces.
Backward compatible with GFX old API when old GFX library is used.

Change-Id: I15b0954602b816bf4e88f48622494144fc77c14f
2013-11-20 17:55:09 -08:00
Naseer Ahmed
a978f955cc gralloc: Perform function to return custom stride
The custom stride can be set by video for smooth streaming.
Return this in perform so that graphics can use it.

Change-Id: I798fc0894b8d9662e93769a53a540cb61b527a44
2013-11-08 15:23:34 -08:00
Naseer Ahmed
69662ac981 gralloc: Move getAllocator in unlock
Call it where it is actually needed, as it may lead to
unnecessary logs in software composition

Change-Id: Ie0e266ee0710229f3cf15f8314e2ae4b4dc1ac94
2013-08-28 13:21:37 -04:00
Naseer Ahmed
ec1479886d gralloc: Fixes for software composition
Check that the buffer is actually an ion buffer
before calling clean. This is needed for the case
where the physically contiguous framebuffer is mapped.
That framebuffer memory is used for bringup.

Change-Id: I2db84d4bfc3465d995f12e0860be3cafa0d4a81b
2013-06-14 17:06:46 -04:00
Naseer Ahmed
aeab91f977 display: Use cache invalidate and clean correctly
Make sure cache is invalidated before reading in software and
cleaned after writing in software.

Change-Id: I91c471c47a5f1ff11f9960f08091a17ffe575534
2013-03-25 20:58:54 -04:00
Naseer Ahmed
c0593ea5ec gralloc: Stride information fix
The perform enum for the stride is defined in gralloc_priv so it
is OK to keep the case outside.

Change-Id: Id31556f76c2a2ae93a15a2e2dc4169b07360e4e6
2013-03-18 11:46:24 -04:00
Naseer Ahmed
a163b73bea display: Remove genlock usage
genlock is no-op from Android 4.2 onwards since the sync framework
is used for explicit synchronization.

Change-Id: Idd1df589516534a683e0fa1ef0cfbb7f0e411f67
2013-03-15 11:48:59 -07:00
Naomi Luis
a44100cafc libgralloc: Add Perform function to get the stride.
- Introduce a new class to Get the Adreno computed stride information.
This class has been added to allow adreno library computed strides to
be propagated to the allocation function as well as those clients
requesting it.
- Add a new Perform function to get the stride. The width and the format
can be passed from the calling functions (like EGL) to get the stride of
the buffer.

Change-Id: I4c2b4a02deff327f0ea5558c478997527fe9d3cf
2013-02-14 09:19:35 -08:00
Linux Build Service Account
961407fe41 Merge "display: Reconcile display HALs" 2013-02-13 10:16:51 -08:00
Duy Truong
73d36df685 Update copyright to The Linux Foundation
Change-Id: I145b66896159ff9886ed73507f17b3165ba0266d
2013-02-09 20:33:23 -08:00
Naseer Ahmed
7421472e5c display: Reconcile display HALs
Make the display HALs compile with/without the Qualcomm BSP
specific features so they can work with pure AOSP.
Change-Id: I1ad7282c4fe1fe7e3309afb530a07735f165ffbe
2013-02-09 08:29:49 -05:00
Ramkumar Radhakrishnan
7bf31c32c8 display: Reset metadata pointer to NULL during unmap.
Initialize metadata pointer in the buffer handle to NULL after
unmapping the buffer pointer

Change-Id: I930a2d21a6f259426949d7aa58bd07f1f58839c0
CRs-Fixed: 434388
2013-01-29 12:03:25 -08:00
Linux Build Service Account
55f775b442 Merge "Update buffer dimensions with new dimension" 2013-01-13 11:34:41 -08:00
Ramkumar Radhakrishnan
47573e20d5 display: Add display metadata in buffer handle
Allocate extra space for metadata in buffer handles
Provide api to map this space in client process and set the metadata

Change-Id: I8bca8448670d4aa88d439320faf402dae30458f8
2012-12-26 15:45:17 -08:00
Ramkumar Radhakrishnan
935cb684ca Update buffer dimensions with new dimension
Add case GRALLOC_MODULE_PERFORM_UPDATE_BUFFER_GEOMETRY in
gralloc_perform function to update the new buffer dimensions.

Change-Id: I7a855dc017dd042dda2abdc28c51ce5ec919fceb
2012-12-04 16:42:04 -08:00
Kinjal Bhavsar
139e162e34 libgralloc: remove pid checks
These pid checks seem to have been left over from PMEM days.

Change-Id: I1e504bc889b90d8fed6e0be47fd21d1e3f42c50b
2012-09-10 12:44:21 -07:00
Naseer Ahmed
01d3fd3318 display: Clean up gralloc
* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity

Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787
2012-07-23 12:39:29 -07:00
Naseer Ahmed
29a26818d7 qcom/display: Update HALs
- Update the display HAL from Code Aurora Forum
- Add updated overlay library
- Enable HWC with basic video going through overlay
- Cleanup some files

Change-Id: I65c687c51be458cee71213c79e03eeda962d9086
2012-06-21 11:52:07 -07:00
Iliyan Malchev
202a77d28a initial GL libraries for msm8960
Change-Id: I16451c70a079894ac326d3564d96f1fbafcd4f1b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-06-11 23:50:46 -07:00