In case of videos, do a fallback using 2 pipes per mixer at most.
This redraw will happen only once to reduce pipes from at most 4
to at most 2 and never draw again until there is an update.
Change-Id: I78c0dc2af4e3bd7e9128994e507e777187b4e247
- 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
In High res case, there was no check for whether a layer is marked for mdp
leading to unnecessary pipes reserved for rgb layers on external.
Remove z order setting in allocLayerPipes, its too early, incorrect and
will be over-written anyway.
Remove the separate pipe allocation block for YUV. It is redundant and
unnecessary.
Change-Id: Ie90b4202a27ca4f52874514e3fa2b136ae5717f5
Reset idle fall back at the end of prepare, so that irrespective of
whether primary or external is configured first, both will fall back.
Change-Id: I6206f7cf0cccf71d1b33153044546515029f4e08
Alpha downscaling check should be applied to the full and partial
mdp comp checks rather than as a hard-feature check.
This means we could still have a video going through MDP comp and
the volume bar (lets say) failing the Alpha downscale check.
Change-Id: I6a47057e826668f7f19e20b6d0a548fffa349de2
By default make use of redrawing. It will be toggled only when caching
decides there shouldn't be any. Per our priority ordering:
1) Full MDP - redraw irrelevant
2) Partial/Cached MDP - decide on redraw
3) Only Video - 1 & 2, which include video, are not possible. Redraw.
4) Fallback - Redraw.
Change-Id: I6b74a5edcf79488ede2ea9480721731f371af9c8
Check for MDP's max downscale limit before using MDP for composition.
MDP 4 can downscale in each direction upto a factor of 8.
Bug: 8744080
Change-Id: Ib9f640a6b1db3ba6244eb665a060f624425b4841
There is h/w limitation when MDP_OP_SCALE_RGB_ENHANCED bit and
MDP4_OP_SCALEX_EN or MDP_OP_SCALEY_EN bit is set.
The minimum block size is 2x2. MDP will hang if the source RGB image
height or width is equal to 1. Hence fallback to GPU in such cases.
Change-Id: I7333b097fd26bfb888865de9c39d1664bc87acca
Fix reseting on handles, they never were in most cases,
owing to wrong size.
Fix redrawing, which needs to be done also when the fb's zorder changes.
Fix mdpcount update which should happen before we assess the pipes
available versus the pipes needed.
Handle video only cases, where other UI layers could be present, but we
cannot use MDP comp for them.
Restructure MDP comp decision model and some redesign.
Change-Id: I86a2efb77edccbbb9e9d7701d06c5b2578a9d2aa
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
Add support for decimation on top of what MDP can downscale,
because decimation can have quality issues.
B-family MDP downscale of 1/4, plus decimation of 1/16 can let
us have a total downscale of 1/64.
Also decimate by 2 (min) if width is greater than what layer mixer
supports and is not handled by the client.
Change-Id: I3b7c4bf321c7561bd98206ad118f4ac1ee2879ae
Add support for tracking the mode in which DMA is being used in overlay.
Remove unnecessary tracking variables, and their set,reset inconsistency.
With such varibles in hwc, it still leads to overlay giving out DMA pipes.
Make overlay as the single tracking place.
Change-Id: Ib949f3d0ef5918ef323c81cb1768b68a68c83da4
Layer transform should be considered while performing
downscale limitation check. Failing which videos will
fall back to GPU.
CRs-fixed: 474244
Change-Id: I04e005afa77a209d5de58446d4c6f15842d9a43b
With this change we are moving MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.
- Mixed mode design is based on layer caching
- Mixed mode path is configured only when non-bypassing
layers are cached.
- Never allow mixed mode when FB needs to be udpated.
- If we cannot bypass all MDP comp marked layers, bail
out completely.
Change-Id: Ie08f39db07e032b537f042d0d2bfe772ebfed049
In case of High resolution MDP comp, initialize rot field to NULL,
which was missing.
This is already done in the Low resolution case.
Change-Id: I5a9be8393cceff58f0ba3b6d85a887949f25af62
This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.
Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
-Add support for Video via overlay on 4k2k external panel.
-Add support for rotating videos on 4k2k panels. We use
pre-rotation in hwc to rotate a video into a single buffer,
irrespective of panel size. Then this buffer is fed to MDP.
Rotator objects are managed by the new RotMgr.
-Cleaup mdpcomp and overlay.
Change-Id: Ifb08534747e8e18b6c58dd8a3e1a9947409100f1
This patch:
-Implements MDP composition for higher resolution
panels of width more than 2k.
-Adds DMA pipe support for high res. MDP composition
Change-Id: Ib7b1f822e3600eca81521294fedfe05e948b65c3
Although 6 pipes are available in total but only up to 4 pipes are
available per display (single mixer) for MDP Composition.
CRs-Fixed: 450985
Change-Id: I99df91ab955a1a7110dfbea2aaf790ba26058a78
This is a software workaround for MDP hardware limitation where
DSI mode panels wont give more than 30 FPS if buffers in RGB
pipes are of width less than 5
MDP can't handle layers of width less than 3. Fail MDP
Composition for those frames.
Change-Id: If45efab19817ea9e724fd2857fcc1c5d98ce0eab
Make the display HALs compile with/without the Qualcomm BSP
specific features so they can work with pure AOSP.
Change-Id: I1ad7282c4fe1fe7e3309afb530a07735f165ffbe
This change introduces the following changes:
- Frames having 2 yuv layer can be bypassed
- if not handled by MDP comp, video path will not
handle any such frames and will be FB rendered
Change-Id: Id211dbc185608c482badbca00a2708fa6138a8e5
Engage the rotator to assist MDP in performing video downscale for
primary and external. This saves bandwidth and avoids causing the
driver to make too many panel mode switches between BLT (writeback)
and non-BLT (direct) modes.
Change-Id: Icfabc2c0f978a23cf96c78a9976cf69cea697b5f
CRs-Fixed: 434852
Add NULL pointer check for metatdata buffer before accessing its
member variable
Change-Id: I91de520b76d3c9714f357cff2de696e701811d06
CRs-Fixed: 434388
Pipes allocated for one display type cannot be used by other
display types without calling UNSET on them. So clients should
check for pipe availablity only for a specific display type.
Change-Id: Id2244e4976b4cc1f040ada7e56686742d5a65141
CRs-Fixed: 433870
This change introduces hdmi pending state, where we allow
frames to fall back to FB, closing all MDP pipes.
Pipes could be used by primary (mixer 0) in which case moving
them to external (mixer 1) involves unsetting them and setting
them in the same round which is not recommended by the driver.
It will fall back to GPU till HDMI is configured on a connect
event.
CRs-Fixed: 430057
Change-Id: I4b6677883c499f6d15656c3578190be1115ee6b4
Restructure MDPComp class for 4kx2k displays.
Cleanup MDPComp class to remove unused stuff and formatting.
Add a MDPCompLowRes class for current functionality.
Add a hollow MDPCompHighRes class for future.
Change-Id: I343540e712d31ca907257a73b49567578f49d5f7
Allocate extra space for metadata in buffer handles
Provide api to map this space in client process and set the metadata
Change-Id: I8bca8448670d4aa88d439320faf402dae30458f8
Does a basic implementation of the dump function
called by SurfaceFlinger in dumpsys.
Further logs in different areas can be added later on
using the dumpsys_log utility.
Change-Id: I2194b4ed7f10947272b7b824ef802ce2ee3c8a48
MDP4 supports scaling with alpha, only in RGB pipes.
In some cases this scaling happened with video pipes.
We now fall back to GLES composition for layers that have
alpha and need scaling.
Change-Id: I084355bad1cdb17c7308077b56006c59e75d2042
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Bug: 7648647
Current frame count is not valid in cases where MDP
composition is not doable. This could lead to clearing
the flags for the wrong number of layers.
Bug: 7643563
Change-Id: I1f506a4a0a8f706d02e954bd6c12e354c0fb5fe9
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Also make sure layer cache is used correctly when
we're not using MDP composition
Bug: 7643563
Change-Id: I4dcd70c2da128b2dcbe0b72dc14031983649719d
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
This change extends MDP composition to support
upto 4 layers by making border fill as base pipe and
using all MDP h/w pipes in overlay mode.
Conflicts:
libhwcomposer/hwc.cpp
libhwcomposer/hwc_utils.cpp
libhwcomposer/hwc_utils.h
Bug: 7626586
Change-Id: I01a0e53ddfbcf3ed46734f6f3bb0ef7d912ceac6
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
This change adds support for flip operation during MDP composition. This
enables frames to get MDP composited during 270 degree orientation too (with
pre rotation doing 90 degree rotation) or even with layers with just h flip or
v flip.
Bug: 7435860
Change-Id: I7fd18226d8337b2cd9341d709c2bd030eff881f7
Signed-off-by: Iliyan Malchev <malchev@google.com>
MDP doesn't like out-of-screen-bounds parameters. So based on the position of
the layer, we adjust the portion of layer the MDP should pick.
However, this did not factor in orientation, so far. This patch does that and
allows panning to work in other orientations, without having to use GPU.
Bug: 7313955
Change-Id: Ice17ad144abcd60279c2ef9ad87fc617a1bd3621
Signed-off-by: Iliyan Malchev <malchev@google.com>
Add premultiplied alpha belnding support while using MDP for composition.
Layers could have PMA blending which was missing from hwc1.1
This change just handles the PMA case.
Bug: 7301436
Change-Id: I7d83169831b40943b2b595723fefc3a95a177137
Signed-off-by: Iliyan Malchev <malchev@google.com>
This changes fixes a memory leak, by freeing up the pipe alloc structure
everytime before parsing the current frame.
related-to-bug: 7301196
Change-Id: I23edefca71ec0209291be24ee9d629b4a80f0a25
Acked-by: Jeykumar Sankaran<jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Bug: 7124159
--External disabled
--MDP comp coded but disabled.
--Videos via overlay, so that secure videos can work.
Change-Id: Ie48b264143d5e4237ab9724e28930e3f68ba49ee
Signed-off-by: Iliyan Malchev <malchev@google.com>
Add QService binder interface to enable communication
to display by the mediaserver for Securing/Unsecuring start and end
notifications.
Create separate lib for external.
Clear reserved field before applying format.
Change-Id: I463c9c6deac7587bd0c4e0b84513b5d0b5dd7e98
This change sets MDP_BACKEND_COMPOSITION flag during
MDP composition to enable pixel repeat in MDP H/W
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Change-Id: Ibc04878831c84e1e1fd0ace7c185bddce9b7ab7f
Also store the hwc_procs_t* into a dedicated field instead of one of
the hwc_composer_device_1_t::reserved_procs slots, which are supposed
to be NULL so the structure can be extended without breaking backwards
binary compatibility.
Change-Id: I11e6bc713958d854aba418242caa749cbcb21f1d