* 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
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
Combine the redundant code for FB programming and source split
adjustment into appropriate functions.
Change-Id: Ib99a2297a672e5ef40acb9f246021e57e41cd759
Reset the updating layer count when new batch is started.
Else this will effect framebuffer z-order.
Change-Id: If746a5ea4b482cd7b55ba95007a3b8d7f1dc9b6e
CRs-fixed: 584021
Add hw limitation checks for MDP composition once
we identify actual layers for MDP. This should be generic
way for all basic hw limitations of underlying MDP/MDSS.
Current limitations:
- a-family : MDP can not handle alpha scaling.
- 8226 & 8974 : Can not handle if multiple layers need
downscaling and blending
Change-Id: Ia944802d798f2d0e9cd4515d7e9854c7314cac78
CRs-fixed: 538803
The programYUV used for video-only cases is the same as programMDP
function. Remove the redundant function
Change-Id: I1d891404a77b2a47f90c236d4d6dcbbd02143d93
For 8x26, if there is only one layer which needs scale for
secondary display, while no scale for primary display, DMA
pipe is occupied by primary. If layer changed and need to
fall back to GLES composition, virtual display lacks DMA
pipe and error is reported.
To avoid this case, use GPU composition for virtual display
scaling case on 8x26.
Change-Id: I42297a18006517532e30d1a01c67ff8ca187482a
Use the low and high bandwidth values exported from driver per target
Use the low bandwidth value when the system has at least 1 video
mode panel, else use the high bandwidth value.
Newer targets could have bandwidth exceeding what an uint32 could
hold, so change the bytes read to be in gigs.
Do not use the framebuffer handle to get size, since the handle may
be null.
Change-Id: If3124ddc33334eba80d34ab7d8fc64d1b46697ce
Check for downscale support only for layers which needs to
be downscaled. Fixes issue where we bail out for all layers having
width more than MAX_LAYER_WIDTH even when they don't need scaling.
Change-Id: I19ee4d69e986390ed3df122b8ca9c0e102f3f916
To minimize usage of decimation when 4K x 2K video is played
on primary, split the yuv layer into 2 halves and configure
each layer to individual VG pipes. With this approach,
decimation can be avoided in some 4K x 2K video use cases,
thereby improving performance.
Change-Id: I7cddfab787c50f6ff132eaa7f5a3d9cfd636c282
GPU's perf is proportional to the number of pixels it processes, so
the load based strategy that prefers GPU, attempts to load it less
in terms of pixels, and at the same time makes sure the MDP has
enough pipes and mixer stages.
MDP's perf is real time and proportional to the instantaneous b/w
which is a function of overlaps. So the load based strategy that
prefers MDP would look at sending only as many full-screen layers
that MDP could support.
This mode is used when the GPU-preferred mode fails.
Change-Id: I3221a94bb01c43112370c248cd4ab217f2bd8ed1
Bytes claimed doesn't reflect the panel refresh rate.
So use the bandwidth claimed instead which factors this in.
This is important when 2 displays are running at different
refresh rates.
Change-Id: I3ab9573e43b8c25c31e01888fb2b181469b9e91b
1. Color layer has a destination rectangle, RGBA color and plane
alpha. There is no gralloc buffer. Layer flag "HWC_COLOR_FILL"
denotes a Color layer.
2. There is no color member in HWC layer, so RGBA color value
is passed via the "tranform" member from framework to HAL.
Change-Id: I8769fd3f5febcaf952a1456de0a4262679c9a0e4
Move resource checks, pipes, stages of mixer, bandwidth to a common
function and use it from all strategies.
Change-Id: I161fc957e2793d543b5943fbd23ae3607a4cfc87
Instead of trimming out of screen layer dimensions for various
operations repetitively, trim and store.
Will also prevent accidentally missing out on trimming.
Change-Id: I8800586070ec433aa1fcbb3aad73ec29c9c9111e
When MDP cannot handle an updating layer and we marked it for GPU,
make sure framebuffer is refreshed for that frame. In the current design,
only video layers fall into these catches. But we may need
this change for future composition strategies.
Change-Id: I1d6a92da13feef4b353fa5e196d42f91148412e5
CRs-Fixed: 575340
- Iterate layer list to drop layers from composition that
are not going to be visible inside the updating ROI.
- No ROI when skip layers are present.
- Reset dropped layer info on full GPU fallback.
Change-Id: Ib544526a8c28ffdd16b5be12f73d57d10d207c39
When we try MDP composition only for secure layers, bail out if
secure layers are not present. Otherwise partial MDP composition
succeeds with all layers marked for FRAMEBUFFER.
Change-Id: I3f968835951320bb6c5873ba77fedef8a359b7bf