OSDN Git Service

msm: kgsl: Fix the missing IBs from the snapshot
authorSunil Khatri <sunilkh@codeaurora.org>
Mon, 30 Jul 2018 09:48:17 +0000 (15:18 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 31 Jul 2018 09:52:43 +0000 (02:52 -0700)
We missed updating index for internal IBs like setstate
or power-on fixup.

The index value was never updated after that, so all the
IBs after that index were never parsed, and are missing
from the snapshot.

Change-Id: I61db75f33630db322fe5ee1adce9f120987d32ee
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
drivers/gpu/msm/adreno_snapshot.c

index 711d7ba..6392ec1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -400,6 +400,8 @@ static void snapshot_rb_ibs(struct kgsl_device *device,
                                ibsize = rbptr[index + 3];
                        }
 
+                       index = (index + 1) % KGSL_RB_DWORDS;
+
                        /* Don't parse known global IBs */
                        if (iommu_is_setstate_addr(device, ibaddr, ibsize))
                                continue;
@@ -410,9 +412,8 @@ static void snapshot_rb_ibs(struct kgsl_device *device,
 
                        parse_ib(device, snapshot, snapshot->process,
                                ibaddr, ibsize);
-               }
-
-               index = (index + 1) % KGSL_RB_DWORDS;
+               } else
+                       index = (index + 1) % KGSL_RB_DWORDS;
        }
 
 }