msm: kgsl: Create a separate function to extract valid commands
msm: kgsl: Create a separate function to extract valid commands

Create a separate function that extracts valid commands from good
contexts and invalid commands from bad contexts during recovery

Change-Id: Icffe34821c1b70ca1a8c1a8e13a0b7e23d0ec193
Signed-off-by: Shubhraprakash Das <af9cbceb8388e2170881d17f5ca88833c5c37ed6@codeaurora.org>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas