h/q/d: Optimize framebuffer layer update

While doing mixed mode composition, update only the region of the
framebuffer where layer contents are cached or updated. Avoids
MDP fetch for non-visible contents of FB.

Change-Id: I20997d79e02a6bac60d7333c28c6dde134263197
qdutils: Refactor idletimeout fallback mechanism.

1. Use kernel timer interrupt to signal about the timeout to
   Invalidator thread and fallback to GPU composition.
2. This implementation avoids waking up the Invalidator thread for
   every idletimeout value during continuous update.

Change-Id: I4370f10a0ca06b5cb1e7bdcb047e9c8daec51afb
hwc: mdpcomp: Remove pipe estimation blocks

Pipe estimation was necessary when the unavailability from overlay
led to GPU fallback.
With the new design, hwc uses the next best strategy, so failure
to grab a pipe from overlay is ok.

Change-Id: Id20d2e6fd24aeb5af3ab84ec9dd8c52f6bbbef8b
hwc: Remove bandwidth checks

Bandwidth checks will be done in the driver as part of resource check
which makes the existing checks in hwc redundant.

Change-Id: I39eb7de63618e8ea5981f9e1a1159224831f314a
hwc: Iterative Load based comp

While performing load based mixed composition, iterate from max
stages of mixer to at least 2.
Get rid of modes that preferred GPU or MDP. This new mode will
include both plus the missed out batches.

Change-Id: Ideb06a2332fe2f59968367d28df848be01f4aedc
display: Remove klockwork warnings and errors.

Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.

Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
common: Do not link to ABL lib

The library is not used in the code. If used in the future, it
can be linked to with dlopen.

Change-Id: I5af0847f0838f26c3c7f39375d3f082b1d3b8a6c
hqd : Use proper type casts

    * Remove compilation errors
    * Use proper type casts

Change-Id: I1d44c2a2362a1fdd4d6e412ea816d4078e8355c9
:
overlay: rotator: Remove previous allocation for a session

When ION was not ref counted, we needed to maintain the previous
session memory until the new one was taken by MDP. ION being
ref counted now, it is not necessary to maintain previous memory
allocation.

Change-Id: I102df065bb288a661d509912f4c7b894505df393
HWC/copybit: Add ceil value for downscale value

We are dividing (in downscaling case )the src rect value
to get intermediate value of dst. And due to rounding we
may not get exact ratio of src and tmp dst in kernel or
else where.Hence using ceil value.

CRs-Fixed: 618847
Change-Id: I8b95c3e00e83ff986d95e063d5927a3c57a13ff6
hwc : Skip panel reset sequence if panel is already off

Do not proceed with panel recovery sequence if panel is already off.
Proceeding with reset sequence, if panel is already off, results in
race conditions.

One e.g., there is race condition between early suspend triggered
by pressing power key and panel recovery triggeredby ESD uevent.
If pressing power key happens exactly at kernel DSI driver is
reporting ESD uevent, it's likely that panel will be unexpectedly
on by ESD uevent after having blanked the screen by early suspend.

This change avoids unintentional panel recovery in the case above.

Change-Id: I19022691ec3c178f62f392913435ddc032ee1ab2
CRs-Fixed: 613155
Merge branch 'cm-11.0' into kk_mkt