HWC 1.2 API passes down the plane alpha and the blending
operation to apply. Pass this information to the MDP.
Change-Id: I7fbd17345d9157aa654e4b1031ac3e26adf87f37
Define and Use mSecureLock in composition and binder
thread. This is to ensure both variables mSecureMode
and mSecuring are updated in binder thread without
any context switch to composition thread
Change-Id: Ibd701bd3363515e2f7e8a9711bbc5b66053cfa03
- cleans up external library
- add separate library for virtual display
- process virtual updates in its separate path
in hwc.
- Acquire blank mutex lock for one complete drawing
cycle
Change-Id: Ib984c578464a131ecdb27ee48960f58d68b7a5a7
This change was removed during re base
( original commit id: I266a87228193fd85252a22242b66dd4af5f3033f).
Bringing it back.
Change-Id: I625add1996ca98c47cedecbe8c9f27d298c5f079
Add assertive display support to hwc. This feature takes effect when
node /sys/class/graphics/fb*/ad is present. This signifies that that LM0
is being used with fb* for writeback.
When a video playback begins we write "1" to this node to indicate to
post processing that a writeback will happen. Likewise a "0" is written
to this node when playback stops.
The original contents are worked upon and the modified output is fed
via writeback to either rotator or mdp as appropriate.
The feature doesnt trigger when either:
1) Buffer size exceeds 2048
2) External display is connected
3) Multiple yuv streams are present
When this mode is active, MDP comp is applied only to yuv layer.
Change-Id: If5520f9dc849de3189c9f9ed4e9072c8f8f760e1
The external configuring flag should be set after holding locks.
Before opening FB for HDMI/WFD, composition should give up any
open external FB resources.
Locks should be held by composition for the entire duration.
Change-Id: I703f69f156c665bf422613567c00aae340f3ee12
If framebuffer needs to be configured, configure it before all the
other layers in mdp composition. This helps in cases where we are
out of SMPs and framebuffer configuration fails owing to that.
Framebuffer being the fallback path, should always get highest
priority when reserving SMP blocks
Change-Id: Ie7a6903d1b9fb98b308689c81522571449bf2e8e
move fbzorder initialization for external during display animation
from landscape to portrait from hwc.cpp to hwc_fbupdate.cpp.
Change-Id: I4dbac87fe56f8262356043865b61a982244cd72a
1. Since SF doesnt invoke blank for virtual display,
handle pipe clean up as part of Primary display
blank.
2. Support virtual display to query display attributes.
This refactor is done to address Framework reboot issue.
Change-Id: I266a87228193fd85252a22242b66dd4af5f3033f
Fix locking on wfd pause, resume events. Some variables are updated
without proper locks being held.
Fix external related lock in hwc to include complete prepare and draw
Mdp comp for primary, otherwise, ends up reading some flags without
locks.
Change-Id: I0f2f0953a7ab322128d044ca3458e359da4e575e
Locking here can lead to a delay in vsync disable/enable
where prepare/set is not yet completed. The HWC spec says that
eventControl needs to take effect immediately.
This lock was earlier present when we waited for SF to unblank
primary at startup and the vsync control ioctls could fail.
This is no longer necessary as we unblank primary on startup now.
Change-Id: I2bf18ae9235f8dd428a495a9a23af7f00f34ff1d
Implement sync for rotator.
If a buffer is rotated, it can be used by producer soon after
rotation (and it wont have to wait until vsync).
Mdp waits for the rotator buffer's release fence to signal
to start display.
Hwc waits for previous access to rotator buffer by MDP to finish
before using it
Change-Id: I5664806a17c44d58af62a2825ce454089fcd31cf
We need to call commit on wfd even if in paused state so that pipes
which are unset are actually unstaged from driver
Change-Id: Id71de8b80c44a632989de154a2387380d8fa66f0
When WFD is connected to 8x26
1) On Video transition, have 1 padding round if external connected.
Required to shift pipes across mixers.
2) Request DMA pipe always for FB on WFD.
Necessary for rotation + writeback
3) Disable non-worm-hole calcs on external (because of 2)
4) Disable action-safe calcs on external (because of 2)
Change-Id: I63b50b2477db443f9ea1d3fa610b59295c9359b7
In case of videos, do a fallback using 2 pipes per mixer at most.
This redraw will happen only once to reduce pipes from at most 4
to at most 2 and never draw again until there is an update.
Change-Id: I78c0dc2af4e3bd7e9128994e507e777187b4e247
Remove return statement from display commit failure and assign
the return value as -1 to avoid memory leak during error scenario.
Change-Id: I87dd73e997e016f89944bb1603b517847bbc555c
- When primary is animating, the animation should not be
shown on the external display.
- Mark all app layers as HWC_OVERLAY on external during
animation so that SF wont compose it on FB.
Change-Id: Ic557cabfd9f2518614777c0e993541e36e090850
If there are any EXTERNAL_ONLY layers present in the list, mark
them as HWC_OVERLAY such that SF does not compose and in hwc_set
post that layer to Ext display, ignore other layers
Change-Id: Ic5db3bfa88295167d23d1fb2be7640c9fc772054
This change is the hwc and copybit changes need to enable
composition to go through mdp on msm8610.
Change-Id: If0df3a247c5f4f4310966d14fe8fd839bf84b9d5
Reset idle fall back at the end of prepare, so that irrespective of
whether primary or external is configured first, both will fall back.
Change-Id: I6206f7cf0cccf71d1b33153044546515029f4e08
Acquire mExtLock before proceeding further in
hwc_prepare_external to prevent crashes arising out
of updating ctx variables from two different
threads(composition and uevent threads)
Change-Id: I0f18c41b117f18aeb25572b53ef6eba3638bb826
- Dump more info for BUFFER_SYNC ioctl failure case.
- Enable debug logs for blank/unblank display.
Change-Id: I289ed8ad39a0181ff4a404644b90cb02a8144b9a
In extreme cases, when all pipes are used, the buffer is insufficient.
Reduce logging by striping off unnecessary bytes.
Change-Id: I5a6ffb9ff288e389eea4e9ca4ac850ed59d539ff
Add support for tracking the mode in which DMA is being used in overlay.
Remove unnecessary tracking variables, and their set,reset inconsistency.
With such varibles in hwc, it still leads to overlay giving out DMA pipes.
Make overlay as the single tracking place.
Change-Id: Ib949f3d0ef5918ef323c81cb1768b68a68c83da4
Log a frame-by-frame succession of HWComposer layers' data and write
their buffers, if any, into raw or png files based on system property
values.
Change-Id: Icceccf5fff5ab4d78dbc6c28c11210b8837ddfd9
With this change we are moving MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.
- Mixed mode design is based on layer caching
- Mixed mode path is configured only when non-bypassing
layers are cached.
- Never allow mixed mode when FB needs to be udpated.
- If we cannot bypass all MDP comp marked layers, bail
out completely.
Change-Id: Ie08f39db07e032b537f042d0d2bfe772ebfed049
This is logged in the kernel and if there are excessive delays,
logged in the PowerManager.
Bug:8485194
Change-Id: Ia83b186ccae1fb6de59f200faf28346f84d832b6
- On suspend, SurfaceFlinger calls hwc_blank on primary and
external separately, inbetween these calls there might be a
update, which leads to acquiring overlay pipes for external
which will not be cleared and results in showing up stale
frame on external display
- This change clears all the overlay pipes used on every blank
Change-Id: I44d62b7d0fcd992cf8a26bb0c21df77952bc1381
CRs-fixed: 464070
This is indicative of how many frames are posted to the display
by SurfaceFlinger. Set debug.gr.calcfps to 1 and restart the
framework to enable.
Change-Id: Ic503c14380fd7d8a5b062aa5da0d61bfc3991cb2
CRs-Fixed: 462010
Even if we exceed max supported layers, configure pipe for FB
Because FB contents are always displayed using hwc
Also some minor code fixes
Change-Id: I740ab7e908c916373b1d87facd831e09098ce753
This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.
Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
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
-Add support for Video via overlay on 4k2k external panel.
-Add support for rotating videos on 4k2k panels. We use
pre-rotation in hwc to rotate a video into a single buffer,
irrespective of panel size. Then this buffer is fed to MDP.
Rotator objects are managed by the new RotMgr.
-Cleaup mdpcomp and overlay.
Change-Id: Ifb08534747e8e18b6c58dd8a3e1a9947409100f1
Sometimes vsync would not be disabled before the display is
blanked.
This was due to the vsync disable ioctl being kicked off in a
thread different from the event control which surfaceflinger
called. So, while the calls from surfaceflinger are in order, the
order of execution wasn't always the same. Hence, making sure
ioctls are called in the same context to ensure order.
Also
- Make blanking/unblanking logs show the operation as a string.
- Add a debug property to dump vsync timestamps (needs framework
reboot)
- Remove a log which showed delay in reading vsync. This log was
unreliable when vsync is disabled and we're still reading from
the sysfs node.
Change-Id: Ibec04e9ffebd0ac6e1d32b7031e3668abd9390ff
CRs-fixed: 443113