Commit Graph

54 Commits

Author SHA1 Message Date
Prabhanjan Kandula
96dd6a36b9 Display: Overlay HAL changes needed for HDMI
-Add overlay defines needed by framebuffer
-enable compile time flag for HDMI

Change-Id: I5b9a8412c579a3a8cd0e0283dc5fd7e26266c170
2011-11-20 21:42:53 -08:00
Jeykumar Sankaran
e61c2f0a86 liboverlay: change in overlay due to overlay HAL removal
-- remove overlay.cpp and overlayState.cpp
-- change setParameter to setTransform

Change-Id: I6ec591810cbfe53e51b0c88ef547a2e687ea69b3
2011-11-18 02:04:18 -08:00
Naseer Ahmed
b4684bce38 overlay: Enable ION for rotator
Change-Id: I08f1cd0f8d49812ba8723a137913e386365c946a
2011-11-16 12:46:35 -08:00
Chetan Kalyan
7ab3fc97e0 Overlay: Change MDP format for YV12 buffers
Android uses different alignments for YV12 buffers.
Hence, introduce a new format (MDP_Y_CR_CB_GH2V2) for
such buffers.

Change-Id: I50ba8baf2696252fce513e455d94bfde460b0e51
CRs-fixed: 302752
2011-11-14 14:39:10 -08:00
Naseer Ahmed
724b651320 overlay: Add FB flag for UI mirroring
When the source for rotator is the
framebuffer, the FB flag needs to be set
to identify the type of memory to be used.

Change-Id: I4fc6112832ad42eb7092be5243653b9baf8a241a
2011-11-11 13:57:26 -08:00
Kinjal Bhavsar
6eb041de80 msm7k: Detect display type and mark layers
Mark layers for convert to S3D when playing S3D content on a 3DTV.

Change-Id: I355a73753682134b8ec5544a03d55ae40793e897
2011-10-25 12:23:11 -07:00
Naomi Luis
8afdc162ea Upgrades to the updateOverlay functionality.
Update the overlay when we have a channel up. Previously, we did updates
only when the width and height changed. Now, we always update the overlay
when the channel is open, and not close the channel to update parameters
such as orientation change, flags etc.

Change-Id: I0b2ef8b19bd860d5361c391e040ff497f1023ae3
2011-10-18 13:22:31 -07:00
Naomi Luis
8da83f0059 liboverlay: Use even crop values
The overlay hardware requires the values to be even. Calculate the ROI
to ensure that the crop rectangle is correct after making the
parameters even.

CRs-fixed: 302916
Change-Id: I7316a65efe2b72c5392a3d2adbb95070662dced9
2011-09-25 17:44:35 -07:00
Kinjal Bhavsar
48f7bb38a7 liboverlay: Add support for 3D panel
Detect and use 3D panel for 3D content. Use the virtual framebuffer
for 3D panel. Set position for overlay channels accordingly. Use
3D ioctl for line interleaving.

Add state machine for Overlay.

Change-Id: I28dc7ed99aed7ca2c53c93722c44279d9c7de9fc

Conflicts:

	liboverlay/overlayLib.cpp
2011-09-19 19:16:37 -05:00
Chetan Kalyan
4fc65b100d Overlay: Add debug logs to overlay
In case of failure, print out the values of the failed
overlay structure, to allow easy debugging.

Change-Id: I3e480b8eecc66b54f357b29d02064a751c9ebbfa
2011-09-19 19:16:37 -05:00
Omprakash Dhyade
6e3e6e0300 liboverlay: Use aligned width/height for source
The source buffers, width/height is aligned. Use
aligned width/height for the source buffer.

CRs-fixed: 285831

Change-Id: I4c367a03fea833674e03fcab5a38217f9f8c5e05
2011-09-19 19:16:37 -05:00
Arun Kumar K.R
0f0ea07983 liboverlay: Check if the destination values have changed in setPosition
In setPosition, make an ioctl call only when there is a change
in the destination values.

CRs-fixed: 296400
Change-Id: I9b059e226bf6f6cfd04fb563ac765e2583415157
2011-09-19 19:16:37 -05:00
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
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
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
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
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
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
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
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
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
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
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
Satya Durga Srinivasu Prabhala
64527a8af1 Cleanup copyrights in Makefiles
As per Copyright Markings guidelines, Makefiles shouldn't contain
any Copyright in them.

Change-Id: Iefa61b8713d2bfec21eb885dfe999b492da43681
2011-09-19 19:16:34 -05:00
Naomi Luis
73a28215fa liboverlay: Remove additional overlay SET ioctl calls.
The MSMFB_OVERLAY_SET ioctl gets called everytime there is a setSource called.
This is an expensive call and should not be done unnecessarily.

Change-Id: I2d9be394f48b9dea31b9f4f39b1b576c4ad42b47
2011-09-19 19:16:34 -05:00
Arun Kumar K.R
7017323f14 liboverlay: enable rotator only for primary display
Enable rotator only for primary if the panel type is MDDI

Change-Id: I513de9c022e2a92e8bcd8f683f332903f708e6fa
2011-09-19 19:16:34 -05:00
Omprakash Dhyade
a3742036fc liboverlay: Remove RGB specific checks
liboverlay assumes RGB format comes from UI,
which is incorrect. Remove RGB format checks.

Change-Id: I001d36dcc6bdec043c29b21c072be91bd45d4999
2011-09-19 19:16:34 -05:00
Arun Kumar K.R
1c9191bda5 liboverlay: Use rotator during video on MDDI panel
Always use rotator on the MDDI panel, irrespective
of rotation.

CRs-fixed: 271109

Change-Id: Ief0a7d3fc1bd3254ef50931cf7ee5c5bf02dfdee
2011-09-19 19:16:34 -05:00
Omprakash Dhyade
7e948c3238 overlay: Update startChannel function call
startChannel function prototype has changed.
One of the places it uses old signature,
update it with new signature.

Change-Id: Id0510187ffa13d7d750ad101030649134353b14b
2011-09-19 19:16:34 -05:00
Jeykumar Sankaran
5abeb9b1ea liboverlay: Calculate x and y values in setCrop on 180 degree rotation
This change calculates x and y values based on setcrop parameters and current overlay values on 180 degree rotation.

CRs-Fixed: 274707

Change-Id: Ibfe20c1a53e832424a880d99e73bd4a1c7b95173
2011-09-19 19:16:34 -05:00
Naomi Luis
c096d185f1 overlayLib: Add support for flipping the source
When the FLIP_H is passed, the overlay needs to flip the image along the vertical axis and similarly
when the FLIP_V is passed, the flip needs to happen along the horizontal axis

Change-Id: Iae31a1ca266e7e0bb9e598c88cb0728f35028052
2011-09-19 19:16:34 -05:00
Naomi Luis
8bd9729c72 overlay: Add S3D support over HDMI in the overlayLib
Change-Id: I1f650237f2de414fe248d4281ce22344049d2956
2011-09-19 19:16:34 -05:00
Naomi Luis
67b9bd9154 liboverlay: Set MDP_OV_PLAY_NOWAIT flag in overlay
Set the MDP_OV_PLAY_NOWAIT flag when there is a UI update during video playback

Change-Id: I0e71087a879fceaaab204bbd3acabcaaad676fe3
2011-09-19 19:16:34 -05:00
Omprakash Dhyade
553c4b501f overlay: Composition bypass changes
This change adds following to Overlay class
- is_fg, client could pass whether, FB need not be scaned.
- RGBX_8888 format is now supported.
- number of rotator buffers also could be passed which could be up to 3

Change-Id: I85519abc21e34642ef8f728948f1bd61f09a18cb
2011-09-19 19:16:34 -05:00
Naomi Luis
71a74457f1 overlay: Add support for flipping the source image
Add support for source horizonal and vertical flipping in the overlay.
Based on the final orientation and the flip information, set the correct
rotation value for the MDP.

Change-Id: Ie20022a8bf8f9725f01b4213b814cbe0af44625e
2011-09-19 19:16:33 -05:00
Naomi Luis
aedeaccc6a overlayLib: Set the MDP_OV_PLAY_NOWAIT flag for non RGB buffers
Change-Id: I6e3323cbc59125e1d52883c3a41d0950b3caefef
2011-09-19 19:16:33 -05:00
Naomi Luis
9c8bc18f79 overlay: Add support for enabling/disabling HDMI
Add support in the overlayLib to enable/disable and queue the buffers
to the primary or secondary based on the hdmi connected parameter.

Change-Id: Ie6c780e4076b0b84e6457a0503ec511ff2b8c452
2011-09-19 19:16:33 -05:00
Naomi Luis
5a1bf4cb9e overlay: Add support for additional S3D formats
Add support for Side-by-Side full, Side-By-Side-half formats in the overlay.
The Side by Side half formats could either be in Left-Right or Right-Left mode.

Change-Id: Ie1f0ccb5b1a8254f7256aafdd3f0ce9a3faa0df4
2011-09-19 19:16:32 -05:00