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: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2015-12-28 13:02:02 -07:00 committed by David Keitel
parent ef6ab14b27
commit 68d94e70f6

View file

@ -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;
}