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

Commit 52b472e6 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Do not allow a fence to be created on an invalid context



Don't allow a new fence to be created on an invalidated context thus
preventing fence timeouts for timestamps that are never going to
happen.

Change-Id: Ic0dedbad3b9e47f14f0bdce748159c1ddd8c1a26
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 29c611cc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -170,6 +170,13 @@ int kgsl_add_fence_event(struct kgsl_device *device,
	if (context == NULL)
		goto unlock;

	if (test_bit(KGSL_CONTEXT_PRIV_INVALID, &context->priv)) {
		KGSL_DRV_ERR(device,
			"Cannot create a fence: context %d is invalid\n",
			context->id);
		goto unlock;
	}

	pt = kgsl_sync_pt_create(context->timeline, context, timestamp);
	if (pt == NULL) {
		KGSL_DRV_ERR(device, "kgsl_sync_pt_create failed\n");