diff options
| author | Harshdeep Dhatt <hdhatt@codeaurora.org> | 2016-01-25 11:53:13 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:19:55 -0700 |
| commit | d2e98e8037da362df56aeb151988765e49cefd93 (patch) | |
| tree | 2956b43abb1689ce9ca6c0ec13ca08d6229df659 /drivers/gpu | |
| parent | 3c53e0c1bfa75cedfd3de20f8a14389a2db0cea6 (diff) | |
msm: kgsl: Update snapshot ringbuffer parser for type7 ibs
Fix the wraparound logic when searching for ibs in the ringbuffer.
The ibs can either be type3 or type7 packets so handle both cases.
CRs-Fixed: 971163
Change-Id: I9bc4b4a72cddfe7f3d3892612c6e28861fdd0324
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/msm/adreno_snapshot.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/gpu/msm/adreno_snapshot.c b/drivers/gpu/msm/adreno_snapshot.c index a8a055eeae0a..fa30e32fed88 100644 --- a/drivers/gpu/msm/adreno_snapshot.c +++ b/drivers/gpu/msm/adreno_snapshot.c @@ -322,7 +322,10 @@ static void snapshot_rb_ibs(struct kgsl_device *device, index--; if (index < 0) { - index = KGSL_RB_DWORDS - 3; + if (ADRENO_LEGACY_PM4(adreno_dev)) + index = KGSL_RB_DWORDS - 3; + else + index = KGSL_RB_DWORDS - 4; /* We wrapped without finding what we wanted */ if (index < rb->wptr) { @@ -331,9 +334,19 @@ static void snapshot_rb_ibs(struct kgsl_device *device, } } - if (adreno_cmd_is_ib(adreno_dev, rbptr[index]) && - rbptr[index + 1] == ibbase) - break; + if (adreno_cmd_is_ib(adreno_dev, rbptr[index])) { + if (ADRENO_LEGACY_PM4(adreno_dev)) { + if (rbptr[index + 1] == ibbase) + break; + } else { + uint64_t ibaddr; + + ibaddr = rbptr[index + 2]; + ibaddr = ibaddr << 32 | rbptr[index + 1]; + if (ibaddr == ibbase) + break; + } + } } while (index != rb->wptr); /* |
