Display driver changes

Add changes to support M2,T3,E3 devices

includes
commit a9c352bc0ce39bc8b5155ff5a197c4788e70593d
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Mon Dec 1 22:50:54 2014 +0000

    Port Flamingo display to Sony's unified display driver

commit acc25abf8933fa40ffa1798ad3a37dc09aefeeaa
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Tue Dec 2 10:45:04 2014 +0000

    video: msm: mdss: mdss_dsi_panel_driver: Add somc,no-vsp-gpio property

    Some devices don't need/have this GPIO, so the driver
    can continue to go through its code even if we
    haven't specified the somc,vsp-gpio property.

commit 7cf303074cf6ec93b230656c8d0334a0684f26d9
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Tue Dec 2 14:46:16 2014 +0000

    arm: Seagull: Welcome to the Sony Unified display driver

commit edf230222fde4e12dc18867521dd99bdf3520d6b
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Tue Dec 2 15:11:36 2014 +0000

    video: msm: mdss: mdss_dsi_panel_driver: Fix mistake

commit 017ab0ca4a77ae2e2e353140d30c86084238ba61
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Wed Dec 3 11:19:40 2014 +0000

    video: msm: mdss: Add upside down panel support

commit 8000d028700d2853be252dda53980304c8485999
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Mon Dec 8 12:34:36 2014 +0000

    drivers: video: msm: Make Seagull's display to work (see comment)

    The panel enable/disable/reset logic is now okay, but we still
    have to fix the panel detection because actually there's some
    problem that makes us unable to read the panel ID.
    At this stage, the only working panels on Seagull
    are the two JDI and it's only because of a coincidence in
    the bad id detection that now reads 0x00 (same ID as JDI panel).

commit 19ac1fdfb3ee9c3ef8bde75b12fe8a59c1ec2084
Author: erikcas <erikcas1972@gmail.com>
Date:   Sun Dec 7 10:42:51 2014 +0100

    silence compilation warnings on use of void + return

    Change-Id: Ia7dae48d00970dfe3e8d033349ffd39435a69383
    Signed-off-by: erikcas <erikcas1972@gmail.com>

commit b1e7735df0c22f67bd95fef1845a488dc6b7214f
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Thu Dec 11 10:56:09 2014 +0000

    Seagull: Fix first panel init

commit a36adb886a65139a60392bbb1d09c72238808d28
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Fri Dec 12 11:25:59 2014 +0000

    msm: mdss: add support for 565 macro tile formats

    Extend macro tile format support to rgb565 and bgr565.

commit efa7dd04b3e195dd707514209ae865230b3c8ee0
Author: Angelo G. Del Regno -- EternityProject Team Manager <kholk11@gmail.com>
Date:   Sun Dec 14 10:09:16 2014 +0000

    drivers: video: msm: mdss: Add ifdefs in mdss_dsi.h

    Some structures, definitions and enumerations are needed only for
    Sony's unified display driver.
    Use ifdefs around those, so that the code will be "marked" and
    it'll be easier to read (and easier to port elsewhere if needed).

Signed-off-by: Alin Jerpelea <alin.jerpelea@sonymobile.com>
ion: typo fix

Signed-off-by: Alin Jerpelea <alin.jerpelea@sonymobile.com>
avtimer: msm: allow driver to register to SSR framework

Sub System Restart[SSR] framework allows driver to handle
unexpected crash in middle of operation.
Also, adding support clk_div dtsi entry to calculate
avtimer_lsw value.

Change-Id: I521e3c010dadd00a06a0fe8998a1759b2eb81b55
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
msm: vidc: Handle hfi session creation failures properly

Previously, when the hfi session creation failed, the hfi session was
left intact.  So, in case of timeouts, if the core responded beyond the
time out, the driver would handle the message thinking that it's a valid
session.  This commit cleans up the hfi session in case session_init
fails (or times out).

Also rename msm_comm_recover_from_session_error to msm_comm_kill_session,
as the latter was a misnomer, as the function was used to abort a session.

CRs-Fixed: 762541
Change-Id: I9ec4337014f012b6c0f677c5c4844bf9b28c9899
Signed-off-by: Manikanta Sivapala <msivap@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/vidc/msm_vidc_common.c
msm: vidc: Handle max clients error from video hardware

Use instance "lock" instead of "sync_lock" variable for
mutex lock/unlock for video instance state change operation
else session init will be timed out due to dead lock when
max clients error is received from video hardware because
"sync_lock" is already acquired before session init.
At the same time do not free the session when any error
is received from video hardware, if freed results in
dangling pointer access when video driver wants to send
any commands to video hardware after session error,
leading to device reset. The proper way of session cleanup
is already being done upon receiving any errors from
video hardware.

CRs-Fixed: 762541
Change-Id: I689dd255681826508069fa86fb5a87f92fc775b5
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
msm: kgsl: Disable shader memory dump during snapshot

Disabling shader memory dump for these chipsets(8974, 8x26, 8x10).

CRs-Fixed: 650035, 637989, 631728.

Change-Id: I3a56810147e16763eaf3131aa837ed535a447e69
Signed-off-by: Anupam Sakargayan <asakarga@codeaurora.org>
msm: kgsl: Increase fault timer for slower a305 GPU

Slower GPU's need larger fault timer to detect hangs correctly.
we use 50ms fault timer for faster GPU's, a305 GPU is slower
compared to faster GPU, use a larger 200ms fault timer to
prevent false hang detection.

Change-Id: I0f0bf492ae2d9941979893b75b2e1dbc832e1ba8
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Increase fault timer for A305B GPU

Slower GPU's need larger fault timer to detect hangs
correctly. Frodo A305B GPU is slower compared to faster
GPU, hence use a larger 200ms fault timer to prevent
false hang detection.

Signed-off-by: Prabhat Awasthi <pawasthi@codeaurora.org>
Change-Id: I6338cecc3be81700ab10c45fab66daa7a1078e42

Conflicts:
	drivers/gpu/msm/adreno_dispatch.c
msm: kgsl: Don't block on the dispatcher mutex in issuecmds

Don't block the rendering thread if we can't get our hands on the
dispatcher mutex in adreno_dispatcher_issuecmds(). If the mutex
is held then there is an excellent chance that somebody else is
running the scheduler. To be 100% sure schedule the worker again
to catch any subtle races.

Change-Id: Ic0dedbad8126ebfe776840cd6d7227b39477f3fa
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: store process comm name in kgsl_process_private

Now that contexts keep a reference on their owning
kgsl_process_private, look up pid and process from there.
If the process is exiting while hanging the GPU, the
process name might not be available anymore by the time
we make the snapshot.

Change-Id: If05ae2096dd7d25bfe9931e949759e11ba3cd262
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: Skip the entire command during fault recovery

During fault recovery the algorithm may choose to skip the faulting
command. To skip just one indirect buffer we have to rely on
CP_IB1_BASE but depending on where the fault happened the base could
already be pointing to the next buffer. This causes the code to skip
over the wrong buffer. There is no advantage to skipping just one
buffer vs the entire submission.

Change-Id: I28dc999b2156d05f7b5084df6bdd95c5b9308579
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Add a timer to detect possible syncpoint deadlocks

Use timers to detect when a syncpoint stays active for too long. This
won't avoid deadlocks but it sure will make it easier to debug them.

Conflicts:
        drivers/gpu/msm/kgsl_device.h

Change-Id: Ic0dedbadde07abcc1d39563c3b141591cbf2f634
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Avoid a deadlock with the cmdbatch timer

Don't take the cmdbatch lock while deleting the cmdbatch timer.
This avoids a deadlock where del_timer_sync() waits for the timer
function which needs to take the lock.

CRs-Fixed: 644944
Change-Id: Iaeb5a26b67e96e8e748fb9ff8c26fa8b0f2c3827
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
ASoC: msm: Add async ops for codec TX path

 * Improves low-latency capture performance

Change-Id: I34cdf6da4b8be8cdd4874ca203b1f2ff08eb1dc2
msm: kgsl: Elevate the priority of the thread during adreno start

It turns out that having lots of spurious threads causes race
conditions. Who knew? Instead of spawning a new high prority
thread just bump the priority of the current thread up
while adreno_start is running.

Change-Id: Ic0dedbadf65da11c800578c8769ae844f010e925
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>