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
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
- Always use sourceCropF instead of sourceCrop.
- Change it to sourceCropF at places where sourceCrop
used
Change-Id: Ia64050a41a174f3f038c9b88d527d70c2240f2d9
GPU cannot handle secure layers so a black screen is seen when we
punt secure layers with non integral source crops.
Bug:11156948
Change-Id: Ie19c631aab55dc8e7c1ad5e1f42162e833f49222
The MDP driver cannot handle such layers right now. Investigate
doing this with pixel phase in the future.
Change-Id: Iabbdd0285234160770ae5a799b07a5b912e5fde3
(cherry picked from commit e6aff6414ba478312d9d4af21ab63d586594009f)
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)
Redraw the cache if current frame cache/drop data doesn't
match with cached frame data. Frame buffer z-order, fbcount
and mdp count are not reliable. With same fbz, fbcount and
mdpcount it is possible that layers in previous cached
frame are not part of current frame fb cache.
Change-Id: I858228dc1a3a8ab8673ab8d294e54fdbf43cc1ad
Add support for load based partial mdp comp.
This is used on geometry changes where a redraw is unavoidable.
We select a batch of layers, that has minimum pixels for FB comp,
the rest go to MDP.
Conflicts:
libhwcomposer/hwc_utils.cpp
libhwcomposer/hwc_utils.h
Change-Id: Ifc5eeb4785c75c37de97a2bb89ca81409d324691
While marking layers for cache, neglect the z-order when
possible, to improve the scope of mixed mode usage.
It is safe to neglect the z-order if a static layer
doesn't have any overlapping region with updating layers
in between static layer & contiguous static layers batch.
- if above layer doesn't have any overlapping with updating
layer in middle, push it to the batch.
- If above case fails, but layers below(existing batch) does not
have any overlapping region with the updating layer, bring the
batch to top and modify fb-zorder accordingly.
Change-Id: I4882a750d0a9a2e11272fcbb146202160673d04f
- Identify secure display layer in the hwc_list
- Need to set both SECURE_OVERLAY and SECURE_DISPLAY flags for the secure
display layer
- Disable idle timeout for secure display usecase, as GPU should not be
accessing secure display layer
Change-Id: I555910db77c466b5e103b24b4f0ec7f47bb210a5
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
In prepare, we check if MDP can handle the number of layers
given to it. If it cannot, we fall-back. Additionally, we must
not proceed with any MDP bytes calculations otherwise we will
see out of bounds errors.
Change-Id: Ifae45aefbc8732a7f21f5652758ece3a7639be9a
When MDP cannot support a layer, we send the whole list of layers to
GPU. If such layers are not updating they can be cached on FB while
allowing the rest to take the MDP route.
Example # 1: Volume bar on video in 90 rotated mode. Since volume bar
is not h/w accelerated, there is no prerotation and we invoke the GPU
for redraws each round. With this change we won't because of caching.
Example # 2: If prerotation is applied to layers on primary, the
secondary layers would show a transform and the whole list is redrawn
with GPU. Now we could make use of caching.
This change also imposes a 1 layer limit on secondary, but now allows
full and partial MDP comp, thus benefiting secondary-only content.
Change-Id: I7eb43ba817f1081f317fefa99fa0c507344060e8
The ab (average bandwidth) is just the average and there could be
underruns when ib (instantaneous bandwidth) is attempted to be used.
Add additional factor to use ib instead of ab. This means we need to
assume that all the layer contents could be requested together, rather
than one after another.
Also use the trimmed layer dimensions for calculations.
Change-Id: I771f964e1c80b5db564faa01cdfb75d75b54f97a
In video handling this patch makes sure:
1) Sufficient VG pipes are available, not just any pipes
2) If VG pipes are insufficient in multi-video scenarios
preference is given to secure videos
Change-Id: I170592463a1c28348108a1b12d60908cf3063d7d
When checking for pipes needed for each mixer, the pipes completely
unused are counted twice.
Add a per display check on top of per mixer check to make sure this
is taken care of.
For example: Each mixer needs 4 pipes, and total completely unused
pipes are 6. Each mixer will get 6 as available pipes, which is ok
at a mixer level, but at a display level 8 pipes are needed and 6
available. Need to account for that
Change-Id: I9811255aab96c7fe47331f8aa125fef2a4a2f704
- 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
Layer handle values will always be stored irrespective of the
composition type. Layer caching will choose a layer for FB
composition if its handle has not changed.
Change-Id: Ibc41a8cd6232c0c5c04efee01b38513a2431f4e1
Writeback for assertive display feature is needed only for
split displays and only if ro.qcom.ad is set to 2 by OEM.
This patch removes the unnecessary code and adds the relevant
conditional checks for split displays and property value
Change-Id: Ic36f28441d1a6e93132316b33fe1cf98a6e1efe4
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
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
Make all pipes in overlay available, if programming a frame (list)
fails. The failure could be due to commit failure, in which case the
overlay itself will make pipes available.
The failure can also be owing to lack of pipes, since we don't allow
switching pipes across mixers any more. This is particularly a problem
for split-panels. This fix addresses this latter case.
Change-Id: Ieac7ae7d03e5b9a93c7245fa160c8933593c2e09
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
Avoid mdpcomp dump for frames having layers more than
MAX_NUM_APP_LAYERS, since our HAL doesn't support it.
Change-Id: I96365b4cbdeef2c00524eeb53877ee568ba0c172
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
An earlier patch disabled plane alpha completely for video.
Instead, do this only when we are in video only mode.
Change-Id: I2edc8c5ff5c90ec205b63175e5f3a4e6ff7eae69