1. Add support for UBWC allocation in the Gralloc APIs for aligned
width, aligned height and buffer size. A client can request for UBWC
allocation by sending UBWC specific HAL pixel format or by setting
GRALLOC_USAGE_PRIVATE_ALLOC_UBWC flag in the usage flags.
2. Gralloc allocates UBWC aligned buffer, only if format is supported
by GPU and MDP and no CPU usage flags are set. Otherwise it allocates
linear buffer.
3. If UBWC conditions are met, gralloc sets PRIV_FLAGS_UBWC_ALIGNED
in private handle flags to tell client that allocated buffer has UBWC
alignment. This flag remains unset by default.
4. Add helper functions in gralloc to calculate UBWC meta buffer size
for RGB* formats.
5. Add UBWC HAL pixel format HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC
which has been defined by Video module.
6. Add AdrenoMemInfo api to query, if GPU supports UBWC for a format.
7.MDP driver expects UBWC specific pixel format defined by MDP header.
Change-Id: I5b4344bc90aa498dbdb7bb8100e70ed7728e6ea5
MDPOnly composition needs to cater for the use case when we have
secure RGB layers that require MDP composition. For non-secure RGB
layers we can afford to send them for GPU composition. This is
especially needed for the following use case: full MDP composition
on primary (including YUV layers), followed by external connection.
For the mentioned use case, we need to fall back to Video and then
GPU composition in in order to reclaim pipe resources for external
usage.
Change-Id: I6da3ca48cf6e38e767fecfbfee6b06e82ba00a51
- Set the perf hint when there is only one updating layer, which helps
in reducing cpu params and thus reduce power.
- This feature is enabled with the property persist.mdpcomp_perfhint,
which is set to a positive value, which will be the window of frames
before the perf hint is set
CRs-fixed: 765460
Change-Id: Ie21e1cd201afab16bedd3c750ea3b0230769969a
Not necessarily the max width supported by the MDP pipe and mixer
need to be same. HWC has to make the decision for using one OR
two pipes per layer only based on the max width supported by the
pipe not the mixer.
Change-Id: I5a2495d07de1b6f54ef64d9140c909f0f4cef914
Release Drawlock before calling invalidate to avoid
deadlock between caller thread and the draw thread.
Change-Id: Iddf9c3a554016d6493b336ec654f6f32bf57506a
Set minimum panel refresh rate during idle timeout for
power savings. Also handle dynamic refresh rate whenever
there is early return in prepare.
Change-Id: Ifb7b567adf47962789ee0cd1a97181cb53b53fd2
Handle idle fallback in mdpOnlyLayers and videoOnlyLayers
composition when the layers are non secure and non updating
for power optimization.
Eg: Idle fallback was not happening when video in pause mode
and layers are non updating.
Change-Id: If7c752074f405994e2cd145225ea409c5cabeec7
Dynamic partial update feature enabled post processing OR
partial update based on client preference. In case of framework
reboot, HWC needs to preserve the last set preference of these
features.
Change-Id: I4f53ac21f5404c7862d58248c86f23c45493f41b
Expose binder API to control partial update dynamically. Partial
update feature cannot co-exist with post processing features
dependent on histogram data. With this API, OEM's can set their
preferences on these features on use case basis.
Change-Id: Iee3eaa1593e057b1a0b7d35e642352f7f02c460f
The driver now sends the actual usable mixer stages, so no need to
deduct the STAGE_UNUSED and STAGE_BASE.
Change-Id: I3690d10b5ccf83cab499871479768fcd5cdb2a4e
Do not disable mdp comp on external based on primary resolution for
quality concerns. The app could still be rendering at a lower
resolution and disabling will cause performance issues in mirroring.
Use the newly added property persist.hwc.maxseclayers to restrict
mdp comp on external for desired devices.
Change-Id: I97ed575ef545890c1e71e2d8ab16130d04927b41
** Now, there are two ways for the clients to request
change in the refresh-rate of the target.
(a) Using metadata of the input-buffer.
(b) Using binder api added as part of this change.
** configureDynRefreshRate binder api provides three
op-modes which can be used as following:
(a) "DISABLE_METADATA_DYN_REFRESH_RATE" can be used by the
clients, to disallow display-hal from honoring refresh-rate
change requests, made by video-clients using the metadata.
For ex: This can be used during streaming use-cases
(Dash-playback, playback at WFD-sink,etc) where the idea
is not to change the refresh-rate, though video-client
requests for it using metadata, as video-clients cannot
distinguish between streaming and non-streaming usecases.
Usage:
adb shell service call display.qservice 18 i32 0 i32 0
(b) "ENABLE_METADATA_DYN_REFRESH_RATE" can be used by the
clients after DISABLE_METADATA_DYN_REFRESH_RATE, to once
again allow display-hal to be able to change refresh-rate
based on requests made by the video-clients using metadata.
For ex: This can be used by clients( Dash-playback,
WFD, etc) once they are done with their use-case.
WFD-framework will also use this when the wfd-session is
paused.
Usage:
adb shell service call display.qservice 18 i32 1 i32 0
(c) "SET_BINDER_DYN_REFRESH_RATE" can be used by the clients
to change the refresh-rate of the target using binder-api,
provided they have disallowed display from honoring the
refresh-rate requests made using metadata.
In other words, changing refresh-rate through this binder
api and using metadata approach cannot co-exist together.
Usage:
adb shell service call display.qservice 18 i32 2 i32 45
-- The refresh-rate set here will correspond to 45fps.
** Added property "persist.metadata_dynfps.disable" that
can be used by OEM's, to disable setting of refresh-rate
using the metadata.
Change-Id: I767fa174dcf1cfd061a578e96cd68af28e7dd36b
Add support for configuring the maximum mdp layers on secondary
via persist.hwc.maxseclayers property. The default value is 1.
Move the check for max allowed layers to postHeuristicsHandling
rather than it being a part of strategies itself.
Change-Id: Icae6cb7e400fd95f60e0b3eb64e6b768e4dbd861
Use intersection of PTOR layer and the layers below it to
address usecases like
* PTOR layer is not peripheral to the layers below it
* Some layer/layers completely below PTOR layer
Change-Id: Ieb456a60df12cc2f5ad46fbbba2d99a16853278d
Check for planeAlpha along with HWC_BLENDING_NONE as the latter
is set if the layer is Opaque irrespective of planeAlpha value.
Change-Id: Iaee7efe662189ba3a2562f79c2d109da831ac94d
The layer clock is dependent on vertical downscaling and horizontal
dest width (pixels). When comparing to mixer's requirements,
line-time can be ignored since it is common to both pipe and mixer.
Also since mixer's scale is 1, layer's downscale * dest width needs
to be compared to mixer's width.
Change-Id: I6d28abc33f8a57a15101bf012b7706e163e2dc69
Remove support for toggling BWC via property and add support to
toggle BWC over binder. This will take effect only on targets where
the driver enables BWC.
Example to disable BWC:
adb shell service call display.qservice 17 i32 0
Where 17 is the code to toggle BWC, 0 to disable.
Change-Id: Ie534ab4643a72d47f5a985fe0b32e134bf0e7af3
- Read MDP sys_fs node for blending stages supported per mixer
instead of hard cording the value. This makes the implementation
scalable across chipsets.
- Add binder support to change the max pipes per layer value
dynamically for MDP comp.
Change-Id: I3b83f4bdc2e2e81ca55c54fc6bcfd61c55fef501
For PROTECTED but NON SECURE layers set MDP_SMP_FORCE_ALLOC flag
to allow SMP allocation and prevent GPU fallback
In Such cases if video resolution changes dynamically
it fails to display layer due to GPU fallback.
Use this flag for FB layer composition and depricate
MDP_BACKEND_COMPOSITION flag.
Change-Id: I9ab7cbdd2e12b56dfa67d5b4b3ff6b2dcd0096be
1. Remove AIV video mode composition stratergy and reuse video only
composition stratergy to achieve the same functionality.
2. Drop all non AIV layers from the external list at the start of MDP
composition prepare and fall back to video only composition.
Change-Id: I34760e2df57cfbb923a6be0182e632c9ddd6aa07
1. This feature is targeted to remove any window/pillar boxing on
external display when zoom mode is enabled.
2. Preserve the aspect ratio of the external display by cropping and
upscaling the tagged video layer during video playback on external.
3. User can tag the layers to be displayed on external display.
4. Set sys.hwc.windowbox_feature to true to enable this feature
Assumptions & Limitation:
1. Tagged layers for external display will also be displayed on
primary display along with untagged layers
2. When zoom in mode is enabled, source crop left and source crop
top of a tagged video layer is always assumed to be set to
positive integer value. So pinch zoom feature or zooming in top
left corner of the video use case cannot be supported.
3. Except tagged video layers, all other tagged UI layers will
use GPU for composition on external display, So all tagged UI
layers cannot be secure layer.
4. Rotation animation cannot be supported for this feature.
Change-Id: I8b934cf616ec23b4359d0120f9a291178a2781c6
memset dropArray and set dropCount to 0 before proceeding
to identify if refresh rate needs to be changed. Not doing
this will result in dropCount containing junk value which
will impact mdpCount. This prevents us in changing refresh
rate in cases where it could be changed.
Change-Id: I4081062157620ca0dc0b4a6fed0689b2869efb91
Enable partial update for MDP3 targets.
Use computed ROI of mdpcomp in copybit
to avoid composition of layers outside ROI.
Change-Id: I4b23fd48cac814f8c35a3c01253dca8c297036f9
Add support for dynamically setting idle timeout values.
Move default idle timeout setting to IdleInvalidator.
Fix static var naming, handle errors from IdleInvalidator in hwc.
Property debug.hwc.idletime is removed with this change.
Example:
1) Set idle timeout to 100ms
adb shell service call display.qservice 16 i32 100
16 is the code for SET_IDLE_TIMEOUT, 100 is time in ms
2) Disable idle timeout
adb shell service call display.qservice 16 i32 0
Change-Id: I60e15a3ac869b4e9f4015b3be50a35c90d00d404