diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-26 02:19:56 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-26 02:19:56 -0700 |
commit | 42ee66277e94a544392cbd599cd9dc0cc73a6f9f (patch) | |
tree | 275f49b6b999b85e8e4884b9413d10d1881e9186 | |
parent | cf59372de2a9f8e6b5589a39dc7b6ec96d373093 (diff) | |
parent | 116f0d6be11dbb8dab690963c198b60af9a5a964 (diff) |
Merge "msm: kgsl: Increase the fenced write timeout"LA.UM.6.3.r4-05500-sdm845.0
-rw-r--r-- | drivers/gpu/msm/kgsl_gmu.c | 14 | ||||
-rw-r--r-- | drivers/gpu/msm/kgsl_gmu.h | 11 |
2 files changed, 21 insertions, 4 deletions
diff --git a/drivers/gpu/msm/kgsl_gmu.c b/drivers/gpu/msm/kgsl_gmu.c index a7b2e42a5ac5..29c190ca1d6e 100644 --- a/drivers/gpu/msm/kgsl_gmu.c +++ b/drivers/gpu/msm/kgsl_gmu.c @@ -1658,7 +1658,7 @@ int adreno_gmu_fenced_write(struct adreno_device *adreno_dev, if (!kgsl_gmu_isenabled(KGSL_DEVICE(adreno_dev))) return 0; - for (i = 0; i < GMU_WAKEUP_RETRY_MAX; i++) { + for (i = 0; i < GMU_LONG_WAKEUP_RETRY_LIMIT; i++) { adreno_read_gmureg(adreno_dev, ADRENO_REG_GMU_AHB_FENCE_STATUS, &status); @@ -1673,9 +1673,19 @@ int adreno_gmu_fenced_write(struct adreno_device *adreno_dev, /* Try to write the fenced register again */ adreno_writereg(adreno_dev, offset, val); + + if (i == GMU_SHORT_WAKEUP_RETRY_LIMIT) + dev_err(adreno_dev->dev.dev, + "Waited %d usecs to write fenced register 0x%x. Continuing to wait...\n", + (GMU_SHORT_WAKEUP_RETRY_LIMIT * + GMU_WAKEUP_DELAY_US), + reg_offset); } dev_err(adreno_dev->dev.dev, - "GMU fenced register write timed out: reg 0x%x\n", reg_offset); + "Timed out waiting %d usecs to write fenced register 0x%x\n", + GMU_LONG_WAKEUP_RETRY_LIMIT * GMU_WAKEUP_DELAY_US, + reg_offset); + return -ETIMEDOUT; } diff --git a/drivers/gpu/msm/kgsl_gmu.h b/drivers/gpu/msm/kgsl_gmu.h index 130d4004bf77..069f83581cfe 100644 --- a/drivers/gpu/msm/kgsl_gmu.h +++ b/drivers/gpu/msm/kgsl_gmu.h @@ -92,8 +92,15 @@ * the GMU will start shutting down before we try again. */ #define GMU_WAKEUP_DELAY_US 10 -/* Max amount of tries to wake up the GMU. */ -#define GMU_WAKEUP_RETRY_MAX 60 + +/* Max amount of tries to wake up the GMU. The short retry + * limit is half of the long retry limit. After the short + * number of retries, we print an informational message to say + * exiting IFPC is taking longer than expected. We continue + * to retry after this until the long retry limit. + */ +#define GMU_SHORT_WAKEUP_RETRY_LIMIT 100 +#define GMU_LONG_WAKEUP_RETRY_LIMIT 200 /* Bits for the flags field in the gmu structure */ enum gmu_flags { |