mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
msm: kgsl: Dump the always on counter for a6xx interrupts
If an interrupt occurs while GX is off it is useful to read the always on counter value to match the error with the GMU trace. Change-Id: Ic0dedbad923e37ebcb9c19dc26b0023a2bd0613c Signed-off-by: Hareesh Gundu <[email protected]> Signed-off-by: Jordan Crouse <[email protected]>
This commit is contained in:
parent
5fc8a2d9f0
commit
ea01925637
1 changed files with 9 additions and 2 deletions
|
|
@ -1404,25 +1404,32 @@ static int a6xx_irq_poll_fence(struct adreno_device *adreno_dev)
|
|||
{
|
||||
struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
|
||||
u32 status, fence, fence_retries = 0;
|
||||
u64 a, b, c;
|
||||
|
||||
if (!gmu_core_isenabled(device))
|
||||
return 0;
|
||||
|
||||
a = a6xx_read_alwayson(adreno_dev);
|
||||
|
||||
kgsl_regread(device, A6XX_GMU_AO_AHB_FENCE_CTRL, &fence);
|
||||
|
||||
while (fence != 0) {
|
||||
b = a6xx_read_alwayson(adreno_dev);
|
||||
|
||||
/* Wait for small time before trying again */
|
||||
udelay(1);
|
||||
kgsl_regread(device, A6XX_GMU_AO_AHB_FENCE_CTRL, &fence);
|
||||
|
||||
if (fence_retries == 100 && fence != 0) {
|
||||
c = a6xx_read_alwayson(adreno_dev);
|
||||
|
||||
kgsl_regread(device, A6XX_GMU_RBBM_INT_UNMASKED_STATUS,
|
||||
&status);
|
||||
|
||||
dev_crit_ratelimited(device->dev,
|
||||
"status=0x%x Unmasked status=0x%x Mask=0x%x\n",
|
||||
"status=0x%x Unmasked status=0x%x Mask=0x%x timestamps: %llx %llx %llx\n",
|
||||
status & adreno_dev->irq_mask, status,
|
||||
adreno_dev->irq_mask);
|
||||
adreno_dev->irq_mask, a, b, c);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue