1. Color layer has a destination rectangle, RGBA color and plane
alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL
denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode.
2. There is no color member in HWC layer, so RGBA color value is
passed via "tranform" member from framework to HAL.
3. Update HWC query to enable framework to query for Color layer
support in HAL, at run-time.
Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
Increment hwc version to 1.3.
Create and use a converter from float source crop to integers.
Change-Id: I5e185195c975b3a9434c5d9dce9ae4757ff98739
(cherry picked from commit 7e5637c850bcdbe21784ca3bfa9668870306adff)
Set DMA mode to LINE only after we UNSET and commit the sessions
in BLOCK mode from previous rounds.
Currently, it is incorrectly set to LINE always at the beginning
of a draw cycle.
Now we set it to LINE only at the end of a draw cycle if no rotator
sessions are active.
Change-Id: I6e2351d214d01764eced0673b639f709fbd193c3
Listen fb0 status change event for panel status. fb0 will receive
"PANEL_ALIVE=0" when panel is not responding to status call.
Call blank and unblank to reset the panel in next hwc_prepare
call.
Change-Id: I941a501a82d9f3b725660ad09631c1d8602b7325
Do not create a writeback instance during dumpsys.
Instead use the dumpsys to return empty if no instance exists.
This fixes the issue where
a) Unnecessary instance is created.
b) Dumpsys has garbage, if a valid instance didn't exist
Change-Id: Ic8ea5ddd8d05203234da7c7dfccd2c2b497e62f7
Add dumpsys information from writeback data structure.
Remove some unused fields, formatting to save space.
Change-Id: I808ce67aae16e27c3aa6d6db45983929b1386b69
Since mdp3 only has one dma pipe for overlay, which in the driver
is just a sw overlay, there is no need to force a overlay_set call
when HWC_GEOMETRY_CHANGED is set.
Also we are moving the wait for distination buffer fence to
wait inside the blit call for mdp3.
Change-Id: Id0aed8732dc49b1041d8174a5ff38703c8023abf
1.Framework notifies HAL with "HWC_FORMAT_RB_SWAP" layer flag to handle
a limitation where R and B components were swapped in Rendering phase.
2.Add "R/B swap" in hwc query to enable framework to query for support
in display HAL, at run-time.
Change-Id: I3b44d15b51b4f24939048fee9d1bac2b9009c97c
This change adds support in HWC for MDP partial update applicable
only for command mode panels. Presence of MDP FB (GRAM) in
command mode panels allows MDP clients to update only the updating region
of the frame as rest of the frame will be cached in the GRAM.
HWC calculates the updating region of a frame (ROI) by deducing
outer bounds of its updating layer destinations. Layers not lying
within the calculated ROI will be dropped from the composition
since its illegal to program MDP pipes for non participating layers.
Change-Id: I890d98ff7960fe888787981803cac62f68471201
Stub implementation of VPU in HWC.
This commit passes through binder calls from HWC
to the VPU library. It also has stub prepare/draw calls
in the VPU client object which can be used to configure
VPU in the composition cycle.
Change-Id: I2606f2884e870448d29ef26e02faac92e157e2c6
* 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
Add support for checking whether the current frame's required
bandwidth can be handled by MDP.
The max limit is configurable via a property and the value is
derived from simulation runs and profiling
Conflicts:
libhwcomposer/hwc_mdpcomp.cpp
Change-Id: I46b46c346973fcb6487a8a656268171470ce69b9
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