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

Commit 3e4e8bb6 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Correctly save the process mem entries in snapshot



All the mem entries were being written to a single location hence
the snapshot consisted of only the last mem entry of the process.
Fix this by writing each mem entry to consecutive location in the
snapshot.

Change-Id: I1971fc4b3adce3146768862a56db2b11c6ac44c4
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent d871aa00
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -434,10 +434,11 @@ static int _save_mem_entries(int id, void *ptr, void *data)
{
	struct kgsl_mem_entry *entry = ptr;
	struct mem_entry *m = (struct mem_entry *) data;
	unsigned int index = id - 1;

	m->gpuaddr = entry->memdesc.gpuaddr;
	m->size = entry->memdesc.size;
	m->type = kgsl_memdesc_get_memtype(&entry->memdesc);
	m[index].gpuaddr = entry->memdesc.gpuaddr;
	m[index].size = entry->memdesc.size;
	m[index].type = kgsl_memdesc_get_memtype(&entry->memdesc);

	return 0;
}