Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df6dfd9a authored by Rohan Sethi's avatar Rohan Sethi
Browse files

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: default avatarRohan Sethi <rohsethi@codeaurora.org>
parent 3ecdedce
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -678,8 +678,6 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
	struct kgsl_snapshot *snapshot;
	struct kgsl_snapshot *snapshot;
	phys_addr_t pa;
	phys_addr_t pa;


	device->snapshot_atomic = true;

	if (device->snapshot && device->force_panic)
	if (device->snapshot && device->force_panic)
		return;
		return;


@@ -703,6 +701,7 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
	if (snapshot == NULL)
	if (snapshot == NULL)
		return;
		return;


	device->snapshot_atomic = true;
	INIT_LIST_HEAD(&snapshot->obj_list);
	INIT_LIST_HEAD(&snapshot->obj_list);
	INIT_LIST_HEAD(&snapshot->cp_list);
	INIT_LIST_HEAD(&snapshot->cp_list);