- 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
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
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.
Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
- If virtual display is connected, call blank IOCTL on it as well
- Clear writeback object on blank, as pause/resume functionality
implemented in VDS takes care of sending black frame on suspend.
Change-Id: Ibce682beaf6e58200fc963202aa5b1905fcf1257
CRs-Fixed: 661438
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.
Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.
Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
Since both has same number of pipes with similar
features like scaling capabilities, for now rely on 8x16.
Change-Id: Ief51bb5c70d8aef7dca3d791f8b4d62a4c5392ff
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.
Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7