msm: kgsl: Fix device check when enabling counters via cmdstream

This is because gmu and rgmu based targets don't use the
ADRENO_DEVICE_STARTED anymore. Instead, we can use KGSL_STATE_ACTIVE
which also indicates that the device is active.

Change-Id: I485c9366ee570084a0d6a8eb93423c568009fc19
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This commit is contained in:
Harshdeep Dhatt 2020-08-04 16:43:18 -06:00
commit f91275238f

View file

@ -753,7 +753,7 @@ static int _perfcounter_enable_default(struct adreno_device *adreno_dev,
reg = &(grp->regs[counter]);
if (_perfcounter_inline_update(adreno_dev, group) &&
test_bit(ADRENO_DEVICE_STARTED, &adreno_dev->priv)) {
(device->state == KGSL_STATE_ACTIVE)) {
struct adreno_ringbuffer *rb = &adreno_dev->ringbuffers[0];
unsigned int buf[4];
unsigned int *cmds = buf;