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

Commit 0a06efde authored by Lynus Vaz's avatar Lynus Vaz
Browse files

msm: kgsl: Don't read stale crashdumper data



After the crashdumper runs once, and the user sets the
snapshot_crashdumper sysfs node to 0, it is possible that stale data
is saved off into the snapshot. Check the value of the sysfs node at
the appropriate place to force a re-read of the data through the
legacy path.

Change-Id: Icf27c39b68d786003c33fd0eb22bd3e8b9a036be
Signed-off-by: default avatarLynus Vaz <lvaz@codeaurora.org>
parent f85280ce
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -767,6 +767,8 @@ static void _a5xx_do_crashdump(struct kgsl_device *device)

	crash_dump_valid = false;

	if (!device->snapshot_crashdumper)
		return;
	if (capturescript.gpuaddr == 0 || registers.gpuaddr == 0)
		return;

@@ -872,7 +874,6 @@ void a5xx_snapshot(struct adreno_device *adreno_dev,
		ARRAY_SIZE(a5xx_vbif_snapshot_registers));

	/* Try to run the crash dumper */
	if (device->snapshot_crashdumper)
	_a5xx_do_crashdump(device);

	kgsl_snapshot_add_section(device, KGSL_SNAPSHOT_SECTION_REGS,
+2 −0
Original line number Diff line number Diff line
@@ -1519,6 +1519,8 @@ static void _a6xx_do_crashdump(struct kgsl_device *device)

	crash_dump_valid = false;

	if (!device->snapshot_crashdumper)
		return;
	if (a6xx_capturescript.gpuaddr == 0 ||
		a6xx_crashdump_registers.gpuaddr == 0)
		return;