msm: kgsl: Don't use uninitialized values in hang detection

Under some circumstances some of the registers used for hang detection
are not defined (usually because the hardware doesn't support them).
The hang detect code properly skips those registers when reading the
hardware but the corresponding offsets in the destination array are
still compared to detect a hang.  Since the array was defined on the
stack and those particular members were never read from the hardware
the values could be non zero a real GPU hang could be missed.

Skip the undefined hang detect registers in all three for() loops
where the list of hang detect registers are used.

CRs-fixed: 540224
Change-Id: Ic0dedbad6e654e3a4e6db5468eac698e91e7f32b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
1 file changed