msm: kgsl: Check snapshot status after snapshot

A660 gpu has a new register to track whether any interface
signals changed during snapshot capture.

Change-Id: I24ecc9e98c9c2a745518e95419d5b4cf13fe634c
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2020-01-09 18:09:14 -07:00
commit d84815d98d
2 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
*/
#ifndef _A6XX_REG_H
@ -394,6 +394,7 @@
#define A6XX_RBBM_ISDB_CNT 0x533
#define A6XX_RBBM_NC_MODE_CNTL 0X534
#define A6XX_RBBM_SNAPSHOT_STATUS 0x535
#define A6XX_RBBM_SECVID_TRUST_CNTL 0xF400
#define A6XX_RBBM_SECVID_TSB_TRUSTED_BASE_LO 0xF800

View file

@ -1830,6 +1830,10 @@ void a6xx_snapshot(struct adreno_device *adreno_dev,
if (!gmu_core_dev_gx_is_on(device))
return;
/* Assert the isStatic bit before triggering snapshot */
if (adreno_is_a660(adreno_dev))
kgsl_regwrite(device, A6XX_RBBM_SNAPSHOT_STATUS, 0x1);
/* Dump the registers which get affected by crash dumper trigger */
kgsl_snapshot_add_section(device, KGSL_SNAPSHOT_SECTION_REGS,
snapshot, a6xx_snapshot_pre_crashdump_regs, NULL);
@ -1898,6 +1902,18 @@ void a6xx_snapshot(struct adreno_device *adreno_dev,
a6xx_snapshot_dbgahb_regs(device, snapshot);
}
if (adreno_is_a660(adreno_dev)) {
u32 val;
kgsl_regread(device, A6XX_RBBM_SNAPSHOT_STATUS, &val);
if (!val)
dev_err(device->dev,
"Interface signals may have changed during snapshot\n");
kgsl_regwrite(device, A6XX_RBBM_SNAPSHOT_STATUS, 0x0);
}
/* Preemption record */
if (adreno_is_preemption_enabled(adreno_dev)) {
FOR_EACH_RINGBUFFER(adreno_dev, rb, i) {