* For HDMI and non-Hybrid WFD solution, on receiving
online event, display hal sends hotplug connect to SF.
* In case of such displays, set them as active only
after receiving an unblank call.
* For Hybrid WFD solution, since display hal will not
be receiving unblank call from SF, set it as active
as part of processing online event itself.
Change-Id: I319f1576cba954da2024680568c37fedb1eb5d43
1. During PAUSE event, trigger an invalidate frame
which will unset the pipes (in draw call) and invoke
display commit as part of hwc_event thread.
This is required to avoid iommu page faults arising when
WFD encoder is in the middle of configuring buffers
and providing to Writeback as part of RESUME event and
Display HAL tries to invoke display commit as part of PAUSE.
2. Allow usage of rotator for Primary when WFD is in Pause
state.
The above changes are required to support secure/non-secure
video playback on HDCP WFD session and Pause/Resume.
Change-Id: I7391ae4cc7cd8b968873996a1a00fee5fbe6039c
1. As part of Writeback class implementation, display commit is
implemented in Overlay class.
Replace display_commit function with Overlay::displayCommit
function.
2. Fix return value of hwc_blank function
Change-Id: Ie54fa9876495608a60216025e57cf4de7f6cb03c
Remove the unnecessary blank lock, mdp comp lock, secure lock.
Rename the ext lock to a more appropriate draw lock.
The mdp comp lock is at an incorrect place and causes unwanted
objects to show up in dumpsys, since configDone hasnt cleaned
them up yet.
dump(), blank(), draw() should all acquire a common lock.
draw() includes prepare() and set().
Change-Id: I595547dd5a393a8af6cd8c9297d50793b715e658
Force pipes of a display, whose geometry has changed, to pass
configuration arguments using MSMFB_SET_IOCTL. This helps the driver
make additive bandwidth calculations and reject the frame if the
requirements go beyond what the hardware can support.
This change still preserves the optmization to avoid ioctl calls, in
cases where pipe params are the same but makes an exception when
list geometry changes.
Change-Id: I909d35b2a8c33059b34b65943ccbbc08650461db
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