Commit Graph

787 Commits

Author SHA1 Message Date
Naomi Luis
ea1c22ccde liboverlay: Reset rotation information during updates
When updating the overlay source information, reset the rotation
information as this would be set during the setParameter call.
Also ensure that the HDMI doesn't have any orientation set.

Change-Id: I7a8ae96f27046deeed32f968061cc524d57cbfa3
2011-09-19 19:16:36 -05:00
Chetan Kalyan
a9181ba303 OverlayLib: Set format to non-tiled if rotated
Rotator outputs non-tiled formats. Hence, if there is rotation,
tiled format needs to be set to non-tiled and aligned properly.

Change-Id: I88335ad49c2f7446aa5fa71db80f6051c02bb5ff
CRs-fixed: 290428
2011-09-19 19:16:36 -05:00
Naomi Luis
3ae7f52726 libgralloc-qsd8k: Support for additional gralloc usage flags.
Add support for the GRALLOC_USAGE_EXTERNAL_DISP and the
GRALLOC_USAGE_PROTECTED usage bits. If any of the two usage bits are
set, we need to send the buffers to the overlay.
Since we send the buffers to the overlay, we need to allocate these
buffers from the PMEM region.

(cherry picked from commit 195345cd63f0e19cfee4cf055587d5fffe76d0ef)

Change-Id: I64116b9be07c8ddadbd5a132ef21b19e5326737b
2011-09-19 19:16:36 -05:00
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
49dbd79cf7 Add overlay_buffer_info structure to hold the buffer geometry
The overlay_buffer_info buffer geometry and size. When calling the
overlay from the gralloc or hardware composer, populate this structure
with the information from the gralloc handle.

(cherry picked from commit 128adc3b8177ef72f2bf21f4022d7ef06ed9281b)

Change-Id: I2f60f691ac01e67f150c753f168be754b14f94e6
2011-09-19 19:16:36 -05:00
Saurabh Shah
cb098e76e8 Handle overlay setup failure
Separate overlay setup and overlay play.
On setup failure, mark the layer to use C2D if enabled.
Else mark the layer to use GPU.

CRs-fixed: 292398
(cherry picked from commit b1459b0b1106ed66810b1c5a09878fae353c123c)

Change-Id: Id4c27384193612ab13e87d18492b0fef662eb8b4
2011-09-19 19:16:36 -05:00
Saurabh Shah
fc966d1448 Remove FPS calculations from userspace.
The FPS is stored in reserved[4] field of fb_var_screeninfo
structure. Read directly from this field.

CRs-fixed: 283750
(cherry picked from commit 0dec3f333db5b58c5ddd9c65fb7fd5c61cc5ef59)

Change-Id: I26632dc489ed8a95502b9071fed5b7527b33e54d
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
4066a02c83 libhwcomposer: Honor the HWC_DO_NOT_USE_OVERLAY flag
If SurfaceFlinger marks a layer with the HWC_DO_NOT_USE_OVERLAY
flag, do not use the overlay to draw the layer

(cherry picked from commit 9271a839b6bbbdc7b22bd7f1dca6f4c0c63de965)

Change-Id: Ie44586a1254a2dc2ad41ae902debc5bb442cbfde
2011-09-19 19:16:36 -05:00
Naomi Luis
3a6d435d35 liboverlay: Set the correct FLIP information
Android expects the flip to be done before the rotation. The rotator
however performs the rotate operation first followed by flip operations.
Set the flip information to take this into account.

Change-Id: Ib59a08e72fad522b0cf70c2ac2c434e19683c356
CRs-fixed: 289118
2011-09-19 19:16:36 -05:00
Naomi Luis
07e8ae7fe4 libhwcomposer: Skip composition if there is no UI update
If we have only one overlay layer, and the rest of the layers
are not updating, set the HWC_SKIP_COMPOSITION flag to inform
SurfaceFlinger not to compose anything. Also skip the drawing of
any UI frames and swapping the buffers.

Change-Id: I2f6554c905756a08880cba531c0210a58396179b
CRs-fixed: 289477
2011-09-19 19:16:36 -05:00
Sushil Chauhan
d739bf81ce copybit_c2d.cpp: Return the correct status in open_copybit()
The patch sets the status as COPYBIT_FAILURE in case of an error in
open_copybit() as it needs to return the correct status. It also sets
the copybit device handle as NULL.

Change-Id: I3c35d163049763427ad92030cb1d88d72f7680fb
2011-09-19 19:16:36 -05:00
Omprakash Dhyade
dac6f95b56 liboverlay: comp. bypass changes.
This change addresses following:
1. Add new classes for comp. bypass.
2. Remove comp. bypas specific code from exisiting flow.

Change-Id: Id9424b42a9a113cfbb18ceac8d59bbe07ea8e773
2011-09-19 19:16:36 -05:00
Jeff Boody
9d25efb361 libhwcomposer: return error if Android native buffer is null
Change-Id: I78d35779aa0d15086828ad1cf10ce6ff8b844336
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
Saurabh Shah
3ce61a332f Set Position for HDMI in setPosition
This is necessary to adjust aspect ratio based on the crop, since
src values are modified in crop.

Change-Id: Icfb20df5b6ac4e93dfa85b73c4f74b738a4d3e59
CRs-fixed: 290069
2011-09-19 19:16:36 -05:00
Saurabh Shah
58c70bc3e5 Fix positioning of small videos.
Small videos (width < 128) have their stride as 128. For HDMI
destination position was set only once, before the actual width was
supplied through crop. Now the position is set during a setPosition
API call.

Change-Id: If49ac23b9294951aaf4ad9d5432653082b4a7802
CRs-fixed: 286953
2011-09-19 19:16:36 -05:00
Naomi Luis
c17c053935 libhwcomposer: Disable alpha if layer blending is disabled
If the layer blending has been disabled, disable copybit alpha so
that copybit does not perform any blend operation.

Change-Id: I9a83fad0f126adaf9540bc72d17e7dcb1c55cd0f
CRs-fixed: 288527
2011-09-19 19:16:36 -05:00
Naomi Luis
371fe1a442 liboverlay: Update overlay and rotator during resolution change
Whenever there is a resolution change, update the overlay, rotator
paramters. Map the rotator memory according to the new size required,
and unmap the previously mapped memory.
Change the size calculation for NV21 formats, since the gralloc
allocates memory which is rounded up to the next 4K.

Change-Id: Idb4037422cbd80083e6ba14f229511a17cb61873
CRs-fixed: 287347
2011-09-19 19:16:36 -05:00
Naomi Luis
c004f71e01 liboverlay: Remove RGB specific checks
liboverlay assumes RGB format comes from UI,
which is incorrect. Remove RGB format checks.

Change-Id: I4d3f69db272b0a229fbd449c9c8863d77e7b0a2f
2011-09-19 19:16:36 -05:00
Naomi Luis
49f32e10cb libhwcomposer: Use layer alpha value
Set the copybit plane alpha equal to the layer alpha value.

Change-Id: Idcb5a23cc5e99061ddd31a3da7bedda2867d579d
CRs-fixed: 288257
2011-09-19 19:16:36 -05:00
Kinjal Bhavsar
1b51063e0d liboverlay: Add TV detection and monoscopic display for S3D
Add the state machine for overlay configuration. When connected,
check whether the TV on HDMI is 3D capable or not using the EDID
info. Show L channel on primary panel; and R channel on 2D TV if
non 3DTV is connected via HDMI, else switch TV to 3D mode.

Change-Id: I3109f8b0b81a8f5ad542db038262fd668e225e96
2011-09-19 19:16:35 -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
7c3d92ed0b libhwcomposer: Handle HDMI disconnect event
- Inform the gralloc of the HDMI status.
- If the HDMI is disconnected, close the overlay and also inform the
gralloc that video mirroring has stopped.

Change-Id: Ie89ffe860c0f9c9142d6c7f5d7a6c555884561ce
CRs-fixed: 286954
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
b078d08fdc overlay: Set the correct MDP format enums
The MDP kernel interprets the CRCB enum opposite to what Android
interprets it. Set the correct MDP enum value.

Change-Id: Iba9744fadadc42467dbf8979d6ed7d896c00ca10
2011-09-19 19:16:35 -05:00
Sravank
9d4f87e88c libOverlay : Set correct crop values for overlay with flip
When front camera is in use, overlay is created with 90 degree
rotation and vertical flip. This change considers 90 degree
rotation with flip, and updates the crop rectangle accordingly.

CRs-Fixed : 283348, 284193

Change-Id: Ia0d7830f12d607ae698b019396cd0e2bef168a6a
2011-09-19 19:16:35 -05:00
Arun Kumar K.R
1b5cb629f4 hardware/msm7k: Remove ioctl call from getOrientation
- The ioctl call from getOrientation is removed.
- In gralloc use getOrientation instead of storing the
  orientation.

Change-Id: Idb08568ff5d46ce99e0a9a8c6f492b90bb666f0c
2011-09-19 19:16:35 -05:00
Naomi Luis
de3c0ac14e overlay: Reset the rotation flag
Reset the MDP source rotation flag if there is no 90/270 degree
rotation.

Change-Id: I36ef62e52213149f7ce84677534de969d18972a4
2011-09-19 19:16:35 -05:00
Chetan Kalyan
16b703db64 liboverlay: Set overlay src format for tiled input
Rotator always outputs non-tiled formats.
For tiled inputs,if rotation occurs, set overlay's input
to non-tiled format.

CRs-fixed: 278408
Change-Id: I20e8a4109903f3162aa80f94a8c90ecd70e15772
2011-09-19 19:16:35 -05:00
Naomi Luis
95c239e6be copybit_c2d: Set the C2D_FORMAT_PREMULTIPLIED format for premultiplied surfaces
Set the premultiplied format for the source and destination formats if
COPYBIT_PREMULTIPLIED_ALPHA has been enabled

Change-Id: I89113a1f1160b921d8e49b5dd6fc01001307648f
CRs-fixed: 279449
2011-09-19 19:16:35 -05:00
Naomi Luis
c99d13825e libhwcomposer: Enable COPYBIT_PREMULTIPLIED_ALPHA if the layer blending is premutliplied
Change-Id: Iefe0ddeaa20b4411074079bc77ac17cc0e38c27e
2011-09-19 19:16:35 -05:00
Naomi Luis
9c2ba115fd Add support for dynamic resolution change with overlays
Whenever there is a change in the buffer geometry, set a flag in the
gralloc handle stating that the buffer geometry has changed.
In the HWC, whenever we encounter an update in the geometry, if the
channel is already open, we just call the necessary ioctls to update
the overlay information and not unnecessarily open/close channels.

Change-Id: I27db8fc497ebc514e262d6b7854739f312644714
2011-09-19 19:16:35 -05:00
Naomi Luis
56a78ad233 libhwcomposer: Add support for maintaining original resolution
When the layer flags are marked to maintain the original surface
resolution, draw the layer using the overlay.
Store the HDMI status in the overlay object instead of the HWC
context.
2011-09-19 19:16:35 -05:00
Naomi Luis
f60705b3f4 overlay: Inform the overlay of source rotation
If there is a 90 or 270 degree rotation, inform the overlay that
the source has been rotated.

CRs-fixed: 281389
2011-09-19 19:16:35 -05:00
Naomi Luis
0818f64a0e copybit_c2d: Disable alpha for the RGBX format
Set the C2D_FORMAT_DISABLE_ALPHA for the RGBX format.
2011-09-19 19:16:35 -05:00
Naomi Luis
f90406e9e1 copybit_c2d: Use the framebuffer stride to calculate position
Use the framebuffer stride instead of the framebuffer width when
calculating the position for rotation.

CRs-fixed: 280765
2011-09-19 19:16:35 -05:00
Naomi Luis
2e44876757 libgralloc-qsd8k: Add perform api to update the handle
The new perform api will update the width, height and
format of the buffer in the gralloc handle.
The GRALLOC_MODULE_PERFORM_DECIDE_PUSH_BUFFER_HANDLING perform
is not longer used in Honeycomb. Remove unused code.

CRs-fixed: 283849
2011-09-19 19:16:35 -05:00
Naomi Luis
9ff34af7fa copybit_c2d: Disable blend during blit
When performing the copybit blit operation, do a blind blit of the
surfaces. The blending operation should be done when the stretch operation
is invoked.
2011-09-19 19:16:35 -05:00
Naomi Luis
8818296680 libhwcomposer: Use sanitized kernel headers
(cherry picked from commit 68e70474c2acaf35e42c4656e19d5f35012d0d70)

Change-Id: I8f77453d64f1c2c1e974b96c0727616bf0a8bf87
2011-09-19 19:16:34 -05:00
Kinjal Bhavsar
cc2834b226 msm7k: Use sanitized kernel headers
Add the exported sanitized kernel headers to include path in C2D/
copybit, gralloc and overlay HAL libraries.

(cherry picked from commit a70f426e8695cc5bbf8a45b987b5715784f7e924)

Change-Id: I1dbb79a086e9cb062e1264c1c354ac5ce1a05f27
2011-09-19 19:16:34 -05:00
Eric Holmberg
6c4791e9c6 librpc: added support for subsystem restart.
(cherry picked from commit ba5dd9bcac86d2c4b6614ea614d9d01e9d5b30cf)

Change-Id: I5a5ca2ed49970ead5a6ba0f2ac161380c429bcde
2011-09-19 19:16:34 -05:00
Harshad Bhutada
b10f481ae2 libgralloc-qsd8k: disable framebuffer state related error reporting when swapinterval set to 0
Change-Id: Idf0d8b7d261240f6300c5df805cc42dee8098310
2011-09-19 19:16:34 -05:00
Naomi Luis
3ea7a7fc38 overlay: Separate the interlace information from the color format
When getting the MDP format in the setSource api, separate the
color format from the interlace information.

Change-Id: I6a92d2d6d2c9f70b0c0bd6486227032716f70914
CRs-fixed: 282157
2011-09-19 19:16:34 -05:00
Arun Kumar K.R
ed35d42ee4 liboverlay: Always use rotator for UI mirroring on HDMI
- Use rotator buffer for UI mirroring on HDMI
- Avoid ioctl calls on getPosition

CRs-fixed: 278858
Change-Id: Id390e2b85fe939d8388ed17f5f9c7fcd30499755
2011-09-19 19:16:34 -05:00
Kobi Cohen Arazi
e825316b00 Revert "liboverlay: Use rotator during video on MDDI panel"
This reverts commit b2809b02b6dfc5111150d178135673eb535c4ff5.
CRs-fixed: 271109, 278129, 273572

Change-Id: Ie50679b6600e7151cac17136a322009b80b55871
2011-09-19 19:16:34 -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
Ravi Kumar Alamanda
62955d9fc4 libaudio-msm8660: Support audio routing to HDMI
- Contains audio routing to HDMI using HDMI device introduced by Google.

Change-Id: I0e8d136e1eb6a016e42135dd6d43e8fc55966d04
2011-09-19 19:16:34 -05:00
Ravi Kumar Alamanda
9ca5e8f394 libaudio-msm8660: Merge Audio HAL and AudioPolicyManager fixes from GB
Change-Id: I3847295182055ada26e75ff354013316d0633159
2011-09-19 19:16:34 -05:00
Arun Kumar K.R
e10754c16c gralloc: Avoid multiple signals from videoOverlayStarted
Signal hdmi_ui_loop from fb_videoOverlayStarted only if there is a
state change

CRs-fixed: 279095
Change-Id: I43bc87b4d78fae139bcfc0318ad8b271a6a325c7
2011-09-19 19:16:34 -05:00