diff options
| author | Rajesh Kemisetti <rajeshk@codeaurora.org> | 2017-01-20 13:04:46 +0530 |
|---|---|---|
| committer | Rajesh Kemisetti <rajeshk@codeaurora.org> | 2017-01-20 17:40:31 +0530 |
| commit | 3619a61f04b97ea5e8b863199bf4918465bef613 (patch) | |
| tree | 2399a5e765668ad89deca168db44e0c361b922bf | |
| parent | 1f1d94408446043289fe0126897f98af2dce0ecd (diff) | |
msm: kgsl: Dump preemption record only if it is enabled
During GPU snapshot dump path, a5xx_snapshot() tries to
capture preemption record without really checking on the
availability of preemption feature.
Add a check for preemption feature and then proceed.
Change-Id: I6ee23a1d8006ba18a25fb341bb88d8944ff054b7
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
| -rw-r--r-- | drivers/gpu/msm/adreno_a5xx_snapshot.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/msm/adreno_a5xx_snapshot.c b/drivers/gpu/msm/adreno_a5xx_snapshot.c index bd93ded07131..bc7c0badf189 100644 --- a/drivers/gpu/msm/adreno_a5xx_snapshot.c +++ b/drivers/gpu/msm/adreno_a5xx_snapshot.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2017, 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 @@ -943,11 +943,13 @@ void a5xx_snapshot(struct adreno_device *adreno_dev, a5xx_snapshot_debugbus(device, snapshot); /* Preemption record */ - FOR_EACH_RINGBUFFER(adreno_dev, rb, i) { - kgsl_snapshot_add_section(device, - KGSL_SNAPSHOT_SECTION_GPU_OBJECT_V2, - snapshot, snapshot_preemption_record, - &rb->preemption_desc); + if (adreno_is_preemption_enabled(adreno_dev)) { + FOR_EACH_RINGBUFFER(adreno_dev, rb, i) { + kgsl_snapshot_add_section(device, + KGSL_SNAPSHOT_SECTION_GPU_OBJECT_V2, + snapshot, snapshot_preemption_record, + &rb->preemption_desc); + } } } |
