- 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
Reset PTOR info in HWC reset to make sure that Copybit does not draw
any Overlap region, even if there is no App layer in HWC layer list.
Change-Id: Ie2fb3408ba0171fd098a6b2627f4b9d59ae94ee6
In some transition scenarios for external display, it can be
disconnected just before the power mode setting's display commit
goes through. This will cause the display commit to fail, which is
harmless in this context, but it causes false-negatives in test
scripts.
This patch checks if the external display is still connected
(and thus implicitly if the fd is valid) before calling a commit.
Change-Id: I386f0a951344c2aba2f8944e712df40e203d10ae
- 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
DOZE_SUSPEND is the lowest power state with the display still on.
With DOZE, we can still have updates. With DOZE_SUSPEND, MDP
clocks are off and no update can happen. This is applicable only for
wearables and doesn't happen in doze in handhelds/tablets.
Change-Id: I10fe467a099ead3b0b56a01fec0fb18e1ad78580
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
split.
1) When source split is enabled, both the panels are calibrated
in a single coordinate system. So only one ROI is generated
for the whole panel extending equally from the midpoint and
populated for the left side.
2) Fixes a bug in mdpcomp where ROI generated for the frame is
reset when a strategy fails.
Change-Id: I47fa0e827985dd76d06dcbe464ef832cfc57a671
Fix cases where some errors are really warnings/info.
Print one-time events like HDMI connect disconnect as info logs.
Print the error string and type on MSMFB_OVERLAY_PREPARE failure.
An ENODEV from driver corresponds to a pipe not available and should
be treated as a warning. This could happen if a previous UNSET is
pending due to a missed vsync. ENODEV should be treated as fatal
only if it is seen continuously representing a book-keeping
blunder.
Change-Id: I730d4ac7db84c287f47805b9c74792c90cfadc6c
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
This change removes the use of static declarations in the HDMI library
that were used to configure the HDMI class with the best mode.
We now rely on the res_info sysfs node to provide timing information
on request for supported modes. Furthermore, we now dynamically compare
HDMI modes in order of height, width, refresh rate and aspect ratio, when
we want to determine the best configuration.
Note: SurfaceFlinger currently has a limit of 128 modes but HDMI can
potentially provide more that 128 modes. In use cases when HDMI provides
more than 128 modes, the HAL needs to sort and provide the best 128 modes.
Change-Id: If4ed8845fb77024771dde15fe23dfcee515d93d2
1. Do not process the display list when the display is not connected.
This is applicable mainly in the HDMI as primary use case since we
want to activate the display only when the cable is connected.
2. Do not write to HPD when HDMI is primary
HPD is always enabled when HDMI is primary, and so we rely on the
connected state (read from sysfs) to determine if the cable is
connected or not.
3. Initialize the down scale feature switch
Initialize down scale feature switch when HDMI is connected but
before we make the call to modify display attributes.
Change-Id: If2a7c8d7af105a9bbd1b6aeef030ac22b51bd3ef
- 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
- 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
When an HDMI display is connected, we report all the available
configurations to the framework by translating the EDID data.
This information can be queried, and subsequently used to change
the frame rate of the HDMI display.
Note: this change does not provide support for changing the resolution
of the HDMI display.
Change-Id: I4b8b07e2886efe2a01480aed9d82d36075bb342c
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
- 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
Add support for setPowerMode HWC_POWER_MODE_DOZE and
HWC_POWER_MODE_DOZE_SUSPEND are treated equally.
getActiveConfig and setActiveConfig only support the default 0th
config for now.
Change-Id: I0303ed077409a66d9666c840cad8d917d7aad600
DMA multiplexing is supported on WB mode only.
For primary the DMA multiplexing should be avoided
as it can lead to hung rotator.
This can happen when the DMA is being unset from overlay,
while at the same time rotator gets configured.
Change-Id: I0c2cb8a5a1ebad8a8e4ed8107d5585836bc42451
WFD teardown was required when HDMI is connected on V4L2
architecture. This is because WFD connection is using HDMI
piggyback connection. Since SurfaceFlinger can honour only
one active external display, we have to teardown WFD
connection to process HDMI connection.
This is no longer applicable on VDS architecture. WFD connection
is established using Virtual Display adapter.
WFD Stack listen to HDMI broadcast event and initiate wfd teardown.
Change-Id: Iaca249f4f45193f02d32ac0ab56d68ce85e8c9a3
Partial update ROI needs to be reset at the beginning of every
frame even when we don't have any application layers.
Change-Id: Ib4b604dfa9b589e59150ecc66f48a396f0b37af5
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
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
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5
Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.
Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
* Revert commit 7a495b3caa
"hwc: Call blank IOCTL on virtual as well if it is connected."
* On issuing suspend when WFD is connected, display-hal
receives both pause and blank calls. Calling StopTerminate
ioctls on WB(WB is not active on VDS pause) once blank
is issued on Primay(i.e when iommu is detached) doesn't free
up the buffer nodes resulting in orphaned memory blocks.
* To avoid this, allow WB to be active even during
VDS pause state so that when StopTerminate calls are made as
part of VDS teardown, display will be in unblanked state and
iommu would have been reattached, thus freeing up the buffer
nodes.
* Doing this doesn't clear all references to WB fb node during
VDS pause. Call display commit to unset the pipes rather than
relying on the refcount
Change-Id: I6f89c2ca56ea8a0133e66f3928f6e35ca94d9b52