Commit Graph

131 Commits

Author SHA1 Message Date
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
c5e6fb0fd3 gralloc: Align protected allocations with the spec
The specification for GRALLOC_USAGE_PROTECTED indicates that
allocations with that flag must be protected by securing with
hardware. If such protection is not possible, the buffer must not
be composited. In our current software only the MM_HEAP is
secured. If we allocate protected buffers from any other heap we
block those from being displayed.

CRs-fixed: 465012
Change-Id: I9d47aba3d28192db3fcc394fd6b38efe42ae118b
2013-03-22 17:10:30 -07:00
Linux Build Service Account
0ebd0cd967 Merge "display: Fix merge issue in jb_mr1" 2013-03-21 16:47:12 -07:00
Linux Build Service Account
e31cb8a33e Merge "gralloc: Stride information fix" 2013-03-19 19:25:50 -07:00
Naseer Ahmed
66e9788c6c display: Fix merge issue in jb_mr1
Slightly different version went on jb_2.5 which caused a
mismatch. Escaped testing because FB HAL is not used.

Change-Id: Ia7ee2fb80bf937499d372383641f71530dc1feca
2013-03-19 20:42:11 -04:00
Linux Build Service Account
15ccd3d679 Merge "libgralloc: Change CAMERA_HEAP to ADSP_HEAP" 2013-03-18 23:11:55 -07:00
Jeykumar Sankaran
c1f8682f7b display: Remove framebuffer HAL usage
This patch removes the usage of the framebuffer HAL which is
deprecated in JB MR1 onwards. The code is left for compatibility
such as conformance tests but it is unused for normal display
usage.

Change-Id: If98133bdaa759cdc41d4503ff695b225ee43cb6f

Conflicts:

	libhwcomposer/hwc_utils.cpp
2013-03-18 16:38: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
Naseer Ahmed
eb2e105188 gralloc: Fix incorrect flag usage on old ion API
The secure flag gets sent only with the new ION API

Change-Id: Ia649500474b0c8384f4b45d599fcff54644005aa
2013-03-13 09:32:05 -04:00
Arun Kumar K.R
0daaa99ee9 libgralloc: Change CAMERA_HEAP to ADSP_HEAP
This changes GRALLOC_USAGE_PRIVATE_CAMERA_HEAP to
GRALLOC_USAGE_PRIVATE_ADSP_HEAP as the CAMERA_HEAP
is not used anymore

Change-Id: I5a95f68c4c7f4445ade2398dd239faad9ed16b22
2013-03-12 15:35:57 -07:00
Naseer Ahmed
2ea027b04c gralloc: Allow IOMMU memory to be uncached
The IOMMU heap can give us uncached memory, so remove this
erroneous check.

Change-Id: Ie141c55821221a1c2f75b7cf2248794d93ea6c6a
2013-03-07 08:23:34 -08:00
Naomi Luis
01f5c8eacb libgralloc: Get the stride information from libadreno_utils.so
libadreno_utils.so is an adreno utility library. It computes the
optimal stride required for a surface of a particular width and
bpp. Using this computed stride allows us to efficiently use the
dual memory channels and increase performance.
Currently the utility library only computes the optimal stride
for RGB surfaces.

Change-Id: I0f70bd11602a5144515ab07c3bd2b80a01586a06
2013-02-15 16:55:51 -08: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
Linux Build Service Account
87293b70be Merge "hwc: Call MSMFB_DISPLAY_COMMIT even if FB handle is null." 2013-02-12 10:07:47 -08:00
Linux Build Service Account
d46feac0cb Merge "gralloc: Do not set ION_SECURE for non-contiguous heaps" 2013-02-12 10:07:40 -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
Naseer Ahmed
4b9784ea29 gralloc: Do not set ION_SECURE for non-contiguous heaps
The GRALLOC_USAGE_PROTECTED flag is being used for non TZ DRM
if non contiguous heaps such as IOMMU are used. Hence do not
set the ION_SECURE flag for such heaps as they cannot be secured
through trustzone.

Change-Id: I48e9460ef66abb827c9df1b3c55037e8e4214f81
2013-02-07 14:24:04 -05:00
Saurabh Shah
4333330e11 hwc: Call MSMFB_DISPLAY_COMMIT even if FB handle is null.
Call MSMFB_DISPLAY_COMMIT for primary FB even if FB handle is null.
This is already done for external FB.

Change-Id: I5c405f933ce0fd99df6813acea45169802c54226
2013-02-06 14:01:16 -08: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
bdc2fdc30a Merge "gralloc: Remove update rect" 2013-01-17 21:36:04 -08:00
Sushil Chauhan
7651a80dc9 display: Use GRALLOC_USAGE_PROTECTED to indicate secure content
For secure content, use GRALLOC_USAGE_PROTECTED flag instead of
the obsolete flag GRALLOC_USAGE_PRIVATE_CP_BUFFER.

Change-Id: I69bf8cfd3a978fd472608beb44056e1bf55c1414
2013-01-15 16:50:57 -08:00
Naseer Ahmed
6f8ca315d8 gralloc: Remove update rect
SurfaceFlinger does not use this feature any more.
Removing this to avoid usage of reserved flags.
If this is needed again, it can be added with metadata
in the display commit ioctl

Change-Id: Iaf3f14a910ad64c83abb0910fad4a999b663c545
2013-01-15 16:55:06 -05:00
Linux Build Service Account
8714496fd4 Merge "libgralloc: force 1M alignment for secure buffers" 2013-01-15 04:09:58 -08:00
Linux Build Service Account
ad2322ad97 Merge "hwc: Add support for copybit(C2D) composition" 2013-01-14 21:02:10 -08:00
Linux Build Service Account
55f775b442 Merge "Update buffer dimensions with new dimension" 2013-01-13 11:34:41 -08:00
Ken Zhang
6e6f9a907e display: use metadata ioctl to get panel frame rate
Get rid of using reserved fields

Change-Id: Ia3ada294427812e8382f744964f475403f6fb73a
2013-01-11 19:51:47 -05:00
Praveen Chavan
4e931c1d7d libgralloc: force 1M alignment for secure buffers
Align secure buffers to 1M alignment as TZ expects this for
protecting the buffers, MDP5 onwards.
Update the buffer-size to the same alignment used.

Change-Id: I369932a4a72b28c05a3ea216a8bba681de1f9dad
2013-01-10 14:23:02 -08:00
Arun Kumar K.R
361da4fde0 hwc: Add support for copybit(C2D) composition
- Add CopybitEngine to hwc_context
- draw the layer on the HWC_FRAMEBUFFER_TARGET using
  copybit(c2d) if it qualifies for C2D composition.
- use fence returned from the copybit during c2d
  composition

Change-Id: I052da015cd031f7abd6411d83d7944c335caeff7
2013-01-10 12:29:10 -08:00
Linux Build Service Account
f51bfae5ee Merge "libgralloc: Add support for custom buffer size." 2013-01-08 18:08:13 -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
Sushil Chauhan
73dcce48d6 libgralloc: Calculate aligned width & height using common header
For Venus, calculate aligned width & height using common header.

Change-Id: I622fee19693cfc550796d5949185c146c6a7f173
2012-12-20 14:44:55 -08:00
Sushil Chauhan
e8a01791fe libgralloc: Import header for Venus buffer size calculation
Import the common header file with Venus alignment requirements
to calculate venus buffer size.

Change-Id: I86cba91de8f7a3845a4592243b4f21e7cda03315
2012-12-20 14:43:34 -08:00
Sushil Chauhan
c5e61488bf display: Add support for Venus color format for newer platforms
Change-Id: I4c9a327bd30d1321e1f8383ffc1ca978efc8e9b9

Conflicts:

	liboverlay/overlayUtils.h
	libqdutils/gpuformats.h
	libqdutils/qcom_ui.cpp
2012-12-20 14:38:57 -08:00
Ramkumar Radhakrishnan
3d4c0ac4f2 libgralloc: Add support for custom buffer size.
Init allocSize hook function with alloc_size function

Change-Id: I514d47928f10b6c41404aa19d8b704f64327211b
2012-12-19 14:54:00 -08:00
Linux Build Service Account
62f0399f53 Merge "gralloc: set ION_SECURE to flags instead of heap_mask during ion alloc." 2012-12-17 17:35:36 -08:00
Linux Build Service Account
d74f5f3e4c Merge "gralloc: Mark framebuffer as ION memory" 2012-12-15 21:35:59 -08:00
Linux Build Service Account
9f4b113d8b Merge "display: Standardize log-tags for qcom display logs." 2012-12-15 21:35:56 -08:00
Linux Build Service Account
109ab1ee85 Merge "display: Add target specific flag to support Venus color format" 2012-12-15 15:54:08 -08:00
Linux Build Service Account
9b9126225a Merge "libgralloc: Change ion_allocation_data fields." into jb_2.5 2012-12-13 18:56:09 -08:00
Linux Build Service Account
3b7e99747e Merge "libgralloc: Use ION_IOC_CUSTOM instead of MSM-specific ioctls" into jb_2.5 2012-12-13 18:56:07 -08:00
Naseer Ahmed
d7f842768a gralloc: Mark framebuffer as ION memory
Change-Id: I859d4d03b62279b7e66ba52e3215fe7394a63434
2012-12-13 13:20:04 -05:00
Mathew Karimpanal
dec98cc96e display: Standardize log-tags for qcom display logs.
Change-Id: I75bc2d8db8d64994097d6b744f357c29c9a5717a
2012-12-12 17:49:17 -08:00
Sushil Chauhan
c6bd6d92c2 display: Add target specific flag to support Venus color format
Venus color format is not supported on older platforms. Add target
specific flag in display hal and define Venus macros to zero for
older platforms.

Change-Id: I38141ae870e255a0e54ce9fde46fe6cc3415f179
2012-12-12 17:00:09 -08:00
Amara Venkata Mastan Manoj Kumar
c180c4eba4 gralloc: set ION_SECURE to flags instead of heap_mask during
ion alloc.

  This is required for Secure Playback usecase.

Change-Id: I590bf126a35465286a9487490a114af82732e262
2012-12-11 17:46:57 -08:00
Ken Zhang
3f2323fbbe hwc: Remove buffer_fence definition as it is not used
Change-Id: If5f4beceda0229c9f48b6b1ee74e23a95f14863a
2012-12-10 17:56:17 -05:00
Saurabh Shah
d95c4083cc libgralloc: Change ion_allocation_data fields.
Change ioc_allocation_data structure fields as per changes in kernel.
The 'heap_mask' feild will hold what the older flags field held.
The 'flags' field will hold the caching information.

Change-Id: Id3b2e8a4d1ba370e0f982860fdb32b56227e2e43
2012-12-10 14:53:41 -08:00
Saurabh Shah
ece296ec98 libgralloc: Use ION_IOC_CUSTOM instead of MSM-specific ioctls
Use ION_IOC_CUSTOM instead of ION_IOC_CLEAN_INV_CACHES.
ION_IOC_CLEAN_INV_CACHES is now specified as a command argument of the
ION_IOC_CUSTOM ioctl.

Change-Id: I5b59ba1032364dfb884a90abf2ee2b35f3c09dd6
2012-12-10 14:53:40 -08:00