this brings us inline with cafs ics_chocolate branch
per: f696608c9d9e3b6b60a92423338f08d59d19d746
Change-Id: Ibaff05220e7d7f0ddd1b4d7507626a38d717340c
The current composition bypass implementation prevents the app frame rate from
being decoupled with vsync. As a result when a graphics application requests
EGL swap interval zero it is still limited by vsync. This change disables
composition bypass if any layers being composited for the frame are in
asynchronous mode.
CRs-Fixed: 335498
(cherry picked from commit 8e1a74ffff6a07ac9ef649347b7ac23be143f2ea)
Change-Id: Ia0b6b14fbc953b04616667a494d98fcca99932f9
- a NULL list parameter or a numHwLayers of zero indicates that the
entire composition will be handled by SurfaceFlinger with OpenGL ES.
- a NULL list parameter or a numHwLayers of zero indicates that the
entire composition has been handled by SurfaceFlinger with OpenGL ES.
In this case, (*set)() behaves just like eglSwapBuffers().
- dpy, sur, and list are set to NULL to indicate that the screen is
turning off. This happens WITHOUT prepare() being called first.
(cherry picked from commit 5047cf7b17c8546f33c432d67b3510a540a74391)
CRs-fixed: 336520
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I1eaa4b2360aea164ce389a9803bc1630b8fdf01c
Add support for external-only display. Layer buffers
marked with GRALLOC_USAGE_EXTERNAL_ONLY will be
displayed on external panel only, if available.
In addition if the layer buffer also has the flag
GRALLOC_USAGE_EXTERNAL_BLOCK then only that layer
will be displayed on external (During suspend).
When this mode is on, the default mirror mode for
external is stopped.
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I8ea2920384c5b68311ee3fe00707d01ab6568b52
If we have a single layer for composition which goes via the overlay,
we can disable disable the framebuffer fetch thereby saving power.
CRs-Fixed: 338777
(cherry picked from commit c40d887d714d14182e867e5eb7942160b3feb197)
Change-Id: I361f5d8a60fb478a675b47163b7524c79e66624a
This change fixes destination rect calculation for negative coordinates
Change-Id: I0174ae3b9643f74d60d559e84bc36bd9ec1d0caa
(cherry picked from commit 3620e365fe9ffcc8d3ec21691707d46e11bdb9ae)
This change allows 3 or less layer use cases to get bypassed completely via MDP pipes.
If more than 3 layers, all of them gets composited on FB.
Intended FB fallback cases:
1) 4 or more layers
2) Any MDP pipe is in use
3) Any layer needs rotation
4) Any layer is allocated from non-pmem
Change-Id: Ieb2b30b8ab9893fd68c7fc61ec889ac9a01cb7dd
(cherry picked from commit 001ffcfef1d63948926b1be67c4977d13ae1b159)
Conflicts:
libhwcomposer/hwcomposer.cpp
- During video playback, when the external display is connected,
start the overlay channel on the right framebuffer.
- set the correct position for the new external display channel
- fix minor bug in the function getAspectRatioPosition for external
display
CRs-fixed: 336674
(cherry picked from commit 6afc95ee1197718332461c8f0ddf9cf5f94cc7aa)
Change-Id: Ifa30dfea349c2a0f133790ab2dc91527d53152f8
- Add an interface to class Overlay to clean up the overlay
channels. This interface will query the framebuffer device, and
will free(UNSET) them if they are in use
- hwcomposer hal will call this API during initialization
(cherry picked from commit 0d03b1b823bbf36f7adb16bb4344fc46d8748c6a)
Conflicts:
libhwcomposer/hwcomposer.cpp
Change-Id: I4a4bedfdc409913ef31c1d5f5a869db730528096
When there is a state change, open/close only the required channels
instead of blindly closing all the channels. When HDMI is connected,
open the overlay for queueing the frames on the external, and when
hdmi is disconnected, only close the external overlay channel.
CRs-fixed: 333324
(cherry picked from commit a6b5ac4c385e03b3c798bb07d0d3ba6140aebbe8)
Change-Id: I7333a6fe106cd0aa99471542daf3c84c04c5d056
- HDMI has priority over Wifi display, if HDMI is connected during
Wifi, close the session for Wifi and start one for HDMI.
- the enableHDMIOutput parameter externaltype - HDMI/WIFI/OFF
Change-Id: If2cd9143fc7a953db49f38a6c166f9425ba5266e
Conflicts:
libqcomui/qcom_ui.cpp
This change allows the application to set the S3D format for the surface.
With this change application would be specifying 3D format and that would
be handled by hwcomposer would handle it appropriately.
Change-Id: I6b7b33712ab85b8a94231bd65a19709b3c2cd606
Conflicts:
libqcomui/qcom_ui.cpp
This reverts commit f2dbabe786.
This change is not needed any more because we are caching the MDP pipe
contents when closing the channel. So no need to wait for postFB finish.
Change-Id: Ia6f01c33953762cb7a97e0b2b795d9afeb60d2d9
(cherry picked from commit 441f1824593bb12a97508b426b597a16b35091e6)
S3D code is being conditionally compiled with HDMI_AS_PRIMARY.
So it is necessary to enable this flag, if board file indicates
HDMI as primary display
(cherry picked from commit dfc3782b8f23a6aadec9fd7501807778b0d3c542)
Change-Id: I3f6f84d76a3f7f5a3f83aa5ec31012b13b16431b
Layer orientation can be ignored since displayFrame always represents the
destination region in framebuffer orientation.
(cherry picked from commit f6ab48d14d32ba805fc25597533de14dae1c4e2b)
Change-Id: I0f9217e81a953a63cf9ea4ef9ddab25a1c67184e
-Check only for 90 or 270 degrees rotation and interchange
width and height if rotation is one of them.
-make scaling computations in float
CRs-fixed: 337370
(cherry picked from commit 460d7b96c06aa33d61b38d146f76887a49cd8057)
Change-Id: I30255e3926917896223dba7306df60ff7cfa14e2
When the HWC_SKIP_COMPOSITION is enabled, continue looping through
the layers instead of breaking the loop. Thus we are assured that
all overlay layers are always drawn.
Change-Id: Ia8d4c7003838cbb86e2f0ea8b5ef2d47516aa011
CRs-fixed: 333986
(cherry picked from commit 8c2a615a0a3d89a5830af3b8117115ae8071bd27)
(cherry picked from commit 11ea4a3635a347182f6b2f8f2ad6e3b394a13eda)
If there is any video layer below the HWC_SKIP_LAYER, we compose that
video layer using the GPU. Unlock any previous video buffer that were
sent to the overlay.
CRs-fixed: 333974
Change-Id: I1937ca8b139f40453a3bccb0b490fd4d65fa1f52
(cherry picked from commit 48a3996a2178244ce6365f97212c55e7ab33752a)
(cherry picked from commit f4a08165b2d3be97b72287fc4001cb5c90d57c07)
Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.
(cherry picked from commit 6503d323f9e113c0edf66e724bb422559ecbd5cb)
Change-Id: Ib8ea9a917896985d4f7d7ebf999222f2dc6f6480
This change allows composition to fall back to c2d even if the second
layer overlaps the base full screen layer.
CRs-Fixed: 326413
(cherry picked from commit b27338930d5bf3de17d03b06db6169e648d5e5fc)
Change-Id: Iaf1bf706fb216286047452173b58aeba1781cd9b
If there is a SKIP layer present, the SKIP layers are first composited
using the GPU. If there any layer below the SKIP layer that performs
any operations on the FrameBuffer, it results in undesireable results
on the screen e.g. artifacts, since SurfaceFlinger draws the SKIP layers
before the HWComposer.
Change-Id: I198236673e2a0bd19a6087ff01049061547abb47
CRs-fixed: 327392
Assign the correct blending value
for MDP 3.0, earlier it was
incorrectly assigned to zero
for cases where blending was not needed.
Change-Id: Icec6541616c8a9dc6ffc0e99c5b2936389799656
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
Align the copybit source and destination buffer according
to the frame buffer pixel format.
CRs-fixed: 327687
Change-Id: I00a0a047f2f6d639202e8395d85902b821e2a65c
When performing the setup for bypass operations, check the number
of bypass channels that are in open state. If the count does not
match the number of bypass layers, close all the bypass channels.
This is done to prevent the overlay channels from going into an
inconsistent/undefined state.
Change-Id: If471a4b4437e25642586616461c5d745f15b3287
CRs-fixed: 323676
Implement clearRegion for C2D/MDP/CPU composition. This prevents
glClear and therefore the glFinish from being called, thus
improving performance.
Change-Id: I03d9230e03cce11d9fe7e2bd34e4df8328ad2e00
If module composition type is MDP or C2D and we have a skipped layer
(usually layers without backing buffers, layers with "invalid"
orientations or debug layers), mark every HWC layer below this layer
for GPU composition.
This logic is needed because ICS SF composes a bunch of z-ordered
HWC_FRAMEBUFFER (GPU) layers first and then the remaining bunch of
z-ordered HWC_OVERLAY layers last which breaks the overall z-ordered
layer rendering requirement. This logic also holds valid for 2-layer
bypass in ICS.
Change-Id: I5082affac8affd6b19d78be827d149901945a163
Validate the previous overlay and bypass handles before unlocking
the buffers. The reason for doing this, is that in certain use cases,
after the previous handles are stored, the buffer gets destroyed and the
handle is now invalid. The HWC however doesn't know that the handle is
invalid and tries to unlock the handle, resulting in a failure.
CRs-fixed: 323614
Change-Id: I0f0c8506e7e22f9fc01eb28af0270f9c4587c787
Qcom specific private flags have been moved to libQcomUI. Use these
flags flags in the hwcomposer.
Change-Id: I9898dd11a7fff72678fa1f744454fcf310507a63
Since composition bypass uses MDP overlays, which
need physically contiguous memory, we cannot use
bypass in cases where the buffers are using ashmem
or other virtual memory. Hence, avoid bypass in
such cases.
Change-Id: I5c6d20e68e15719295373a1b0f3b930536336c43
Synchronize turning off of composition bypass with display,
so that close happens only after FB content is displayed.
This fixes blinks observed when bypass needs to be turned off,
for reasons other than video content.
Change-Id: Id98bddd0cb2a89ea8729a188934ae1cd947cf305
If the input parameters in the prepare and set functions are invalid, unlock
any previously locked buffers.
Change-Id: Ifd3b02c3ae6d2095970d5e15b98196d7fa7dee4e
CRs-fixed: 322054
Use genlock to lock the bypass buffers before they are queued to the
overlay. After all the bypass buffers are queued, use genlock to
unlock the previously locked bypass buffers.
Change-Id: Ifdd7921f0c9f5d5744c899a0257a4b954274334b