- Clients(SecureUI/WFD FW) will use this API to set status of the
Secondary display
- Status can be offline/pause/resume
- Secondary display will be hdmi/wfd, HWC will free up pipes for
these displays
Change-Id: I25d5e070b60c38daeb102349bed14bb6de0a5684
We are adding support for HDMI as Primary to the display HAL.
The HAL must be able to support boot-up use cases and cable
connect/disconnect events as follows:
1. Boot up with HDMI cable connected
For this scenario we read the best mode supported by the
HDMI TV and set that as the current and default mode for
subsequent boot up.
2. Boot up without HDMI cable connected
We read a default resolution from the driver by reading vscreen
and reporting this as the display resolution to SF.
3. Switch the display to active state when we receive first frame
When HDMI is primary we should rely on the first valid
draw call in order to activate the display
4. Update handling of uevents when HDMI is primary
a) Do not send hot plug when the cable is connected/disconnected.
b) Use the correct display ID in uevents when HDMI is primary
5. Handle display timeout when HDMI is Primary
When HDMI is connected as primary we clean up resources
and call commit to generate a black frame on the interface.
However, we do not call blank since we need the timing
generator and HDMI core to remain turned on.
6. Clear pipe resource when HDMI is disconnected
When HDMI is primary, we need to make sure that SF/HWC does
not have any open fd's when the cable is disconnected.
We clear all pipe resources and call a display commit to ensure
that all the fd's are closed. This will ensure that the HDMI
core turns off and that we receive an event the next time the
cable is connected.
Change-Id: Ice70add583a3859f99bfa2e384fbbb6df4df92e1
Use MDP rotator to rotate GPU rendered RGB layers buffers, if the
buffer is not intended for secure display.
Change-Id: Id756f3f1561a32a5d404c45ea8846b2b907af56b
1. Set tagged video layer to be full screen on external, if the
deviation between aspect ratio of external and aspect ratio of
video layer is within the tolerance level.
2. Set sys.hwc.windowbox_aspect_ratio_tolerance property to change the
tolerance level.
Example:
Set sys.hwc.windowbox_aspect_ratio_tolerance to 5 for +/- 5%
tolerance level
Change-Id: I5b3e962dfa1c9fc19036e42cb4599d0490b04da9
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
Set application buffer count to "2" based on
*RAM size(512 and below)
*Screen Resolution(qHd and below)
Change-Id: I40a6c5f93611e7122b038767d49b3b6344a1d715
1. Remove hwc_context_t from libexternal since this is a construct
that should only be used in libhwcomposer.
2. Clean up redundant code by creating utility functions to
a. open a sysfs node in a given mode
b. improving EDID mode storage/manipulation
c. creating/destroying composition objects
3. Add utility functions to
a. get the connected state of the external display
b. determine which interface the external display is connected to
(primary or external)
c. activate the hdmi interface by setting the resolution via an
ioctl
d. update/reset external display information when a device
connected/disconnected
Change-Id: Iba34c9e43b39ccb9c9436deb726587bd1b26b779
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo
Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
1. Add support for Dynamic Resolution Change
We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.
For the WFD use cases, the WFD MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.
2. Update WB dump with output buffer format and resolution
Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.
Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
Enable MDP Downscale feature for primary resolution greater than
2048 only for the targets that supports source split.
Change-Id: I21871b099f74543aa8c2416bac41e3a16d4ce72d
1. Detect and account the number of secure RGB layers present.
2. Mark secure RGB layers for MDP comp in cache based stratergy.
3. If full MDP comp and partial MDP comp fails, Mark secure RGB
layers for MDP composition.
4. In partial MDP comp reject load based composition, if secure
layer is present to avoid GPU composition.
5. Disable idlefallback feature if secure RGB layer is present
to avoid GPU composition.
Change-Id: Idb4c4f09b081ec20240a2602aa3f20332fa49ad6
Remove support for overriding a layer's z to set it up for foreground.
This is unused and can be achieved using pipes staged at required
z-orders.
Change-Id: Ia4688beed770c44c20d201a2dc5687252e002981
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.
Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
* A non-updating layer requiring rotation, can make use of
the older rotator buffer written when the layer got first
updated, rather than invoking a new rotator cycle.
* A rotator play is avoided in cases where incoming layer
buffer fd, offset, whf, src-rect, dst-rect, etc are similar
to that of the previous input layer to the rotator.
* For ex: In a usecase where video layer updates happen at
30fps and all other asynchrous UI updates happen at 60fps,
instead of the traditional 60 calls of rotator play per sec,
we now do only 30 thereby saving rotator bandwidth.
* Property "debug.rotcache.disable" can be used to disable
this feature.
Change-Id: I1d1c352c63007b7e0b4fee40882086ccd2f5a4aa
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
* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures
* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP
Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
Read the maximum width mixer can output from drivers
and consider this in identifying if dual pipes are required
to support a layer. So far above 2K dimensions we are using dual
pipes, but 8x39 mixer output can be upto 2560. So there is no
need of dual pipes as long as pipe data is less than this limit.
Compare layer/panel resolutions against this limit to deduce
if there is a need for dual pipes or split.
Change-Id: I52e1d28e381327d4f0b00f5ea8547c1e6157313c
1. In PTOR feature, offset for the second overlap layer on render
buffer, depends on stride calculated by gralloc for RGBA (4 bpp).
2. If mCopyBit object exists for external, we need setReleaseFd()
Change-Id: I74e365def2a6e540b2f2ba2b294b6b1e00e0ea96
* This reverts commit 52b4fdbdbd.
* Since DisplayDevices are not created for non-wfd virtual
displays(CTS/SR/SSD) anymore, we can remove these checks.
Change-Id: I9249a70c6d6f6b42f268e6ec8a28c0a86b954c4e
Currently for Mdss rotator we manipulate the layer buffer dimensions
to be equal to what rotator's destination dimensions would be, so that
these could be fed to MDP. Instead, this patch introduces APIs in
rotator so that hwc can directly query destination crop, width, height,
format from rotator.
This also simplifies the updateSource() and configRotator() helpers.
Change-Id: I501d998f2e0574683c764af9422742b2426ba0c7
viewFrame for primary display will always be full screen, hence
initialize it to primary resolution
Change-Id: I0f6ce79a9af6eac9b7b8a684c5b690c8b4a9e760