- Retrieve cursor pipe info from driver
- Configure the layer marked with flag HWC_IS_CURSOR_LAYER to the
HWCursor using the fb_cursor ioctl.
- The config happens only when it satisfies the hw limitions of
cursor
- HWCursor is supported on primary display
- Since cursor configuration happens first, make use of drop
layer/count to handle other composition strategies
- Add support for hwc_setCursorPositionAsync as per HWC 1.4
Change-Id: I8663b6da89b0c2dd9b48af96d64a433b2b8a302c
* Until now, it was the assumption that when display animation
is in progress and there is a video rotation involved, the yuv-layer
would be marked as skip till completion of display animation.
But this is not always the case.
* On low-end targets, there is a constraint on #VG-pipes and
during video playback, video on primary is composed using GPU
where as video on secondary is composed using MDP. When display
animation is in progress, in such usecase, ensure that MDP is
is completely avoided so that VG pipe is available to secondary
once display animation is done.
* On high-end targets, video on both primary and secondary are
composed using MDP due to sufficient VG pipes. When display
animation is in progress, in such usecase, ensure to skip
fullMDP and partialMDP composition strategies so that
VG pipe that was supposed to be available for secondary is not
used for RGB layers on primary.
Change-Id: I841de1d902b627dd6e625251bf384c38b2db816e
- Instead of assuming the default format(RGBA_8888),
read FB format from driver and pass the info to SF
- For now, this is limited to primary and HDMI only.
WB FBformat is assumed to be in RGBA_8888
- If FB doesn't have alpha channel, disable mixed mode
Change-Id: Iefc0080819749b541483ea47357bb37ec150c544
Add support for panel resolution switch. This feature makes use of
the Linux modedb feature that lists available modes in
/sys/class/graphics/fb0/modes and accepts a mode change when written
to /sys/class/graphics/fb0/mode
Clients can link to APIs exposed in display_config.h, these
internally resolve to binder calls into HWC. For debugging, mode
changes can be made over binder using shell commands.
adb shell service call display.qservice CODE ARGS
ARGS can include config index and display (only primary supported)
setActiveConfig():
adb shell service call display.qservice 25 i32 INDEX i32 0
getActiveConfig():
adb shell service call display.qservice 26 i32 0
getConfigCount():
adb shell service call display.qservice 27 i32 0
getDisplayAttributes():
adb shell service call display.qservice 28 i32 INDEX i32 0
Change-Id: I97d34cc9c0e521a3bd5c948eeea6d1e07db7b7ff
- When fb open fails during hwc initialization, it should be
flagged as a fatal error and HAL should return error.
- Without this, the SF would make calls to HWC that would fail,
and display being blank.
Change-Id: I20f08bdcb283d4805449c74a8214b871c2f1c80b
1. Add support to set HDMI to 3D mode
2. Add binder API to force 3D mode
3. Switch to 3D mode based on metadata
4. Configure pipes appropriately
5. Only side-by-side and top-bottom formats are currently supported
Change-Id: Iae579ecfa45aae088ff543d4143e5025e8c682fa
Currently HWC integerizes float source co-ordinates (l, t, b, r) in
the inward direction, mimicking SF from pre-HWC-1.4. In case of
upscale where we need to create more destination pixels than incoming
ones, this chopping off can lead to quality issues, especially given
that the error magnification can be as much as 20x.
This change integerizes the source rectangle in the outward direction
which will help magnification cases. Downscale cases should be
unaffected since reduction hides errors, unlike magnification.
Change-Id: Ib72a1f8d52f4ec800387bfe2b91c9d3a65e6f557
ping-pong split needs source split to be enabled to stage two
pipes of a layer in the same Z order. This change adds partial
update support to generate ROI when source split is enabled.
When configured, ping-pong-split splits the layer mixer output equally
across two DSI's. To meet this limitation, the generated ROI is
adjusted to have equal widths from the panel mid point.
Change-Id: Ic307a1d5b902af9e352b0dfc6f5ab474ecd9c8a4
Default display mode needs to applied exactly on boot
completion. Hence we check for the exact instance of
boot completion by checking the property of boot
animation exit. We keep on checking till the property
is found to be set and program the default mode over
a dynamic link to libmm-qdcm.so
Change-Id: Ic68667a12e4058f29bc2203382baf59ef34ab038
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
- HPD has to be set only once during boot up.
- This also helps in use case where HPD is turned off
(on purpose)through by adb shell for power testing
and on suspend/resume, it gets re-enabled.
Change-Id: I7bf6fdd08e719432029c5d6e5756685d36cdca43
When the display is put in calibration mode by postprocessing
tools such as QDCM, the pipes are taken over and updates need to
be blocked.
Change-Id: I413caf40ad0a7ccdd43a3167bd7e3415e8bc8b55
lock() can be called from a CpuConsumer with only the READ_OFTEN flag
so relying only on that makes gralloc assume there are no non cpu
writers.
Store the writer information during allocation in private flags of
handle and refer to those during lock()
Change-Id: Ifbf25ebc74dbf4e422a2fdec52ec000cd75e549b
** 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
- External displays can be secure or non-secure based on HDCP
- Propogate this to the SF with the getDisplayConfig
- Non-virtual displays(pri and hdmi) are considered to be secure
- For WFD using V4L2 archiecture, read the HDCP status from the
sysfs and update accordingly
Change-Id: I4aaf303f0770201b8ca4f8a1c578bed61054bcfb
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
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
Enable partial update for MDP3 targets.
Use computed ROI of mdpcomp in copybit
to avoid composition of layers outside ROI.
Change-Id: I4b23fd48cac814f8c35a3c01253dca8c297036f9
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