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
- needsScaling does not check for scaling required in left & right
mixers when the crop values are sanitized. So it leads to issue
if DMA pipes are picked-up as high resolution layer does not need
scaling but left or right mixer configuration needs scaling after
the split.
- needsScalingWithSplit takes care of this with checking for the
sanitized cropped values.
Change-Id: I1f5b1952a59a84f5ccbaef123251b3c8cd46e4dd
A display could be split if its dimensions exceed 2048 or in case
of primary if we make it so via device tree property.
Add an API to find if a display is split. Use this API instead of
going through a set of conditions in various use cases.
Rename the HighRes, LowRes objects to a more appropriate Split and
NonSplit respectively
Change-Id: Id847c2bf36ea9250e1cdbc0259fdec64bd124537
for tile format make the rotator source buffers aligned to 64 X 32.
This avoids rotator hang during source fetch.
Change-Id: I9e42788cc6f538b155c073028ce41bf48e1d9349
CRs-fixed: 473297
Do not allow video if it requires pre-rotation and DMA pipe
is configured in LINE mode. Fall back to GPU in this usecase.
This is not applicable for wfd on 8x26 since Driver supports
both multiplexing of DMA pipe in LINE and BLOCK mode as same
mixer control block is used for rotation and writeback mode.
Change-Id: I5b99b214619134b1bd67f3c441b14f76051e3d3b
- In Buffer mirror mode, the output on the external should be rotated
based on the primary orientation.
- this is used for the side sync feature.
- buffermirrormode has higher precedence over external orientation
- Add binder interface to enable/disable buffermirror mode
Change-Id: Ibea0af9627d69b4d42453adc868b113d82613437
On WFD/HDMI connection, if the configured resolution is less than
Primary Resolution, Display HAL does the following:
1. sends hpd notification to SF with primary resolution.
2. configures MDP pipes with configured Resolution.
This is done to improve UI quality as MDP has better downscale
filter options compared to GPU.
Change-Id: I33570c13016a35ed6c5d22d4c34dfe75b2c605a1
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
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
- In Buffer mirror mode, the output on the external should be rotated
based on the primary orientation.
- this is used for the side sync feature.
- buffermirrormode has higher precedence over external orientation
- Add binder interface to enable/disable buffermirror mode
Change-Id: I1768dbfac239ae663927358ca9b8e5510b683385
On WFD/HDMI connection, if the configured resolution is less than
Primary Resolution, Display HAL does the following:
1. sends hpd notification to SF with primary resolution.
2. configures MDP pipes with configured Resolution.
This is done to improve UI quality as MDP has better downscale
filter options compared to GPU.
This works only for QCOM WFD proprietary solution.
Change-Id: Ic20e837bf02c0f7b6718946e70b936f3a469fa7c
- Make aspectratio calculations independent of ext dpy w/h
- pass hwc_rect_t to getAspectRatioPosition function instead of
x, y, w, h
- overload getAspectRatioPosition func to return the upscaled
or transformed position for a particular display based on the
values set by SurfaceFlinger
Change-Id: I0be9b2b4b030bdd8e69dc1493dc8cbac31918c27
- 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
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
If the left split is not published by the driver then the default should
be even split. This was missing from the configuration in utils. This is
already taken care of in framebuffer configuration and mdp composition.
Change-Id: I3db44481fd791809146752ddff56420dcbe89fb4
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
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
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
- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
MAX_NUM_APP_LAYERS to avoid heap corruption.
Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
Add a BWC policy manager that decides if BWC needs to be disabled on
certain conditions.
These conditions are statically determined. BWC might get used and
still fail (or cause failure of subsequent pipe requests) if SMP
blocks are not sufficient.
Change-Id: I805738911a8da7dfc6232c133c74ef844c3af5b1
In scaling check, consider out of bounds layers, apply trim
and then decide if scaling is necessary or not.
Change-Id: Iad7f662f42096b3f7a4a1c4cfe71048d275f4b5f
These include constrained targets, with external connected which could
lead to a scarcity of pipes. Furthermore owing to a scarcity of writeback
interfaces, even if pipes are available, we may not be able to still
use rotator.
Change-Id: Ie2fb4c1726f32addcace89c268a126abe0cddbe0
Remove default arguments from setMDPflags function to get rid of
issues hidden from the developer.
Change-Id: Ic78645675b0aaab284fe2d0de8fffb4b26beabc7
- 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
- The required orientation on External can be set using the
properyt sys.ext_orientation.
- Values can be HAL_TRANSFORM_ROT_90, HAL_TRANSFORM_ROT_270
- According to the value set, the FB_TARGET for External will
be rotated and positioned as per aspect ratio on Ext
- For YUV(video layer) it just calculates the position, as the
rotation should be the source orientation
- This feature is supported only for low resolution panel.
Change-Id: I3d532ee0cb8dca3c37869537b55cd8044fd9047e
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
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
Introduce a padding round between the DMA line and block modes.
Do this based on whether DMA is actually being used, when block mode
is first requested.
This relieves the driver of doing an UNSET ahead of vsync which could
cause blinks in all such transition scenarios.
This approach should lead to smooth transitions for multiple targets
with the exception of secure videos, where there could be a blink in
any of the different approaches we use.
Change-Id: Ibc0b8d284b5c6ed9291a7cfa7e7f221300a921e2