framebuffer: add alternative RGBA offset for SEMC 7x30

Change-Id: I3b4458ccb1439e51c56dcb242473bd3cb4601e39
Revert "hwc: Fix deadlock due to async signal handler."

This reverts commit 18f69fc3eb9530bec940de3ae7edc71c41ba7ec8.
Revert "libhwcomposer: Make fb width 32 aligned."

This reverts commit 59fede11246cbb1c837a567d276d108c1abaccca.
Revert "libqcomui: Allocate idleTimer dynamically and arm it to expire once"

This reverts commit 61ecc6edd8c9893816765929ad2302301b910a41.
Revert "libhwcomposer: Remove dimension Align checks for copybit"

This reverts commit 3f0d831c9e4e81ec3989b145be96e9c5d9f98a60.
Revert "display: Readd yield in HDMI state change"

This reverts commit e929e2928582dd3ca3977aece57e14200b964009.
Revert "framebuffer: Remove extraneous update on HDMI"

This reverts commit c11ecacc6f05815e4fad4e7b9a5b53c748924f47.
Revert "HWComposer: Set the transform value correctly"

This reverts commit ab0a62f94f9f6c6fd30291383d327e79926966b4.
Revert "hwcomposer: Add workaround for cropped layers during bypass"

This reverts commit 537ed59de42bf370d8c1ca27e3ba8658475d75b2.
HWComposer: Set the transform value correctly

When using the bypass, read only last 4 bits of
the transfrom value regarding the change of
transform value in Layer::setGeometry().

(cherry picked from commit 7689940bec6440b78418cb15a9888312ab96ea04)

Change-Id: Ida5781e3e92929b8024947a41e5521f83164a4f7
framebuffer: Remove extraneous update on HDMI

HDMI should be updated only in conjunction with primary.
Which means on a resume from suspend (which is treated as
cable connect in HALs) we need not draw ahead of primary.

A good way (already existing) is to call invalidate() on SF
on cable connect so that primary is updated and only then HDMI,
by a trigger from disp_loop thread.

Change-Id: I7d5268b2f0e27adb04aade757c36483cdfc1333e
CRs-fixed: 335763

Conflicts:

	libgralloc/framebuffer.cpp
	libhwcomposer/hwcomposer.cpp
libhwcomposer: Remove dimension Align checks for copybit

gralloc is already taking care of source buffer width alignment
based on the color format.Alignment should be based on source format,
But not dependent on FB format.

CRs-fixed: 344311 355814
(cherry picked from commit 8c8edc440288def7017eb12d93391cb785196f55)

Change-Id: Id83f926068d65896b6c7bb93dd086aa9d8c3b406
libqcomui: Allocate idleTimer dynamically and arm it to expire once

This change:
    1) Allocates idletimer object dynamically in HWC to explicitly
       initalize its members
    2) Modifies idleTimer arming logic to expire only once after given
       timer delay

CRs-Fixed: 365305

(cherry picked from commit 3091112c6af4ef75e911d59e73029a72704c0f11)

Change-Id: I28f1ffbbbe8dc70d4ae6065866f77ff91bfe3cf9
libhwcomposer: Make fb width 32 aligned.

GPU need 32 aligned FB, and FB driver also expect the same.
It is mandatory for non-32 aligned FB resolutions like QHD panel.

CRs-fixed: 355814
(cherry picked from commit 2febae47ebd2bab247c7eeabb89bdf24438fe7db)

Change-Id: If82315bdf4ec2e7692d8b140efbb13f717dd34d1
hwc: Fix deadlock due to async signal handler.

If an async signal handler tries to acquire a lock,
which the "active thread" already holds, we hit a deadlock.

--Remove signal handler.
--Create a separate thread for invalidating drawing after
  a specific timeout.

Flow:
Draw thread asks invalidator thread to sleep on an MDP comp update.
On invalidator thread wakeup, if there were no MDP comp draw updates,
it triggers a forcible draw using c2d / gpu + close MDP comp channels.

CRs-fixed: 365753
(cherry picked from commit 14fe810804ac16b36d56c39eb402ad08658c5e62)

Change-Id: I61bd325e4d92fd5d6ea8e9e13b8aa8c0139880b5
Framebuffer : Pass actual display buffer size

When opening the HDMI mirroring channel, use actual display size.

Change-Id: Ib3a6563de50844575d01df828c8ccedf06c58dc1
libhwcomposer: force secure buffers to MDP.

For secure buffers even if display coordinates are out of
screen bounds, calculate right clip coordinates and push it
to MDP as GPU can not render secire buffers.

CRs-fixed: 363835
(cherry picked from commit f0ba936c52da7ff80ba014d3af4b6aa1d40b61f5)

Conflicts:

	libhwcomposer/hwcomposer.cpp

Change-Id: I40c94f167bcb44788e4a674bbc38ea4a939c5710
(cherry picked from commit f0ba936c52da7ff80ba014d3af4b6aa1d40b61f5)
libhwcomposer: Add check for downscaling with alpha in MDP composition.

MDP supports downscaling with alpha only in RGB pipes. This change checks
for the number of layers which need downscaling with alpha and falls back
to FB composition if we have more than one such layers since bypass have
access to only RGB2 pipe in MDP composition.

CRs-fixed: 356654
(cherry picked from commit 70d7fac863b1565c81d58add028590001dc7e402)

Conflicts:

	libhwcomposer/hwcomposer.cpp

Change-Id: I089e0424cce3f6beeb904bbab4b3c43da9a6f2d4
liboverlay: Fix the horizontal displacement issue on 3D
video on 2D TV

In 3D video capture, right and left cameras are placed at different
view point. so there will be a difference in right and left views.
currently we are displaying left view on the primary panel and right
view on the external display.

Change: Display left view of 3D video on both primary and external
2D display devices.

CRs-fixed: 368673

(cherry picked from commit 28c5f1a802bcaa469da55bac9899511e3fa99974)

Change-Id: Ie17191995815678cbfcf995b67522019322e4bb1
libcopybit: Fix UI blur with C2D composition

Enable bi-linear filtering in c2d to fix UI blur
with C2D composition.

CRs-fixed: 367578
(cherry picked from commit fb408361715418a32fc0d0f6379603f131898d26)

Change-Id: Ie46f4fb40a4c6a9e10d31ad444894d4735e9d542