Add support for returning pipes based on capabilities.
getPipe() API takes in pipe specifications like format class,
scaling, display, mixer, fb and decides what pipe to return.
The nextPipe() API is now just a private helper.
Change-Id: I0ab809662c0ad6297e19a44f39264ee929944d13
If using source split to stage 2 pipes on the same mixer stage,
the left pipe needs to be a higher priority than the right.
Add API in overlay to compare pipe priorities and use this in
source split config to stage pipes accordingly.
Add support for 1 pipe config for FB if updating rect is within 2048
pixels.
Change-Id: I8b33d5ebd0f8765ee842bab128d8abd67a110145
Increment fbZ when 4k2kyuvindex matches with fbZ,
otherwise we see momentary flicker as right half of
4k2k YUV layer and fb layer have same z-order.
Change-Id: Ia900e102b6d4670b9bfdfd4e52ef360d1d813cab
Add rotator obj to the layer-rot-map soon after its successfully
acquired. This makes sure that any object allocated is accounted
for, irrespective of whether rotator configuration succeeds or not.
Change-Id: I94102d9c607cf61b2eccdf7f2445bb07d309d35c
Color layer always has zero transform because framework uses the
transform member of hwc layer to pass the color value to HAL.
Change-Id: I79fe204c558d1b6e1dd69ba635ba0bd87140b1b1
- Add utility function for 8x16
- Add internal function to identify if RGB doesn't
support scaling that is read from capabilities node.
- If UI layer needs scaling and RGB pipe doesn't
support scalar, request a VG pipe
- On 8x16, request DMA pipe for WFD
Change-Id: I94e8e0371bb10fcad53fddd2b7c45bc9b2594a4d
When layer format is macro-tile, decimation cannot be supported.
Add necessary checks to bail out for such use-case.
Change-Id: I711f07a2963a76280a08887d04770cd418d8bd1e
Add support for SourceSplit. The mixers are abstracted from hwc.
There would be no translations to mixer understood destinations.
1) If a layer's crop and position are < 2048, only 1 pipe can be used
irrespective of position.
2) Else 2 pipes can be used with the layer equally split, without
regard to position.
Change-Id: I501a53838d147887c1e2299366663e05320d5096
While performing load based mixed composition, iterate from max
stages of mixer to at least 2.
Get rid of modes that preferred GPU or MDP. This new mode will
include both plus the missed out batches.
Change-Id: Ideb06a2332fe2f59968367d28df848be01f4aedc
Bandwidth checks will be done in the driver as part of resource check
which makes the existing checks in hwc redundant.
Change-Id: I39eb7de63618e8ea5981f9e1a1159224831f314a
While doing mixed mode composition, update only the region of the
framebuffer where layer contents are cached or updated. Avoids
MDP fetch for non-visible contents of FB.
Change-Id: I20997d79e02a6bac60d7333c28c6dde134263197
1. Use kernel timer interrupt to signal about the timeout to
Invalidator thread and fallback to GPU composition.
2. This implementation avoids waking up the Invalidator thread for
every idletimeout value during continuous update.
Change-Id: I4370f10a0ca06b5cb1e7bdcb047e9c8daec51afb
Pipe estimation was necessary when the unavailability from overlay
led to GPU fallback.
With the new design, hwc uses the next best strategy, so failure
to grab a pipe from overlay is ok.
Change-Id: Id20d2e6fd24aeb5af3ab84ec9dd8c52f6bbbef8b
* In some use-cases, it is possible that there are
no AppBuffer layers on the external/virtual layer-list
during which all the pipes will be allocated to the
primary. When layers do comeup on external/virtual
layer-list, subsequent overlay sets fail.
* This change ensures that in such cases, we invoke a
padding round on all the displays to free up the
hw resources which can be used in subsequent cycles.
Change-Id: Ifac0b8f51a8719eb55b11010d05b8d11352db054
In Video-only mode FB Z-order of 0 was being used, incorrectly,
because the value was reset to 0 and wasn't changed subsequently.
Reset to -1 to prevent this. Any MDP comp strategy that needs to use
FB should set it's Z order appropriately.
If cache based mode has no MDP comp layers, fail so that other
strategies can be used, rather than succeeding with FB Z as 0, which
will at most allow GPU comp to be used.
Change-Id: Ifdae2cd5f8d8ff0e10447b1fed6ee1671260f311
Send the entire frame (array of overlays) to driver, so that it would
check pipes params and the whole frame wrt bandwidth and SMP.
Now, the overlay's commit API just prepares an overlay object but
makes no ioctl calls.
If the driver finds the frame, as a whole, to be not ok, the
validation fails and overlay/hwc return silently.
If a certain overlay object is mis-configured or pipes are
unavailable, the driver sets the number of objects it processed.
Overlay uses this to dump the incorrect config.
Change-Id: Ifb2b7fadc6bd6d9d94a35ba3908fbd832f41447f
While batching up layers for load based MDP composition, filter
out dropped layers.
CRs-Fixed: 607196
Change-Id: I78031f1094330e1d960ceb56d5441c27a041e48c
While optimizing layer list for composition, drop the layers
blindly on encountering NULL ROI.
CRs-Fixed: 605482
Change-Id: Ib81f43e8f34d140e6222135f3caa9491cdbbd41e
Currently the idle timeout is in a range from idle_timeout / 2
to idle_timeout, since we didn't need precise values.
Change this to a fixed value using timestamps, because the timeout
is too low and warrants precision.
Change-Id: I9cec1db7f1d7fda2996ab80449c61269915f6be4
For high FB resolutions do not specify required
pipe type unless a specific pipe is needed. This
makes RGB pipe available for FB in GPU fallback
scenarios because of SMP failures.
Change-Id: Ib52029aa276b5736d46a48489d280e7f65de2eab
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.
Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa
- Do not use MDP composition on secondary disp when the primary
is a high resolution panel.
- MDP would use decimation on secondary and on fall back it uses
GPU, which could lead to quality mismatch
Change-Id: I4c92df89563de6c8387eaaaa5f450ad7cc09b647
While batching in partial mdp composition, calculate FB batch
z-order after dropping the z-order of dropped layers lying below.
Change-Id: I92752f67e797a834aae6a575af2f8fa42c9c0911
CRs-Fixed: 601614
- Expose API to get maximum upscale value supported by MDP
- Check for MDP limitation before programming pipes
Change-Id: Id9faac54a7b3e393b6c4b60574e5e985b495bf59
Fallback to GPU composition for the external UI layers if Actionsafe
or WFD/HDMI downscale mode is enabled that requires scaling.
Change-Id: Ie03da35e1c2e78434de00f92ad6c2e5073fc33b8
DMA setting cannot be estimated ahead of time,
so do not do load based compostion where videos
can fall to GPU.
Change-Id: I01ccc26044df6bced428bd164f5c50f87aff99fd
Currently, if programming MDP fails from a certain composition
strategy we fall back to GPU. This change, redesigns so that
composition types can have a chain of fall back strategies if
programming MDP fails. This happens currently only if resource
checks fail.
Change-Id: Ia7fb71788e595e59a91e95b1fb4eac3faea9451e
If there is a GEOMETRY change try the load based compositions first
and then cache based. Vice versa otherwise.
Change-Id: Ie7ce6017e867f47e975487a72fba81f5d94eb9e3
Earlier, on configuration errors, we simply drained the fences held
by current rotator objects and went to GPU comp. The rotator objects
were deleted in the subsequent rounds, if they remained unused.
If we don't use GPU comp on failure but use other strategies, then we
need to mark the rotator objects for a display for reuse, so that
other strategies can use them.
Also any failure resets on overlay or rotator need to happen from
functions that call configuration helpers rather than the helper
themselves. Leaving cleanup to black-box helpers is not desirable.
Change-Id: I59b5b1bb774b82ee85a037e934c9d2d023db30af
Fall back to GPU for one cycle at the start of animation and display
the frame buffer for the subsequent cycle till animation ends.
Change-Id: I6c651cebaf4694f326d6e32ae485e014f391577c