History log of /hardware/qcom/display/libhwcomposer/hwc_utils.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
be259613b4590546cc0d66bf9a7483b556167731 18-Jul-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Resend the command after broken pipe is fixed

Bug: 9850103

Change-Id: Ia2ee8019394ce1397fe7eaf73a44a00b0b78e88c
Acked-by: Ping Li <pingli@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
9c14a425d69417f4c20b65d8312cc74df010ce0f 17-Jul-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Handle the broken pipe issue between hwc and ppdaemon

If broken pipe is detected, close and then re-establish the connection
between hwc and ppdaemon.
Acked-by: Ping Li <pingli@codeaurora.org>

Bug: 9850103
Change-Id: I68ff21b93ab5b40608ca9ab4951adaa9d75fa17e
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
fbc4be199f1c2a50562ea12ae14aa439fd73557c 08-Jul-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Set a timeout when communicating with CABL

Bug: 9669813
Acked-by: Ping Li <pingli@codeaurora.org>
Change-Id: If0f65e9ee100b368e46f8f6d4edf9d7a93120bed
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f6ef59b077f324003bb6ae74386fe57ca1fb9233 02-Jul-2013 naseer <naseer@codeaurora.org> hwc: Don't kill ppd when HDMI is on and primary also has video

There is still a power impact when video is playing on primary
with HDMI connected.

Bug: 9680403
Change-Id: Ia12710194ea6ebc677c7a86731a409333853ccfc
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
a63c9a0ab49be16d7fd465895ffaf2597ba5b4fe 28-Jun-2013 naseer <naseer@codeaurora.org> hwc: Don't run CABL when HDMI is connected

There is no power benefit with CABL when HDMI is on.

Bug: 9605980
Change-Id: I57b3af493e0af54db520fea04dc3a2d007943b82
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
be50f7b6b538e5cacf38f3a5ad127eb5d6f41a71 28-Jun-2013 naseer <naseer@codeaurora.org> hwc: Ignore SIGPIPE error when communicating with ppd

This avoids a potential crash in HWC if a SIGPIPE is thrown due
to failure communicating with the other end.

Bug: 9414907
Change-Id: I7f1de4f2ff0f287de4cad29dd92a6e964ba50224
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
8e1eee928e64dcc86adcbd6f54a2d79c75ebb2bd 25-Jun-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Get the retire fence from the MDP driver

Get the retire fence separately instead of duplicating the
release fence.

Bug: 9319776
Change-Id: Iacb773c2d94f635e27a7b355d399cb2e36dac2a5
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
b9c9e783172e6a733ade61edbe88b3271de87600 19-Jun-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Add support to enable CABL for video use case only

Set property "persist.qcom.cabl.video_only" to 1 to enable this
feature. With this feature, CABL will be turned on only during video
play cases. CABL will turn off for UI cases.

Bug: 9414907
Acked-by: Ping Li <quicpingli@codeaurora.org>
Change-Id: I7dee9e03685bdf8e5f69ad5004e63f15dd028333
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
32cafd22d940da88d6173248e9790c9424b2a65b 07-Jun-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Add support for smooth streaming feature.

Update the source video width and height set by the video decoder
for the secure video smooth streaming usecase from the gralloc
metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9533458
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
93897742c24e451a09e4255d2cf09c7d4640ee31 10-Jun-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Clear rotator map if overlay allocation fails

This fixes the GPU fallback path in case overlay set fails.

Bug: 9322550
Change-Id: I515204f41169debd8428b4fc48be392ecdd9ff48
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6902ccc9cb1ec9015bd436f19f60fce1014e3afb 23-May-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Add property to differentiate the input image format

Set different values of property hw.cabl.yuv based on the input
image format, so that mm-pp-daemon can adjust CABL power
saving levels accordingly.

CRs-fixed: 464799
Bug: 8956036
Change-Id: I212035d387a975e61a08749ba118a9da30e18d81
Acked-by: Ping Li <quicpingli@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
80c4c237b0c148d0c0537772221add57e4a2fde9 15-May-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Unblank primary display on bootup.

SurfaceFlinger assumes that the primary is unblanked on bootup.

Bug: 8968732
Change-Id: I8eafa40829aa774d4c1625d927eb500b49e6dded
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
c2f61ab1d7cc647126b30c4793d700299e90f192 11-May-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Simplify vsync code

Handle the wait properly in the kernel and remove unnecessary
thread signaling.

Change-Id: Iff05825a7a85d0353f3feb64e7f9a06cedab7869
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
85530ac7d0a1a8961320ca9c7de6adafcff3be08 26-Feb-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: Implement mixed mode composition.

With this change we are moving MDP composition from all-or-nothing
implementation to mixed mode implementation where layers can
partially be composited through MDP and while rest of the layers are
composed / cached in framebuffer.

- Mixed mode design is based on layer caching
- Mixed mode path is configured only when non-bypassing
layers are cached.
- Never allow mixed mode when FB needs to be udpated.
- If we cannot bypass all MDP comp marked layers, bail
out completely.

Change-Id: I8cafc35e5bf349fa72572936a5724aee65d056df
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
ba6e8a536e083008d0d3506e25c8ce47f66b3e2c 02-May-2013 Iliyan Malchev <malchev@google.com> Revert "hwc: Check for mdp max downscale."

Reverting this temporarily, since the wrong version of the initial patch got
merged. A subsequent commit will reinstate this change.

This reverts commit afd8f9718bdcef7097dd630137f8ae274e9b72ca.

Change-Id: I3ebbae4d69c53d75516dcd8b0080109d0a3e5786
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
afd8f9718bdcef7097dd630137f8ae274e9b72ca 01-May-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: Check for mdp max downscale.

Check for MDP's max downscale limit before using MDP for composition.
MDP 4 can downscale in each direction upto a factor of 8.

Bug: 8744080
Change-Id: Ib9f640a6b1db3ba6244eb665a060f624425b4841
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
665dfb63994cc0a0040e685ed750673e2bc5ed0d 17-Apr-2013 Jesse Hall <jessehall@google.com> hwc: provide retire fence for virtual displays

The frame retire fence is also used as the outbuf release fence. HWC
has to provide a fence that won't signal until the virtual display
consumer (e.g. video encoder) can safely read from the buffer. Since
HWC doesn't read or write the buffer currently, it now just passes the
outbuf acquire fence back out as the release fence, so the consumer
will wait for GLES compositing to finish.

Bug: 8316155
Change-Id: I55868ac8ad0ec7eba8218820c960281a5711b8e1
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
ac1391615c3d70676a31aae57e51e47db2ee57d8 13-Apr-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Conditional checks for B-Family

Rotator sync support and plane alpha are not yet implemented
for B-Family targets

Change-Id: Ic21c2f13ab92c1b995b1a492463bf066ae15852d
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
2ab5edab12c720e4ba4317d1cae9e6370ccb2067 08-Apr-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Stub virtual display implementation

Close any fences we receive for virtual displays.

Change-Id: I1a039f560d9d6c9d2b41ddbad2007d1da9113abe
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
18bdb52a00d4762d423b060e3142fd958664303e 19-Mar-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Add support for plane alpha

HWC 1.2 API passes down the plane alpha and the blending
operation to apply. Pass this information to the MDP.

Change-Id: Ie191b7414b7100a951a33c02291d8f5b7dab7645
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
b8986cf8f2f7702e1d281bf67fd31f6be09eb287 21-Mar-2013 Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org> hwc: Allow MDP composition for Secure playback

Allow MDP composition for Secure playback.
Handle non-secure scenarios like
1. When secure mode is enabled, if HWC receive a non-secure video
layer, fallback to GPU.
2. When non-secure mode is enabled, if HWC receive a secure video
layer, fallback to GPU.

Change-Id: I7fba414e4dfbe9a87de3ce1e5e07f601bbccd5bd
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
1e2af0f047ca851e6063729239bc82c6b4a78b42 21-Mar-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: Sync for rotator

Implement sync for rotator.
If a buffer is rotated, it can be used by producer soon after
rotation (and it wont have to wait until vsync).

Mdp waits for the rotator buffer's release fence to signal
to start display.

Hwc waits for previous access to rotator buffer by MDP to finish
before using it.

Change-Id: I5664806a17c44d58af62a2825ce454089fcd31cf
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
13389e567b043f692ee60c3f0d7a43cb8b11a024 04-Apr-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Ensure borderfill pipe is setup only after unblank

MDP operations should not be done in blank mode. Ensure that the
borderfill pipe is configured in prepare which happens after
unblank.

Change-Id: I97e75ab732015e0f02d12a24af37e4ed86b6b090
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
0edd0eba442e8b6db2fc2758ecd48e888d251d02 15-Mar-2013 Sravan Kumar D.V.N <sravank1@codeaurora.org> hwc: Use correct z-order in video overlay

Set z-order of video layer to 0 and framebuffer to 1 in case
of video overlay composition so that the blending takes effect.
Also set is_fg OFF for framebuffer.

Change-Id: I05f930074d265d690f29a1003b7c28077df89bbf
CRs-fixed: 458180
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
145e666f55a9df786bb0d8b1df5b72809a40a9e7 15-Mar-2013 Prabhanjan Kandula <pkandula@codeaurora.org> libhwcomposer: add dynamic thresold support for copybit.

copybit blit may not be effective if data for composition
is high. Add configurable threshold support beyond which
we can avoid copybit blit. set default threshold value to
2 times of fb resolution.

CRs-fixed: 462450

Change-Id: I0ee77ea1d761dc370d82ade1724caefbecfa01f5
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
e2b94da0a7de2a5cad9ecb90ed3eee5dca219863 23-Jan-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: Add MetaData support in overlay path.

DONE:
1. HSIC(SPA) test.
2. IGC R/G/B channel test.
3. QSEED2 sharpening/smooth test verified through register value check.

Change-Id: Ia9472f489c013df22a3411eeaac3c8d1e6e22ac0
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
9449eb8d19ce1af2ef31c15189a90aef3fad4e73 26-Mar-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: NULL check on buffer handle

In some cases it is seen that we receive a NULL handle on
suspend/resume. One such test case is open browser, suspend
device, resume device, unlock screen. Since we rely on the handle
to get the format, make sure it is not null.

Change-Id: Ia476887a831df33a50b2939a46c143b9c207ea9b
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f723a18011e80facc7a3028ecb005a125f3c481b 07-Mar-2013 Jeykumar Sankaran <jsanka@codeaurora.org> hwc: Add DMA pipe support in MDP composition.

This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.

Change-Id: I3c3697dd2713ce9b86ba1e23192ec5841abd25ec
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
27962189f494fada88706e612b1f57263bcca195 20-Mar-2013 Sravan Kumar D.V.N <sravank1@codeaurora.org> hwc: Fix alpha downscale check for mdp composition

Do not allow mdp composition when any layer format has alpha channel
and needs scaling as the VG pipes are not supporting alpha downscaling.

In few scenarios, at the beginning/ending of animations Surface Flinger
passes few frames with flag HWC_BLENDING_NONE though it has Alpha.
When such layer passed to VG piple and if needs scaling , it results in
flicker. Hence, just checking for HWC_BLENDING_NONE is not enough.

Change-Id: I70fdfe4547df6fe7b2771ed8042f43aa4e07a71d
CRs-fixed: 462508
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6c7e556faaa7ce7b0a99c6110bfacda9369e65bb 19-Mar-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: fix dst calculations for right mixer

The calculations made for the right mixer was not correct,
fixed it for both FBUpdate and video usecases

Change-Id: I803f2548570c81da387468444ac955b873cb1159
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
44d5282b252fa1db88472542c0b9d794fd915d54 07-Mar-2013 Saurabh Shah <saurshah@codeaurora.org> qdutils: Retrieve MDP revision and pipes information from driver.

Userspace can retrieve MDP revision number and number of different
types of MDP pipes (RGB,VG,DMA) information from driver. Add target
specific flag as previous MDP versions do not provide this support.

- Make use of this information while maintaining PipeBook.
- Move PipeBook related functions from overlay utils to PipeBook.

Change-Id: Ia6cc43dc5da03f83052cbf1d5353cf291b7352a4
Signed-off-by: Sushil Chauhan <sushilc@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
0dab964bf13bdd788234fc4eddd8690e6ba1ebeb 14-Mar-2013 Saurabh Shah <saurshah@codeaurora.org> hwc/ov: Fix MDP orientation flags and values.

--Fix MDP_SOURCE_ROTATED_90 removal.
Since mdp flags are updated fresh each round,
this flag should not be removed if there is no 90.
If pre-rotation is used, this flag is set by hwc and removed here.
(Affects anything having a 90 component in transform)

--Provide MDP adjusted transform to prerotation calcs.
Clients on Android don't switch flips if 90 component is present,
but expect the output to be that way. (camera)
We do it in HAL and then calculate final crop for MDP.
(Affects anything using 90 + Just 1 flip i.e camera)

--Pass 0 transform to MDP even for flips, since we
prerotate if there is 90 with flips or use MDP to flip via flags,
so no need to flip transform calcs.
(Affects anything using just flips).

Change-Id: I8f04c094bffe6687700ee646611f89e39977194b
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
36963690317abceae79621f14ba41ff62b3ff489 26-Feb-2013 Saurabh Shah <saurshah@codeaurora.org> hwc/overlay: Video on 4k2k external, 4k2k rotation.

-Add support for Video via overlay on 4k2k external panel.
-Add support for rotating videos on 4k2k panels. We use
pre-rotation in hwc to rotate a video into a single buffer,
irrespective of panel size. Then this buffer is fed to MDP.
Rotator objects are managed by the new RotMgr.
-Cleaup mdpcomp and overlay.

Change-Id: I1dd6f22695e737ca16f3480c8b4ebde38e5ac832
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
05207f5a7575e59e5f22bb9de46f3b6b6ce2cb8d 05-Mar-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Check for correct screen state before enabling vsync

Sometimes vsync would not be disabled before the display is
blanked.
This was due to the vsync disable ioctl being kicked off in a
thread different from the event control which surfaceflinger
called. So, while the calls from surfaceflinger are in order, the
order of execution wasn't always the same. Hence, making sure
ioctls are called in the same context to ensure order.

Also
- Make blanking/unblanking logs show the operation as a string.
- Add a debug property to dump vsync timestamps (needs framework
reboot)
- Remove a log which showed delay in reading vsync. This log was
unreliable when vsync is disabled and we're still reading from
the sysfs node.

Change-Id: Ibec04e9ffebd0ac6e1d32b7031e3668abd9390ff
CRs-fixed: 443113
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
93393d36207ef501e851c98491befd9e528b6b1a 21-Feb-2013 Jeykumar Sankaran <jsanka@codeaurora.org> display: Remove framebuffer HAL

This patch removes FB HAL and modifies gralloc and HWC to remove
it's dependency

Change-Id: If98133bdaa759cdc41d4503ff695b225ee43cb6f
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6195b7af4c83ba34d713d8e2dd5b075a8896f61e 14-Feb-2013 Naseer Ahmed <naseer@codeaurora.org> hwc: Use intermediate buffers for copybit

The earlier copybit solution involved blitting directly into
the SurfaceFlinger's framebuffer target. That solution involved
unnecessary framework changes and caused issues when the
framebuffer was being written to both by GL and copybit.
Update hwc_copybit to use our own buffers for this purpose.
We also make sure we display only the region we're interested in
so that unnecessary artifacts from previous blits do not show up
on the display. This way, we can avoid clearing the intermediate
buffers every frame.

Change-Id: I713b3fc606e0768444c621af76853ece41964da1
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6371fcefbcaf155e7402b3a7343d800470631d04 11-Jan-2013 Jeykumar Sankaran <jsanka@codeaurora.org> libhwcomposer: MDP composition for Higher Resolution panels

This patch:
-Implements MDP composition for higher resolution
panels of width more than 2k.
-Adds DMA pipe support for high res. MDP composition

Change-Id: Ib7b1f822e3600eca81521294fedfe05e948b65c3
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
0859ab4be38e5874f6990c6d8b41b2576a7375a3 26-Feb-2013 Saurabh Shah <saurshah@codeaurora.org> hwc: Close acquireFenceFds always.

Close acquireFenceFds always even in case of failures if a layer is either
OVERLAY or FRAMEBUFFER_TARGET to prevent leaks in case of failures.
The framework is *not* responsible for closing acquire fds, for layers
marked as above two.

Change-Id: Ia6c751d3ec25f196f5503120894fc6cc692b9d25
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
3a85d3e5b8f689cb3a3ef7ef1ce50c1e01afae1a 17-Jan-2013 Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org> hwc: Allow HWC to support Virtual Display

This change allows virtual display to be composed
by HWC for supporting Google WFD App + QCOM WFD stack.

Change-Id: If8892230256e72fa34e3fb5ae715c3ad8cbd5b64
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
d09406b9b8f3b6e9d84ba28ed10cb3165d96c875 16-Feb-2013 Naseer Ahmed <naseer@codeaurora.org> display: Close 0 fds

0 can be a valid file descriptor, make sure 0 fds are closed

Change-Id: I2bf2280d70eda74fa0b0a886ea54ecefc6854b24
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
d5e3e404e1344eb2148c8df9f3e35d841ddd4285 09-Feb-2013 Saurabh Shah <saurshah@codeaurora.org> libqservice: Add a client interface.

Add a client interface which interfaces with hwc.
qservice upon receiving IPC, provides a callback notification to the qclient
which does appropriate stuff in hwc.

In future, qservice can safely be even made a separate process with no changes
to exisiting code. This was not true earlier owing to the hwc pointer held by
qservice forcing it to be in the same process that hwc is in.

CRs-fixed: 452977
Change-Id: I05838c213f5d4606a6573693de1bacbc5876107e
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
e79c41329f1cc15bef9cb3a06eda7791e8cd4abe 04-Feb-2013 Jeykumar Sankaran <jsanka@codeaurora.org> libhwcomposer: Don't count video layers marked for SKIP

When YUV layers are marked for SKIP, it needs to be composed by
SurfaceFlinger. No need for tracking them in HWC

Change-Id: I4c8ca9710b709b9df9dcb6867681387b7507e14c
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
4012258b6b344adccf19973602c4d092e2403053 01-Feb-2013 Arun Kumar K.R <akumarkr@codeaurora.org> display: Add support for overscan compensation for ext display

- Read scan_info sys file node to check if TV underscans
- Apply action safe parameters to avoid overscan on ext display
- Store action safe width and height ratio using system property
- Use these to calculate the destination position on the ext display
- Remove unsed ActionSafe Class

Change-Id: Id27e6fa20966fb13fc16aa7e237cacce8caeb642
CRs-fixed: 447367
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
43d839785a39d93219bad17693c96698ffe10065 22-Jan-2013 Jeykumar Sankaran <jsanka@codeaurora.org> libhwcomposer: Allow 2 YUV layer frames to use MDP composition

This change introduces the following changes:
- Frames having 2 yuv layer can be bypassed
- if not handled by MDP comp, video path will not
handle any such frames and will be FB rendered

Change-Id: Id211dbc185608c482badbca00a2708fa6138a8e5
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
08cced40871ca190d231b39b63bd2d8cd85a32a8 09-Jan-2013 Sushil Chauhan <sushilchauhan@codeaurora.org> hwcomposer: In Mdss,secure content policy applies to layer buffer

In Mdss, mSecureMode is never set, instead the secure content flag
has been set/unset on each layer buffer.

Change-Id: I3283533c11206e189ce70dbc84776b2cff3a909d
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6c43ebed229c5d1e00c6d41638cd2f8e3cb979b7 28-Nov-2012 Arun Kumar K.R <akumarkr@codeaurora.org> hwc: Add support for copybit(C2D) composition

- Add CopybitEngine to hwc_context
- draw the layer on the HWC_FRAMEBUFFER_TARGET using
copybit(c2d) if it qualifies for C2D composition.
- use fence returned from the copybit during c2d
composition

Change-Id: I052da015cd031f7abd6411d83d7944c335caeff7
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f3db354f47d3d6b7f42374ea7b4e3b8e06df8592 28-Dec-2012 Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org> hwc: Delay HDMI/WFD connection request by one frame

This change introduces hdmi pending state, where we allow
frames to fall back to FB, closing all MDP pipes.

Pipes could be used by primary (mixer 0) in which case moving
them to external (mixer 1) involves unsetting them and setting
them in the same round which is not recommended by the driver.
It will fall back to GPU till HDMI is configured on a connect
event.

CRs-Fixed: 430057

Change-Id: I4b6677883c499f6d15656c3578190be1115ee6b4
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
bfa005e8c51529d99b9c360a444d351ebe0885f7 20-Dec-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: mdpcomp: Restructure for 4kx2k displays

Restructure MDPComp class for 4kx2k displays.
Cleanup MDPComp class to remove unused stuff and formatting.
Add a MDPCompLowRes class for current functionality.
Add a hollow MDPCompHighRes class for future.

Change-Id: I343540e712d31ca907257a73b49567578f49d5f7

Conflicts:

libhwcomposer/hwc_mdpcomp.cpp
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
6457316fc7ae8ea29d763edce3fc1ffc78dd7387 13-Dec-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: Support 4kx2k FB for Primary and External.

Add support for 4kx2k FB for primary and external panels.
Change class design to create appropriate version of FBUpdate on boot up based
on the panel resolution.

Change-Id: I216d815d9b81c610aa39e351f7b55736dfa48b43
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
50ecfc494bed848dfde487e002863e0fbba5f711 18-Dec-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: Support swap interval zero

Set debug.egl.swapinterval to zero to disable
fences with MDP composition enabling swap interval zero.
This is to measure performance only and will cause tearing.
CRs-fixed: 429343
Change-Id: I1460a02d568e69826800486a9a695d7a8953d4f8
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f72d47e5bffefb02a7db3c9354ebd67dc41016ba 03-Dec-2012 Naseer Ahmed <naseer@codeaurora.org> display: Use fences for all targets

Change-Id: I89a8b661dba7919707ba26ff35fb294b22aaba67
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
3b21dd5bc0f86209d9ea134523a494cfe9da601c 26-Nov-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: Implement dump function

Does a basic implementation of the dump function
called by SurfaceFlinger in dumpsys.
Further logs in different areas can be added later on
using the dumpsys_log utility.

Change-Id: I2194b4ed7f10947272b7b824ef802ce2ee3c8a48
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
33ecf33ed4881d0b76ceffb8a6f34dc8fa775ed2 08-Dec-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: use layercache for external display

Bug: 7668141
Change-Id: I14ac72f8084b328f5b3aca61b85e75f117785add
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
53bdba54f2eb33c5e8133d75d149f5ede92baa33 03-Dec-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: Avoid MDP composition with alpha scaling

MDP4 supports scaling with alpha, only in RGB pipes.
In some cases this scaling happened with video pipes.
We now fall back to GLES composition for layers that have
alpha and need scaling.

Bug: 7648647
Change-Id: I084355bad1cdb17c7308077b56006c59e75d2042
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
65bb464dab7f1b35ffd4dda11a3d16885bbadf2d 29-Nov-2012 Naseer Ahmed <naseer@codeaurora.org> libhwcomposer: Add support for 4 layer MDP Comp

This change extends MDP composition to support
upto 4 layers by making border fill as base pipe and
using all MDP h/w pipes in overlay mode.

Conflicts:

libhwcomposer/hwc.cpp
libhwcomposer/hwc_utils.cpp
libhwcomposer/hwc_utils.h

Bug: 7626586
Change-Id: I01a0e53ddfbcf3ed46734f6f3bb0ef7d912ceac6
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
d551ebe2cb65d9da47d3e25f6004b8870afec8b4 28-Nov-2012 Naseer Ahmed <naseer@codeaurora.org> hwc/overlay: Dynamic pipe tracking.

Remove state based pipe handling and make pipes tracked dynamically.
Add the configStart, configDone, nextPipe availablePipes APIs.
Remove setState API.

-configStart marks all pipes available.
-configDone garbage-collects unused pipe objects.
-nextPipe returns the index of next available pipe and create a corresponding
pipe object if not present
-availablePipes returns total of "unallocated" pipes. (Pipes could be allocated
but unused)

Changes in hwc adapt to the new overlay APIs.
Compile out MDP comp.
Remove unused files in overlay and hwc.
Update licenses.

Conflicts:

libhwcomposer/hwc.cpp
libhwcomposer/hwc_utils.cpp

Bug: 7626586
Change-Id: Id8e56901d34e5dc0fd088260d05e3e46f68ff090
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
89f9d5d65dc4f3ef2bea3d3b091069cb6af0fc38 17-Oct-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: cache layers on framebuffer

In the cases where all the layers that are marked as HWC_FRAMEBUFFER did not
change, we can mark them as HWC_OVERLAY since their contents are already on the
framebuffer and do not need any additional processing.

This optimization shows power improvement for video playback.

Bug: 7623741
Change-Id: Ia178a926e6f56a3ec9291250a22a66f212c30b14
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
40a1cc58d298a8d2e61df8c3be0d85ddf6996d98 11-Oct-2012 Kinjal Bhavsar <kbhavsar@codeaurora.org> hwc: Create releaseFd even if no HWC layers

Change-Id: Ic12807d47391d7a48b5db118299aaa3e8b9d8625
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
1a8cda0b2cb535656eb18bf5dc07a02fcddec9ab 13-Oct-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: clean up overlay for external from the draw thread only

Cleanup overlay for external from the draw thread. If done from the uevent
thread, its possible that the object being used by draw thread is deleted by
uevent thread.

This also removes unnecessary side-effects where libexternal sets states in
hwc, whereas, it could be set from hwc itself. There should be no need for
libexternal to modify states in hwc.

Bug: 7335863 (partial fix)
Change-Id: If07483e640abae2ced2418e0d5c8f278f8c6ec33
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
541b59d15504bb6e5b9fbeb031aa2287a1abed2a 11-Oct-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: external: Add screen-fitting to external panel.

Screen fitting for out-of-bounds videos (with overlays) exists for primary
panel. Add this same support for external panels, so that GPU won't be needed
in panning use-cases.

Bug: 7313955
Change-Id: I274a821264d87098227b144752f4d0b89d342cd9
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
27c1d65113aaac5c577523132b5b990552284ba9 15-Aug-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: utils: Include orientation while screen-fitting.

MDP doesn't like out-of-screen-bounds parameters. So based on the position of
the layer, we adjust the portion of layer the MDP should pick.

However, this did not factor in orientation, so far. This patch does that and
allows panning to work in other orientations, without having to use GPU.

Bug: 7313955
Change-Id: Ice17ad144abcd60279c2ef9ad87fc617a1bd3621
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
e4f3f721b557c12832be8492c62e76acfa1579eb 06-Oct-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: external: Cleanup overlay objects on external disconnect.

Cleanup overlay objects and close fds when external is disconnected. Without
this, the external does not come on when cable connected-disconnected multiple
times when device is in suspended state.

Bug: 7150885 (part of the fix)
Bug: 7295979
Bug: 7150885 (partial)
Change-Id: I1ae2ce7220b9928dde332ce3644dbe671d25c7e6
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
c4d034f4b8d12953632907d30c0b78856d829579 28-Sep-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: enable dual display on hwc 1.1

Enable dual display on HWC 1.1; video uses overlay.

Bug: 7124159
Change-Id: I8333e46cfc74072f6259fba2b82368f0dd52b6df
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
ff4f0254be575a264504687c407e0db2fd5573d7 01-Oct-2012 Naseer Ahmed <naseer@codeaurora.org> hwcomposer : Use sysfs to read vysnc information

* Read sysfs entries to get vsync timestamp from kernel.
* External display continues to use uevents for hotplug events
* A new thread, vsyncThread is created to read and send vsync
timestamps to HAL.
* Disable H/W VSYNC for MDP 5.x targets until kernel changes are
complete.
* Synchronization is needed to make sure read() is not called
by hwcVsyncThread when VSYNC is disabled.

Change-Id: Iab0a94a3cfce9142b8867859f2a7d9bcaecb0996
Acked-by: Neti Ravi Kumar <ravineti@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
3e858ebde3f2b4e762af8f7f2808d45ba59b890d 18-Sep-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: hwc 1.1 implementation

Bug: 7124159

--External disabled
--MDP comp coded but disabled.
--Videos via overlay, so that secure videos can work.

Change-Id: Ie48b264143d5e4237ab9724e28930e3f68ba49ee
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
2dd04a873bc3d4b3ca50121347a8c702d097a2df 19-Sep-2012 Kinjal Bhavsar <kbhavsar@codeaurora.org> hwc: sync-point implementation.

Add sync pt implementation.
Add genlock and sync pt under conditional compilation flags.

Change-Id: I32fb7f6051ccc706662152e90ac15b6b6743f897
Signed-off-by: Iliyan Malchev <malchev@google.com>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
35712cb6398dc0f7442fe8951ce1e6eec4647f5c 14-Sep-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: Use overlay for video even during popups.

Continue using overlays for videos even during popup animations.

Change-Id: I6e3b1a2dc3328312f6f1745eded6f18a83fda1cd
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
56f610dd235b577725198e9341caae92379fdf23 08-Aug-2012 Saurabh Shah <saurshah@codeaurora.org> display: Create QService binder interface.

Add QService binder interface to enable communication
to display by the mediaserver for Securing/Unsecuring start and end
notifications.

Create separate lib for external.
Clear reserved field before applying format.

Change-Id: I463c9c6deac7587bd0c4e0b84513b5d0b5dd7e98
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
661a58f851b67427ab55e65610fb9173562c7043 31-Aug-2012 Saurabh Shah <saurshah@codeaurora.org> hwc: Do not create copybit.

Do not create copybit instance.
Fix copybit init and deinit sequence.

Change-Id: Ia669f4cc89c85294a040400a750aa72a93e579b8
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f395d09031d07ea4836f4c6e0e597aee1830bac6 27-Aug-2012 Saurabh Shah <saurshah@codeaurora.org> hwcomposer: keep secure content in an overlay when below skip layer

Secure content can not be displayed unless in an overlay. Since
getLayerStats marks all layers under the skip layer for framebuffer
composition, when there is a skip layer on top of protected content,
the protected content disappears since surfaceflinger doesn't draw
protected layers.

Acked-by: Amara Venkata Mastan Manoj Kumar <manojavm@codeaurora.org>
Change-Id: I59dd5dffad08dbf578baa459f5f4c726b6674c83
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
fc2acbe75484dea7197b75d0ef9889f78398b06b 18-Aug-2012 Saurabh Shah <saurshah@codeaurora.org> hwc/fb/overlay: wait for fbpost and pan display

Draw sequence in hwc_set
--eglSwapBuffers
--wait for fb_post. Its ok to draw to External only at this point.
--draw to external | Parallel with PAN
--commit to external | Parallel with PAN
--wait for pan (happening in fb_post) to finish.

Call MSMFB_OVERLAY_SET ioctl only when params change.

These thing together ensure a correct sequence and should fix tearing and
stuttering, the latter assuming there are no other display pipeline delays.

Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>

Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
3be78d9816da84e48a40232165189f9deb16808f 22-Aug-2012 Jesse Hall <jessehall@google.com> Update for cleanups in hwc interface

Also store the hwc_procs_t* into a dedicated field instead of one of
the hwc_composer_device_1_t::reserved_procs slots, which are supposed
to be NULL so the structure can be extended without breaking backwards
binary compatibility.

Change-Id: I11e6bc713958d854aba418242caa749cbcb21f1d
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
5b6708ac87dc9681b3dd142b82702a8b995c6e22 02-Aug-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: Update to new API

* Updates HWC to use the Jellybean MR1 API
* Remove qcom_ui which was using parts of the old API

Change-Id: I663363547b193d2318aae88f2256a9baed1e3d4b
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
4c588a200c537224d4eb5f63fb0a88f791511ff2 01-Aug-2012 Naseer Ahmed <naseer@codeaurora.org> hwc: Add support for external-only layers

Add support for different types of external-only layers
EXTERNAL_ONLY: General purpose
EXTERNAL_BLOCK: Blocks the display of other ext-only layers
EXTERNAL_CC: Used for closed captions with videos.

Change-Id: I9cc7b9a1dbf1085194725474d6a4d1094e27a0c8
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
96c4c95d48dc075196c601b30a8798a262df9720 26-Jul-2012 Naseer Ahmed <naseer@codeaurora.org> display: Get panel type from framebuffer

Change-Id: I3b7cb78d7c6019482ae698b30d553ca782f5022b
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
7c958d445fe88a82eedbd1b887cd1e474a7526b1 01-Aug-2012 Naseer Ahmed <naseer@codeaurora.org> display: Add support for MDP Composition

This change
1) implements MDP Composition upto 3 layers
2) adds invalidator support to fall back to FB
composition during idle screen condition.

Change-Id: I55f27321fd0df096b353d66aaad1cc720cd4b84b
Acked-by: Jeykumar Sankaran <jsanka@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
72cf9762f84aab07faab86e35fe830b63ec54d72 21-Jul-2012 Naseer Ahmed <naseer@codeaurora.org> display: Enable vsync

* Use the vsync uevents from the kernel to start
surfaceflinger composition.
* This patch also does some code cleanup
- Move copybit specific functions to copybit files.
- Cleanup verbose logging.

Change-Id: I36936e4b0a082cfb0347d8ee7d2bc936e01808e6
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
31da0b1f44d5ff8f95be2b440df3cdd8c5c396d4 01-Aug-2012 Naseer Ahmed <naseer@codeaurora.org> display : Add support for copybit composition

This change add support for copybit composition in display HAL
for MDP3 targets.

Change-Id: I9bc8e40f624b0760f4faa223cb03a13695611bb3
Acked-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
0c8b7b5c841a7fad5df11b7e02d7cd792cfcc734 20-Jul-2012 Naseer Ahmed <naseer@codeaurora.org> hwcomposer: Add support for UI mirroring

- Uevent observer as part of Hwcomposer
- HPD, enabling/disabling external display from HWC

Change-Id: I52b4f30c78e98c5b52c86722046389f458c2dbee
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
f48aef64b218d42bd2ede62dcb03a3d7831ebbf9 20-Jul-2012 Naseer Ahmed <naseer@codeaurora.org> liboverlay: Refactor, bug-fixes, upgrade.

* Fix memory leak during copying pipe objects.
* Remove unused / unnecessary code.
* setMemoryId API is merged with queueBuffer.
* setParameter API is setTransform now.
* Rotator upgraded to:
--Allow different rotator hardware types.
--Remove dependency on MDP code.
--Allocate memory only during first playback,
close when the associated pipe is closed.
* Have single commit implementation.
* Include new format types.
* Remove WAIT and CHANNEL enums and usage. Replace BypassPipe with
GenericPipe. Client expected to set alignments and parameters.
Add transform combination enums.
* Allow APIs to be called in any order. Do transform calcs in commit.
Move ext type setter and getter functions.
* Add calculations for 180 transform.
* Add secure session support in rotator
* Implement all rotations in terms of H flip, V flip and 90 rotation.

Change-Id: I34a9a2a0f1255b3467a0abbaa254d0b584e901ce
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
a87da60090f55b823ee999930b381daa3dbda67e 02-Jul-2012 Naseer Ahmed <naseer@codeaurora.org> display: Add QC Display utils

* Rename qcomui directory to qdutils
* Avoid inclusion of qcom_ui header
* Add class to get MDP version
* Add namespace for qdutils to prevent collison

Change-Id: I9a3f440e6b0fea1cfcc478ddca90af5df3bbb897
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp
29a26818d7294055539167b2fbfdaa168bcf725c 14-Jun-2012 Naseer Ahmed <naseer@codeaurora.org> qcom/display: Update HALs

- Update the display HAL from Code Aurora Forum
- Add updated overlay library
- Enable HWC with basic video going through overlay
- Cleanup some files

Change-Id: I65c687c51be458cee71213c79e03eeda962d9086
/hardware/qcom/display/libhwcomposer/hwc_utils.cpp