msm: kgsl: Enable protected mode for A3XX

Enable protected register mode for A3XX with these commits from
msm-3.10:

msm: kgsl: Enable protected register mode for A3XX
msm: kgsl: Print the register that causes a protected mode error
msm: kgsl: Unprotect the VBIF performance counters

Change-Id: Ic0dedbad950ffbd063fd861d9440bb5dce8d5fb1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Protect SMMU registers from being written by the GPU

Put the SMMU register range in protected mode to shield them from
IB1/IB2 writes from userspace.

CRs-Fixed: 599971
Change-Id: Ic0dedbad8c03fc1c54ff73221231e2440d3c34dd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: get pm_qos_latency from device tree

pm_qos_latency parameter can be configured from
device tree as well. Will set to default value if
entry not found in target device tree.

Signed-off-by: Dan Trifan <jimsth@gmail.com>

Conflicts:
	include/linux/msm_kgsl.h

Change-Id: I76271f4fdc26e191431e5dfe2a6de9e2b3ab426f
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: change pm_qos_latency to pm-qos-latency

Use hyphen symbol instead of underscore for pm-qos-latency
property name. Hyphen should be used instead of underscore
in device tree property name.

Change-Id: I23f720159b4ecb3d81cbd13b570cee8fc633253a
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Remove unused legacy IB timeout variables

Remove unused variables from legacy IB timeout detection.

Change-Id: I4df94ee43072ccebff4045c5950edbc406de38a8
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: Dump snapshot for long IB timeout

Dump snapshot when long IB timeout is detected. The GPU
command processor is halted on long IB timeout detection,
this will halt the GPU pipeline, dumping the snapshot at
this point is safe and gives us information to debug
long IB timeout.

Change-Id: I51bb73b66e11c3b6945c3dfe92af03e21e3c0e62
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: kgsl: use %pK to restrict printing GPU / memory addresses

Use %pK in the output for the per-process memory dump to keep from
printing the GPU and user memory addresses for the GPU memory
objects own by the process.  This allows us to make the 'mem' file
world readable without exposing any really dangerous information.

Change-Id: Ic0dedbad21654110905d1b3744f562966584d8ed
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Signed-off-by: Dan Trifan <jimsth@gmail.com>