- 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
This makes sure pipes are detached from the primary display when
a virtual display comes in so that there is a chance of the
virtual display getting at least one pipe.
Change-Id: I34e11a05385555ca18b7f2d16bd429819f4ca689
- 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
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
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
Provides a way to enable/disable dumping of virtual display
frames at runtime via binder. The dumping needs to be enabled
from a priviliged shell.
For example,
$ adb shell service call display.qservice 15 i32 3 i32 1
Here 15 is the integer code for DYNAMIC_DEBUG in IQService.h
The first parameter 3 is for DEBUG_VD
The second parameter 1 is to enable.
Change-Id: Idd62c5d9ffa6e4eb7dec585984d145bc6a421336
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
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.
Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
* 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
1. Add hook to dump the layers going to VDS based virtual display.
2. Furthermore, add utility function to dump the frame buffer and
WB output buffer. This will be enabled via a system property
debug.hwc.enable_vds_dump
Once dumping is enabled, the dumps can be extracted from
/data/vds.fb.FORMAT.XRESxYRES.raw
/data/vds.wb.FORMAT.XRESxYRES.raw
e.g. vds.fb.MDP_RGBA_8888.1152x1920.raw
Change-Id: I2435c5507961a52929411206892c005492d5c193
* On Low-end targets, no secure video is displayed on primary
during WFD session due to lack of VG pipes.
* Once the secure video is paused, and WFD session is paused
from sink, paused secure video should be seen on the primary
due to the availability of VG pipes(which are no longer used
by external)
* Call invalidate at the end of VDS pause to make this happen.
Change-Id: Ia735be10e798b6a241a82239e3a136efb54e72f3
* 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
Clear overlay and layer-rot map from the top level caller of
composition, rather than from the place of actual intermediate
failure. This makes sure, even in cases of GPU comp failure,
overlay and layer-rot maps are cleared and eventually pipes unset.
Change-Id: Ibf1152a0e8ca66d87bcc6b87009c4b09e451099d
* Provide a binder interface call for wfd module
to inform display about the start/stop/pause/resume
of wfd session.
* This is needed for wfd-hdmi synchronization in
case of v4l2 wfd solution. If hdmi is plugged
in during v4l2 wfd session, display-hal waits in
uevent thread for wfd teardown notification from
wfd module, before going ahead with configuring
external display.
* For VDS WFD solution, display-hal waits in uevent
thread for wfd-teardown to be signalled from
the composition thread.
Change-Id: I9514cb5bc7ff81de0b5dd4cdf66d8286a64ba094
* Rely on list->outbuf rather on mVirtualonExtActive
to determine a virtual display device
* This helps in cases where SSD/SR is started after
a non-Hybrid WFD session becomes active. We need
to update retireFenceFd of SSD/SR which used to not
happen since mVirtualonExtActive is set becomes of
an active non-Hybrid WFD session
Change-Id: Ib42af62e723b5f62f62a1a8d280f0c9af49683d7
1. Hard code the vsync for VDS during the first prepare call
with valid VDS display. We align the vsync period to that
of the primary display. Effectively, we produce at the at
the primary refresh rate and do not worry about the consumer.
2. Do not bail out on the first frame as it leads to showing empty
buffer. This leads to failures for some test cases such as those
run in CTS.
3. We need an FB layer handle check to cater for this usecase:
i. Video is playing in landscape on Primary
ii. Launch ScreenRecord app
In this scenario, the first VDS draw call will have HWC
composition and VDS does not involve GPU to get eglSwapBuffer
to get valid fb handle.
Change-Id: Idc7d989e244a83ad28ce730ecb12955bc249dc25
When we receive a buffer handle that is secure, we configure WB as
secure; otherwise we continue as normal.
Change-Id: I497e257352c103c5da7ac2dc3fd4d7fe0e0b3953
* When a non-WFD virtual display device (SSD/
screenrecord) is active along with
non-hybrid WFD solution(WFD faked on
external), give preference to non-hybrid WFD
device over non-WFD virtual display device.
* This is needed only in cases when WFD is
enabled via v4l2 rather than using VDS api's.
Change-Id: I63e53baa214bdcdac19430ca30b939cdd7416cbb
Use outbuf handle width to configure display xres, since that would
have the necessary alignment. The outbuf is guaranteed to be valid
by the framework during hwc_prepare.
We use the framebuffer layer's display frame to obtain the actual
width. For example, the actual width could be 720 but the aligned
width would be 736.
Change-Id: I5afe38001be8116e1ad6a9f46c7ecaa50b5f25a2
In the current composition strategy we bail out if there are no app
layers present. However, this leads to undesirable behaviour if the
FB contains valid data that is expected as output. In this patch we
copy the FB to the output buffer to satisfy this use case.
Change-Id: If905d8b0652faf73b9aecad1abc760f21967807f
1. Define classes for VDS and V4L2 based WFD solutions.
2. Overload the functionalities for VDS and V4L2 WFD solutions.
3. Instantiate VDS object or V4L2 object during hwc init based on the
property persist.hwc.enable_vds set by the user.
4. VDS solution is not verified as it requires some dependent changes.
Change-Id: I74bf944d532da138c850d4ec0c20b4a881489efa