Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
- At the initialization, set the viewFrame info for the external
and virtual displays to its resolution.
- It will be modified later based on the display projection
Change-Id: I25b74dcd375cb15386d5dad6f6d3730b15969f8f
* 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
We detect DRC based on the resolution of the external display stored
in the HAL, and the dimensions of the framebuffer(fb2) after receiving
a RESUME event. If the stored resolution is greater than that of fb2
it means fb2 was reconfigured due to DRC. This is the only case in
which we trigger the DRC path (and the MDP downscale path thereafter).
For all other cases, the RESUME event is just treated as normal and
should not result in triggering the DRC path.
Change-Id: I2c8a854434f09a840938f00b88faa59c6cb57e7f
We detect DRC based on the resolution of the external display. If the
external display has non-zero width/height then we know it was
previously configured during the same session and is going for DRC.
Change-Id: Iaa0b112370a95f2719738c991411776dcfe17f88
When the MDP downscale path is enabled we assign the primary
resolution as the external display's dimensions. However, the
aspect ratios of the external and primary displays can be different.
As a result, directly assigning primary resolution could lead
to an incorrect final image.
We get around this by calculating a new resolution by
keeping aspect ratio intact.
Change-Id: I217718a5474862154fe60837fc6518408d2c32c7
Add support to turn the MDP downscale feature ON through the
use of a system property. 'sys.hwc.mdp_downscale_enabled' shall be
set to 'true' in build.prop file to enable this functionality.
This is required for OEMs that might have privacy concerns over panel
size information being exposed.
Change-Id: I354b25b1fdabe5786aed7552f2afccda35412467
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
Separated the logic for setting virtual display attributes into 3
functions that:
1. Initialize the virtual res. on an ONLINE event
2. Set virtual res. to match primary res (MDP downscale path)
3. Set MDP downscale mode for either DRC or MDP downscale path
Change-Id: Icbf2a6b6301809fee48272ac8a87c732dd2d6634
When Dynamic Resolution Change (DRC) is triggered in the WiFi display
stack, it results in a PAUSE and a RESUME event. During DRC, the
dimensions of the framebuffer are changed. To support DRC we need to:
1. Check if a RESUME event is the result of a valid DRC event
2. Reconfigure the display's attributes to reflect resolution change
3. Enable MDP downscaling when necessary (Valid DRC cases)
Change-Id: Idc3cbc94de99a4a7299e2f6b26c3e35937c1d6c8
On WFD/HDMI connection, if the configured resolution is less than
Primary Resolution, Display HAL does the following:
1. sends hpd notification to SF with primary resolution.
2. configures MDP pipes with configured Resolution.
This is done to improve UI quality as MDP has better downscale
filter options compared to GPU.
Change-Id: I33570c13016a35ed6c5d22d4c34dfe75b2c605a1
On WFD/HDMI connection, if the configured resolution is less than
Primary Resolution, Display HAL does the following:
1. sends hpd notification to SF with primary resolution.
2. configures MDP pipes with configured Resolution.
This is done to improve UI quality as MDP has better downscale
filter options compared to GPU.
This works only for QCOM WFD proprietary solution.
Change-Id: Ic20e837bf02c0f7b6718946e70b936f3a469fa7c
- 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