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

Commit 06f54444 authored by Urvashi Agrawal's avatar Urvashi Agrawal
Browse files

msm: kgsl: Increase the size of the snapshot for A660



Increase the snapshot size in A660 from 1MB to 2MB,
if the allocation fails fallback to 1MB.

Change-Id: I2186a1547d6ffc51060e3bd8cafb45c65ac270b1
Signed-off-by: default avatarUrvashi Agrawal <urvaagra@codeaurora.org>
parent d5ee68b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1531,7 +1531,7 @@ static const struct adreno_a6xx_core adreno_gpu_core_a660 = {
		.gmem_base = 0,
		.gmem_size = SZ_1M + SZ_512K,
		.bus_width = 32,
		.snapshot_size = SZ_1M,
		.snapshot_size = SZ_2M,
	},
	.prim_fifo_threshold = 0x00300000,
	.gmu_major = 2,
+14 −1
Original line number Diff line number Diff line
@@ -1137,8 +1137,21 @@ void kgsl_device_snapshot_probe(struct kgsl_device *device, u32 size)
	device->snapshot_memory.ptr = devm_kzalloc(&device->pdev->dev,
		device->snapshot_memory.size, GFP_KERNEL);

	if (!device->snapshot_memory.ptr)
	/*
	 * If we fail to allocate more than 1MB for snapshot fall back
	 * to 1MB
	 */
	if (WARN_ON((!device->snapshot_memory.ptr) && size > SZ_1M)) {
		device->snapshot_memory.size = SZ_1M;
		device->snapshot_memory.ptr = devm_kzalloc(&device->pdev->dev,
			device->snapshot_memory.size, GFP_KERNEL);
	}

	if (!device->snapshot_memory.ptr) {
		dev_err(device->dev,
			"KGSL failed to allocate memory for snapshot\n");
		return;
	}

	device->snapshot = NULL;
	device->snapshot_faultcount = 0;