Fix swapinterval 0 support in class OverlayUI. The missing property
check for swapinterval is added to the new setDisplayParams API.
Change-Id: I3a7cb843f79afa213eb2f88b80e21249f64d61d0
Refactoring is necessary to attain flexibility in setting mdp overlay params
at runtime, while using composition bypass.
This change includes new APIs for setting crop rectangle, display params and
commiting mdp params, namely setCrop(), setDisplayParams() and commit(),
respectively.
Change-Id: Id57035602baabd954fd6b484be4f63fef632d74b
Check the is_fg flag along with the other parameters in checkOVState.
This is done so that the is_fg flag can also be updated even if there
are no updates to the geometry.
Change-Id: I82874d01c11eb85fb444c2bdbc50f586db683481
UpdateOverlay source didn't have any support for interlaced content.
Add the required support. Create a new function to check if the content
is interlaced.
Change-Id: Ie47b7669461f773b55c71cad6978fc1c8cf4e91b
When queuing buffers using the overlay:
- Set the NO_WAIT flag for the HDMI channel.
- Set the WAIT flag for the primary channel.
- Queue the buffer on the HDMI first.
- Queue the buffer on the primary.
- Wait for the HDMI Vsync.
Change-Id: Id24e9551230b7a7134bd21a7b3a9e8658f7de222
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
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
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
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
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
In case of failure, print out the values of the failed
overlay structure, to allow easy debugging.
Change-Id: I3e480b8eecc66b54f357b29d02064a751c9ebbfa
The source buffers, width/height is aligned. Use
aligned width/height for the source buffer.
CRs-fixed: 285831
Change-Id: I4c367a03fea833674e03fcab5a38217f9f8c5e05
In setPosition, make an ioctl call only when there is a change
in the destination values.
CRs-fixed: 296400
Change-Id: I9b059e226bf6f6cfd04fb563ac765e2583415157
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
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
Add support in the overlay for the YV12 color format.
(cherry picked from commit 0f9a27cc39b6d4202b54059bc7c64eea9efcf3f1)
Change-Id: I4b57eb383ca8f728243bd7e397696932e26c8889
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
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
This change addresses following:
1. Add new classes for comp. bypass.
2. Remove comp. bypas specific code from exisiting flow.
Change-Id: Id9424b42a9a113cfbb18ceac8d59bbe07ea8e773
This is necessary to adjust aspect ratio based on the crop, since
src values are modified in crop.
Change-Id: Icfb20df5b6ac4e93dfa85b73c4f74b738a4d3e59
CRs-fixed: 290069
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
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
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
The MDP kernel interprets the CRCB enum opposite to what Android
interprets it. Set the correct MDP enum value.
Change-Id: Iba9744fadadc42467dbf8979d6ed7d896c00ca10
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
- The ioctl call from getOrientation is removed.
- In gralloc use getOrientation instead of storing the
orientation.
Change-Id: Idb08568ff5d46ce99e0a9a8c6f492b90bb666f0c
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
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.
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
When getting the MDP format in the setSource api, separate the
color format from the interlace information.
Change-Id: I6a92d2d6d2c9f70b0c0bd6486227032716f70914
CRs-fixed: 282157
- Use rotator buffer for UI mirroring on HDMI
- Avoid ioctl calls on getPosition
CRs-fixed: 278858
Change-Id: Id390e2b85fe939d8388ed17f5f9c7fcd30499755
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