Reset format type to FORMAT_NONE to select the pipe irrespective of
the format specifed by the client. This is required for the device
where SMP starvation is unlikely, we need not keep track of formats
programmed in the pipes to avoid potential pipe crunching.
Change-Id: Ifc00549802ca66936e171d00020124d3bcb60e0a
In case of one pipe having a new request and pipe types being
different, a condition check for comparison was missing. This
change adds that.
Change-Id: Ie58e297405a5ba911485d3f1e2e34cfbf538d2d7
With source split enabled:
1) When both LEFT and RIGHT pipes gets reused pipes, we use their
pipe id's to compare their priority and swap them as needed.
2) When both LEFT and RIGHT pipes needs to be newly allocated, we
let driver take care of the priority as long as both pipes are
of same type. If different, we swap them according to the pipe
type priority.
3) When LEFT is reused and RIGHT needs new allocation, we swap
them only when they need same pipe type and LEFT has the
pipe with lowest priority.
4) When RIGHT is reused and LEFT needs new allocation, we swap
them only when they need same pipe type and RIGHT has the
pipe with highest priority.
Change-Id: I320285aaca7ffc032e3b3b0832380a9c705bc4fc
Enable POST_PROC flag to update PP features (HSIC/IGC/QSEED2)
info from metadata. Dynamically link ABL library.
Change-Id: Id5d8cf17eccb3ad8f1a671d0f3b5a96a7dbf7c00
VG pipe can be allocated for both YUV as well as RGB layer.
Switching this color format dynamically can cause overlay set
failure due to smp allocation change. Avoid this condition by
storing the color format it is allocated for.
Change-Id: I84df03883bd050c80d49e2ab63a37905535fb670
mixer_info ioctl is deprecated and driver does not support
it. Remove unused code from overlay library to avoid
unnecessary version check during init.
Change-Id: I8099b66c398902b4a99f8e04cff53724254d6768
When clients request pipes and unused pipe-slots are returned (the
ones having DPY_UNUSED, MIXER_UNUSED), they are tagged with requested
display and mixer ids.
If the client releases such pipes without using them (i.e without a
successful driver commit) we need to reset display and mixer tags to
UNUSED, so subsequent requests for a different display/mixer succeed.
Change-Id: I26e9fc4da3c3919ee23b65e2053c762df6c4cf8c
In source split, when both the left and right requests are new,
the comparison should be made of pipe types, which could be different
even if it is for the same layer.
Change-Id: I66784ddac80c84d4520af5d195c7ce4ab5a27dc3
Add pipe life-cycle logging including set, unset, commit.
Remove the older unused logging mechanism.
This is enabled via binder as:
$adb shell service call display.qservice 15 i32 4 i32 1
where 15 is DYNAMIC_DEBUG, 4 is for pipe lifecycle debugging and
1 is to enable
Change-Id: I6c02e24aa91135d4a6c67870b4c103546947da48
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
De-prioritize DMA pipes in line mode on 8994. If DMA pipes need to be
used in block mode for downscale, there could be cases where
consecutive rounds need separate modes, which cannot be supported
since we at least need 1 round in between where the DMA is unused
Change-Id: I9cdcb5c699ddb34b6730ff32ff5e17c457c0fa12
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.
Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.
Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
Remove usage of scale header and do not create or destroy objects.
the programScale() function exported out of libscale.so will
internally manage objects.
This frees up overlay from relying on scale.h which may not be
exported by libscale.so to a known location if only binaries are
shipped.
Change-Id: If6970541e2eb0ee2bdb907c73ed3534fc22e9dd1
Since both has same number of pipes with similar
features like scaling capabilities, for now rely on 8x16.
Change-Id: Ief51bb5c70d8aef7dca3d791f8b4d62a4c5392ff
Do not differentiate between app layers and FB layer.
As 8x16 doesn't support DMA multiplexing, the pipe preference
order will be RGB, DMA then VG for both primary and external.
Change-Id: I844b12b0eb452b50b64426cff965c0be120d5ee9
For 8x26, if external display is connected, DMA pipe should never
be occupied by primary display. Otherwise, external display would
lack DMA pipe if switch to GPU composition.
This patch refines former commit: 9c1eb2be21
CRs-Fixed: 640934
Change-Id: Idc64b724cfacf9e8e22ca73e4e443e8d989e1212
MDP driver assigns pipe priority in inverse order. Lower the
number, higher the priority. HWC shall swap pipes if right
pipe is assigned lower number than left pipe.
Change-Id: I328623d9f53ad3ae79f7e73b10116231a7c50582
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
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.
Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
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
Forced pipe configs were used during geometry changes to track bandwidth
in driver, which is no longer the case
Change-Id: I49fb1ca1b7173da2e17ccfc8ce9b447152b9b7b6
For portrait videos case on WFD, driver supports multiplexing
of DMA pipe in LINE and BLOCK mode.
Loosen the requirements to allow DMA pipe in block mode for
portrait case of virtual display.
Change-Id: I5821501f89b17bb2d29c425aee0a6c16b2a4783b
This change provides APIs for this mechanism. In a case where
pipeid corresponding to the layer needs to be reserved, then pipe
session could be initiated for that pipe. This will ensure that
the pipe is not garbage collected, and is manually destroyed when
the session (or pipe requirement) has been ended. This change
also provides the api to locally allocate the dest for the given
reserved overlay pipeid.
Change-Id: I3fec3e26f69305c280395b7a92edf9e457398052
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
Add support for using scalar calculations from custom library.
The calculation will override pipe configurations if required on
basis of format, scaling, split display etc.
Change-Id: I53c73431b70b5b339ad09c19ac8792f0fc96aaaa
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
There is an optimization to not do garbage collection (and thus UNSET)
if pipe usage hasn't change, added during older chip time frames.
It worked then because, continuous overlay failures were not normal,
and on failure userspace didn't UNSET remaining pipes.
On newer chips, owing to bandwidth limitations, continuous overlay
failures could happen, plus now we UNSET all other pipes. Thus each
round if GPU gets used, the optimization infers that pipe usage hasn't
changed and does not UNSET pipes.
Also the optimization doesn't do anything useful than saving a few
loops, but is suicidal in current situations, so can safely be done
away with.
Change-Id: I33bd64a599d8ade337707301188c94cf8e6aac81
Force pipes of a display, whose geometry has changed, to pass
configuration arguments using MSMFB_SET_IOCTL. This helps the driver
make additive bandwidth calculations and reject the frame if the
requirements go beyond what the hardware can support.
This change still preserves the optmization to avoid ioctl calls, in
cases where pipe params are the same but makes an exception when
list geometry changes.
Change-Id: I909d35b2a8c33059b34b65943ccbbc08650461db
- 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
For split displays, earlier we allowed pipes to switch mixers in
subsequent rounds. This change prevents that and makes sure there
is one composition round where a pipe being transferred to another
mixer of the same display is UNSET
Change-Id: I3c679cc4256363eeb70c5cf8bcaf5047b8a064c2
The debug buffer size is insufficient for newer targets with multiple
pipes. The code causing crash is enabled only if the PIPE_DEBUG macro
is enabled during local debugging.
We now increase the buffer size and also put some string operations under
the macro check for efficiency.
Change-Id: I4ad418d314fd8c7d374ccfdb0943dde44d968922