msm: kgsl: Add sysfs node to control legacy snapshot

Sometimes the crashdumper fails and we fall back to the legacy
path, which means we fall back to reading the registers through
host cpu. This leads to access violation because some register offset
might be protected in the TZ. To avoid this, set the default
behaviour to never do the legacy path in snapshot for register
offsets that are protected in the TZ. Enable the legacy path through
following sysfs node if and when needed.

/sys/class/kgsl/kgsl-3d0/snapshot/snapshot_legacy

Change-Id: I7475042ac1271605d32c486fa0b86fd0bacb1046
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
3 files changed