msm: kgsl: Return correct timestamp for consumed timestamp reads
adreno_readtimestamp() would return a register value when asked to
get the KGSL_TIMESTAMP_CONSUMED value. With per-context timestamps
this no longer holds valid since the value in the register could
correspond to a different contexts timestamp. Return the start of
packet timestamp for the specified context now that the start of
timestamp values are correctly submitted.
CRs-fixed: 382888
Change-Id: Iad56d07eb4a2973a5906d989c96dd117ff902cea
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index 44c13f9..c54c477 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -3098,7 +3098,8 @@
break;
}
case KGSL_TIMESTAMP_CONSUMED:
- adreno_regread(device, REG_CP_TIMESTAMP, ×tamp);
+ kgsl_sharedmem_readl(&device->memstore, ×tamp,
+ KGSL_MEMSTORE_OFFSET(context_id, soptimestamp));
break;
case KGSL_TIMESTAMP_RETIRED:
kgsl_sharedmem_readl(&device->memstore, ×tamp,