msm: kgsl: Set snapshot_atomic only after passing all checks

Ensure that the device is powered on and memory is successfully
allocated before setting device->snapshot_atomic to true.

Change-Id: Id11b13e51acb26e024cbed7d8e58940c6e0292a2
Signed-off-by: Rohan Sethi <rohsethi@codeaurora.org>
This commit is contained in:
Rohan Sethi 2021-05-13 13:07:59 +05:30
commit df6dfd9a14

View file

@ -678,8 +678,6 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
struct kgsl_snapshot *snapshot;
phys_addr_t pa;
device->snapshot_atomic = true;
if (device->snapshot && device->force_panic)
return;
@ -703,6 +701,7 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
if (snapshot == NULL)
return;
device->snapshot_atomic = true;
INIT_LIST_HEAD(&snapshot->obj_list);
INIT_LIST_HEAD(&snapshot->cp_list);