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

Commit fbb7d8a4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Use non-atomic snapshot memory if it is unused"

parents 8de67093 552f1199
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -687,6 +687,10 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
	}

	device->snapshot_memory_atomic.size = device->snapshot_memory.size;
	if (!device->snapshot_faultcount) {
		/* Use non-atomic snapshot memory if it is unused */
		device->snapshot_memory_atomic.ptr = device->snapshot_memory.ptr;
	} else {
		device->snapshot_memory_atomic.ptr = devm_kzalloc(&device->pdev->dev,
				device->snapshot_memory_atomic.size, GFP_ATOMIC);

@@ -695,6 +699,7 @@ static void kgsl_device_snapshot_atomic(struct kgsl_device *device)
				"KGSL failed to allocate memory for atomic snapshot\n");
			return;
		}
	}

	/* Allocate memory for the snapshot instance */
	snapshot = kzalloc(sizeof(*snapshot), GFP_ATOMIC);