Commit Graph

23 Commits

Author SHA1 Message Date
Ramkumar Radhakrishnan
3d863777c5 hwc: Remove external only feature related code
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.

Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
2014-08-13 15:13:50 -07:00
Raj Kamal
5ef25b84f0 Revert "Set priority among various display devices"
* 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
2014-07-16 23:27:01 -07:00
Tatenda Chipeperekwa
523eac5717 hwc: vds: Add support to dump layers, FB and WB output buffer
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
2014-06-10 10:52:44 -07:00
Raj Kamal
df3d1d2a2f hwc: Invalidate at the end of VDS pause
* 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
2014-06-03 08:24:43 +05:30
Raj Kamal
e012e0e3cd hwc: Allow WB to be active during VDS pause state.
* 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
2014-05-29 04:56:18 -07:00
Saurabh Shah
ef19fe3224 hwc: Clear overlay and layer-rot map from caller
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
2014-04-22 15:31:58 -07:00
Raj kamal
59fea567e1 Display and wfd synchronization during teardown
* 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
2014-04-15 14:15:59 +05:30
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30
Tatenda Chipeperekwa
8f1b9d719e hwc: Extend pause/resume functionality to VDS displays
Add support to handle pause/resume for virtual displays connected
either using VDS approach.

Change-Id: Iabd01c5597f2399ccc7f83712bda1a2c1103788d
2014-03-24 12:36:56 -07:00
Baldev Sahu
ec852384f2 Rely on list->outbuf rather on mVirtualonExtActive
* 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
2014-02-14 08:56:07 +05:30
Manoj Kumar AVM
0901c04448 hqd: Fix validate and prepare frame for virtual displays
Extend validate and prepare frame functionality for
virtual displays.

Change-Id: I266f35d8581ac2de04c5ce22e51b267a48955e46
2014-02-11 17:39:35 -08:00
Linux Build Service Account
25154792a5 Merge "hwc: vds: Display HAL changes for VDS based solution" 2014-02-06 06:20:39 -08:00
Linux Build Service Account
2f4752f7f0 Merge "hwc: vds: Configure WB as secure if output buf. handle is secure" 2014-02-06 06:20:38 -08:00
Tatenda Chipeperekwa
d6a8d4b288 hwc: vds: Display HAL changes for VDS based solution
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
2014-02-03 15:16:15 -08:00
Tatenda Chipeperekwa
92961f88e4 hwc: vds: Configure WB as secure if output buf. handle is secure
When we receive a buffer handle that is secure, we configure WB as
secure; otherwise we continue as normal.

Change-Id: I497e257352c103c5da7ac2dc3fd4d7fe0e0b3953
2014-02-03 15:14:15 -08:00
Arun Kumar K.R
2aa44c66fa hwc: resolve compiler warnings
- remove unused variables.
- fix incorrect castings.

Change-Id: I7661edb4539a3ffc7d4aedbb9f633bc5ba1dc149
2014-02-03 09:20:36 -08:00
Linux Build Service Account
3a61a7c777 Merge "hwc: Drop alpha from writeback" 2014-01-30 07:23:28 -08:00
Linux Build Service Account
90dbb20f26 Merge "Set priority among various display devices" 2014-01-30 07:20:51 -08:00
Raj Kamal
52b4fdbdbd Set priority among various display devices
* 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
2014-01-28 16:26:23 +05:30
Tatenda Chipeperekwa
a2fdebee45 hwc: Drop alpha from writeback
The alpha in the writeback is unused right now. Force MDP to use
RGBX for composing writeback.

Change-Id: I3d92338ced8bb98fd0515107d84c306992a3c133
2014-01-27 16:12:41 -08:00
Tatenda Chipeperekwa
b0a9f9d7d2 hwc: virtual display: Use outbuf handle width to configure xres
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
2014-01-22 11:49:03 -08:00
Tatenda Chipeperekwa
f19f84dd05 Copy virtual display FB to outbuf even with no app layers
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
2014-01-22 11:48:54 -08:00
Ramkumar Radhakrishnan
8bb48d3314 hwc: Common Display HAL to support VDS & V4L2 WFD solutions
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
2014-01-21 18:41:04 -08:00