summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm/kgsl_debugfs.c
diff options
context:
space:
mode:
authorHarshdeep Dhatt <hdhatt@codeaurora.org>2016-05-11 09:47:08 -0600
committerCarter Cooper <ccooper@codeaurora.org>2016-08-03 10:34:03 -0600
commit3dd8da5917d63f88e4b0ba6f2ab1e56b0177f66f (patch)
treeced098c06b894523c1e595a2755cfa981f0fcd64 /drivers/gpu/msm/kgsl_debugfs.c
parent8e3020fadb2a19eac5557b91f95353e0ab87356b (diff)
msm: kgsl: Add array of page pointers to memdesc
This is done to improve the kgsl vmfault routine. Currently, it traverses the sglist to find the faulted page, which takes linear time. By having an array of all the page pointers, this operation will be completed in constant time. Also, allocate sgt only for mapping this memory to the GPU. Since this optimization is not needed for secure/global or imported memory, we will not keep this array but keep the sgt instead. CRs-Fixed: 1006012 Change-Id: I221fce9082da0bdd59842455221b896a33a6ce42 Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/kgsl_debugfs.c')
-rw-r--r--drivers/gpu/msm/kgsl_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/msm/kgsl_debugfs.c b/drivers/gpu/msm/kgsl_debugfs.c
index 766cd811588c..93ac790f3a55 100644
--- a/drivers/gpu/msm/kgsl_debugfs.c
+++ b/drivers/gpu/msm/kgsl_debugfs.c
@@ -150,7 +150,7 @@ static int print_mem_entry(int id, void *ptr, void *data)
(unsigned long *) m->useraddr,
m->size, entry->id, flags,
memtype_str(kgsl_memdesc_usermem_type(m)),
- usage, m->sgt->nents, m->mapsize);
+ usage, (m->sgt ? m->sgt->nents : 0), m->mapsize);
if (entry->metadata[0] != 0)
seq_printf(s, " %s", entry->metadata);