Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1a6708f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Wait for active count when last kgsl instance is closed"

parents 53e710e0 f13b0c5a
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -1855,7 +1855,14 @@ static int adreno_first_open(struct kgsl_device *device)

static int adreno_close(struct adreno_device *adreno_dev)
{
	struct kgsl_device *device = KGSL_DEVICE(adreno_dev);
	return kgsl_pwrctrl_change_state(KGSL_DEVICE(adreno_dev),
			KGSL_STATE_INIT);
}

static int adreno_last_close(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	const struct adreno_power_ops *ops = ADRENO_POWER_OPS(adreno_dev);

	/*
	 * Wait up to 1 second for the active count to go low
@@ -1870,14 +1877,6 @@ static int adreno_close(struct adreno_device *adreno_dev)
				"Still waiting for the active count\n");
	}

	return kgsl_pwrctrl_change_state(device, KGSL_STATE_INIT);
}

static int adreno_last_close(struct kgsl_device *device)
{
	struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
	const struct adreno_power_ops *ops = ADRENO_POWER_OPS(adreno_dev);

	return ops->last_close(adreno_dev);
}