YUV layer display positions are mapped to primary resolution
[e.g. 1920x1080] when MDP downscale is enabled, that needs to be
transformed to the original external resoltion [e.g. 1280x720].
This transformation is not taken care for 4kx2k YUV use case.
Change-Id: Ifa60773bf9fcd18676a3f05cd72a603beb165733
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
Derive viewframe rectangle for external display from primary
resolution and primary device orientation.
Change-Id: I1885b660cd6343e41e4b574e358fd063cd47a54d
* 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
Previously, the acquire and release fences for BLIT
composition were populated using same logic as Overlay,
but BLIT composition consists of separate BLIT step
before screen refresh, and app buffers are no longer
required after BLIT. So holding the buffers for both
the steps is unnecessary and impacts performance.
This change adds condition for BLIT in fence population
logic in hwc_sync and populates the right fences for the
App Buffers and Display Refresh during BLIT composition.
Change-Id: I9998a7052c0375acb32a174bdf0469d2a88f79e8
Vpuclient is the client side for VFM in hwc. It follows the
similar pattern of prepare and draw. It has 2 step prepare
including: setVpuSession and prepare. The setVpuSession function
passes all the layers from the SF list to VFM, which marks
the layers that it can support. After this, the layer
allocation/configuration is done, and finally in prepare the
allocated pipes are passed down to VFM. The draw function
passes the handle to the VFM to draw the video layer.
Change-Id: I5d8795de35ed98716f7fa4cd48506b488cb3cb5d
* Useful to estimate GPU/MDP performance for different resolutions.
* MDP:
Every layer is downscaled/upscaled to primary panel resolution.
* GPU:
All layers will be composed in required resolution to FB.
FB is downscaled/upscaled to primary panel resolution.
* Steps to follow:
step 1: adb root
step 2: adb shell setprop debug.hwc.fbsize XRESxYRES
step 3: adb shell stop
step 4: adb shell start
Change-Id: I82a032df87c91549c49a9cdbd981ff02f105ff2e
Added a new layer flag: HWC_VPU_PIPE to indicate that the layer
will be drawn by VPU. There is a corresponding MDP pipe
flag: MDP_VPU_PIPE, which should be set for the VPU layers to
indicate the layer will be drawn by VPU, so that MDP driver does
the appropriate settings to allow this process.
Change-Id: I61270aca633bb831bf34d413877bf925a3d2ac37
* When a non-WFD virtual display device (SSD/
screenrecord) is active along with
non-hybrid WFD solution(WFD faked on
external), give preference to non-hybrid WFD
device over non-WFD virtual display device.
* This is needed only in cases when WFD is
enabled via v4l2 rather than using VDS api's.
Change-Id: I63e53baa214bdcdac19430ca30b939cdd7416cbb
Type casting to float prevents rounding off errors which could
result in invalid or unexpected results when doing calculations
with integers.
Change-Id: I6d5c233c013322c4e9c7f7db61b5c604f915643c
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
This change optimizes layer dest rects and updates its
corresponding source crop value on sourceCropf.
Change-Id: Ie921908aa23ae029d2cd3add61795f71a6e5294e
Macro tile is enabled only if all the conditions are met:
1. GPU hardware should support Macro Tiling.
2. MDSS hardware should support Macro Tiling.
3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
GRALLOC_USAGE_SW_WRITE_OFTEN.
4. RGB 16bit and 32bit formats.
5. persist.hwc.macro_tile_enable flag should be enabled.
PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.
Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
- Initialize copybit object only when its used for composition, as it
was causing on unnecessary dup of the releaseFence in hwc_sync
- Its used only in case of MDP copybit
- Remove unused copybit object for external display
Change-Id: I876b7b8c5754e469613761789193bda321134c9f
Fallback to GPU composition for the external UI layers if Actionsafe
or WFD/HDMI downscale mode is enabled that requires scaling.
Change-Id: Ie03da35e1c2e78434de00f92ad6c2e5073fc33b8
8x10 has a product line that is suppose to use 256MB. The
intermediate buffers allocated are not needed when we can
compose onto fb frame.
Change-Id: I13fd2deb328a3ef4b6738cfe7030fe67ea7bd6c6
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
Restrict scissor rect within view frame boundary to avoid displaying
the layer content out of view frame boundary.
Change-Id: Iea19a4c4880a0c495d2f215e6cfd0eb41b65b785
1. Use viewframe of external display to compute Aspect ratio position
for external.
2. Use viewframe to find the crop rectangle of the frame buffer to
configure rotator for external orientation usecase.
Change-Id: I564c70f202176c8b1f707cbafc08cbbb2abde383
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
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