External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support
The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.
Smaller downscale is used if we need to chop off any more than 1
line or pixel.
Change-Id: Id07d62fefa3213035f16cca49497800716484a95
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5
Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.
Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
* Revert commit 7a495b3caa
"hwc: Call blank IOCTL on virtual as well if it is connected."
* On issuing suspend when WFD is connected, display-hal
receives both pause and blank calls. Calling StopTerminate
ioctls on WB(WB is not active on VDS pause) once blank
is issued on Primay(i.e when iommu is detached) doesn't free
up the buffer nodes resulting in orphaned memory blocks.
* To avoid this, allow WB to be active even during
VDS pause state so that when StopTerminate calls are made as
part of VDS teardown, display will be in unblanked state and
iommu would have been reattached, thus freeing up the buffer
nodes.
* Doing this doesn't clear all references to WB fb node during
VDS pause. Call display commit to unset the pipes rather than
relying on the refcount
Change-Id: I6f89c2ca56ea8a0133e66f3928f6e35ca94d9b52
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.
Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
- If virtual display is connected, call blank IOCTL on it as well
- Clear writeback object on blank, as pause/resume functionality
implemented in VDS takes care of sending black frame on suspend.
Change-Id: Ibce682beaf6e58200fc963202aa5b1905fcf1257
CRs-Fixed: 661438
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
Since both has same number of pipes with similar
features like scaling capabilities, for now rely on 8x16.
Change-Id: Ief51bb5c70d8aef7dca3d791f8b4d62a4c5392ff
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.
Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.
* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.
Change-Id: I1726caa4634f72d781561e797078648524ea2eef
Clear overlay and layer-rot map from the top level caller of
composition, rather than from the place of actual intermediate
failure. This makes sure, even in cases of GPU comp failure,
overlay and layer-rot maps are cleared and eventually pipes unset.
Change-Id: Ibf1152a0e8ca66d87bcc6b87009c4b09e451099d
There is no need to re-program the H/W, if the frame geometry of all
active displays, has not changed. It will help to improve performance
by avoiding re-configuration of HAL and driver, if it is not needed.
Change-Id: Ie01dce33be89afc7308a8103128d27b4b9fb5c4b
* Set DMA state at the start of the composition cycle
based on the following.
Set it to LINE_MODE if the number of active rotator
sessions are 0.
Set it to BLOCK_MODE if
** A yuv-layer for any display-device requires rotation
** (or) mExtOrientation is set
** (or) mBufferMirrorMode is set
* Separate out the reset helper function into more
modular ones
Change-Id: I6a22ac4379565cd1fd2d875a7a417f4ed3ee0f1e
1. Set the GPU hint flag to high for MIXED/GPU composition only for
first frame after MDP to GPU/MIXED mode transition.
2. Set the GPU hint to default if the current composition type is GPU
due to idle fallback or MDP composition.
Change-Id: I208a778017435a5a4620142da9d9fb3c50e09155
- 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
Do not proceed with panel recovery sequence if panel is already off.
Proceeding with reset sequence, if panel is already off, results in
race conditions.
One e.g., there is race condition between early suspend triggered
by pressing power key and panel recovery triggeredby ESD uevent.
If pressing power key happens exactly at kernel DSI driver is
reporting ESD uevent, it's likely that panel will be unexpectedly
on by ESD uevent after having blanked the screen by early suspend.
This change avoids unintentional panel recovery in the case above.
Change-Id: I19022691ec3c178f62f392913435ddc032ee1ab2
CRs-Fixed: 613155
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
* 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
If VDS is connected, do not clear WB object as it will end up
detaching IOMMU. We need to keep the WB session active in order
to send a black frame to WFD sink on power suspend.
For AD use case, we will keep the WB object active.
Change-Id: Ic6db255676ca0baafd468887fc3f88eafc581cea