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: Device mutex lock for kgsl_cmdbatch_destroy

kgsl_cancel_event must be called with device->mutex
otherwise it will cause a BUG_ON in kgsl_cancel_event

kgsl_cmdbatch_destroy will call kgsl_cancel_event, hence added
device->mutex lock/unlock wherever kgsl_cmdbatch_destroy is called

Change-Id: I9b9959236d6be0d80987279a64a0715363229f7b
Signed-off-by: Anupam Sakargayan <asakarga@codeaurora.org>