msm: qmi: Fix access-after-free condition

In case, the sending of a message from handle_resume_tx fails, the
transaction is freed and the failure info is printed in the kernel log
which results in an access-after-free condition.

Free the txn after printing the error message.

CRs-Fixed: 525365
Change-Id: I111634948fa2e8a9737b77a658283ae6d1562531
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
msm: kgsl: Protect against a potential overflow in kgsl_sg_alloc

Avoid allocating a scatterlist so large that it overflows the size
passed to the memory allocators.

CRs-fixed: 564448
Change-Id: Ic0dedbad2ab421ddec8f3be38d61c9bdf9ae5bd4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Add TSE performance counter to software hang detection

Our current hang detection logic covers rendering pass by checking for
shader performance counters but it does not cover the case where there
is long binning or resolve pass. For long binning pass shader is inactive
making our current hang detection logic faulty. Checking for TSE number of
input primitives covers binning and resolve passes and makes our hang
detection logic robust.

CRs-fixed: 521284
Change-Id: Ifdec4b53685903456feb367f64380119b1485408
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Release hang detect performance counters when not in use

If hang detection is disabled via sysfs or ioctl() release the
performance counters that the hang detection uses so the counters
can be available to other consumers.

CRs-fixed: 533729
Change-Id: Ic0dedbad6998bbdab0f088a45c2bbf6e426e232d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: ipc: Add HSIC Transport for off-chip communication

Register a new transport that enables off-chip communication of
IPC Router through HSIC.

Change-Id: I6c37759fd25cad2d2861dfcadaee0881033003ce
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>