hardware/qcom/display: Remove glfinish call

There is no need to do a glFinish on every composition complete.
glFinish needs to be called for composition cycles where GPU and
copybit are both used for composition. This is because the GPU and
copybit operate on the same framebuffer.

(cherry picked from commit 7983c275ae3eb15fab931d301e6338f83ad4a75a)

Change-Id: I2ff02325afbabf35a753a62209734668e97da521
liboverlay: Use camera heap for targets without mm heap.

for 7x30 MM heap is not available. Use camera heap instead.

CRs-fixed: 407303
Change-Id: Ie94937fb59c40b49d7f5bb30d12b4ddea497a6fc

Conflicts:
	liboverlay/overlayMem.h
libhwcomposer: Fix device freeze on HDMI resolution change

-Mutex dead lock is happening in invalidate call
-Separate invalidation from setExternalDisplay

CRs-Fixed: 395929
(cherry picked from commit eea3d85da7b1179fded16bf4f5abb8054ddb0048)

Change-Id: Ie7e5a015a7ba22f509425d9f17c54bce9fb38697
libhwcomposer: Ensure VG pipe is allocated for UI mirroring

Set OV_MDP_PIPE_SHARE mdp flag to ensure that VG pipe is
allocated when requested for it.

Conflicts:

	libhwcomposer/hwc_uimirror.cpp
(cherry picked from commit 738e810015aa1fb04e46ed1cc984eb45aab298e4)

Change-Id: I333f511e2538871ec534c2b830a6b2f969ecc1af
hwcomposer: Modify qcomuiClearRegion to rely on GPU layers only

Even when GPU composition is used, it is possible that no layers
are going to GPU. (e.g. video playback in overlay targets)

So it is enough to just check for number of layers going to GPU.

CRs-Fixed: 411258
(cherry picked from commit a136b688321d41b7fb2c74c1dfb875e690be23ed)

Change-Id: I8e5974e1fa1f29bfcb67cb3c74ed935e8335a953
liboverlay : Update magnification limit for MDP 400

Update liboverlay to address magnification limit for MDP 400.

MDP 400 has magnification limit of 8, and MDP 410 or later has a
magnification limit of 20.

CRs-Fixed: 413535
Change-Id: I7e1c83f1d0087ecb54208a26a49a977497e48ab5
hwcomposer : Send Video layers below skip layer to GPU

We need to send video layers below skip layers to GPU, to avoid
artifacts, during video animations.

This is not applicble for 3D and interlaced videos, as they are
not supported by the GPU, and we will see a blank screen.

Change-Id: I45f61e3a8bdb538d5dfd8c5f39b7ec5443d7074b
CRs-Fixed: 410039
hwcomposer : Use sysfs to read vysnc information

* Read sysfs entries, to get vsync timestamp from kernel.
* External display continues to use in ueventThread.
* 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.

Cherrypicked from  Ib3ae09734cb8a113ba2a25f7afae8ff468397480

(cherry picked from commit 6e103db9ae4cc11d25c4d08edabf11414c745531)

Change-Id: I51ff1bcca0a4f57ec01358d0c438397ed8953598
hwcomposer : Synchronize EventThread, and hwcVsyncThread

Synchronization is needed,to make sure, read() is not called
by hwcVsyncThread when VSYNC is disabled.

Otherwise in usecases, where display is OFF, and still some
tasks keep running in the background; SurfaceFlinger hogs
CPU.

Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
(cherry picked from commit 9d9ac85f584d5082e07e24d3fad7466ccda03b14)

Change-Id: Ic7dd7d62be1b38cde9f1871fb990bf299b485aa2
liboverlay: Fix rotator memory leak on hdmi resolution change

-On hdmi resolution change close pipe is getting fail as pipe
is already freed in dtv off.This doesn't allow rotator free
call and add memory leak.
-Add support for rotator free call even close pipe fail.

CRs-Fixed: 408959
(cherry picked from commit a55569175a53b6d5db091fd7cd6240a0993822af)

Change-Id: I4fe1bcc04f07023f976fd79303ddb4ffaa83e494
hwc: Increase priority of Vsync thread

Add ANDROID_PRIORITY_MORE_FAVORABLE priority to Vsync thread.

Change-Id: Iaad1e97a9cd80b3e486ca39a470fba7a299701a5
hwcexternal: fixes in hwc_external

- instead of FBIOPUT_VSCREENINFO ioctl, use the new ioctl
  OVERLAY_PIPE_COMMIT to update the external display
- when MSMFB_OVERLAY_VSYNC_CTRL ioctls fails, return -errno

Change-Id: Ie37309615f7fa39f20fa347fc53c04f7fcab9740
CRs-fixed: 391564

Conflicts:

	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_external.cpp