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

Commit 05c61708 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Do not switch pagetable if context is detached"

parents 6f13a872 ad6db200
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -576,6 +576,15 @@ int adreno_drawctxt_switch(struct adreno_device *adreno_dev,
	if (rb->drawctxt_active == drawctxt)
		return ret;

	/*
	 * Submitting pt switch commands from a detached context can
	 * lead to a race condition where the pt is destroyed before
	 * the pt switch commands get executed by the GPU, leading to
	 * pagefaults.
	 */
	if (drawctxt != NULL && kgsl_context_detached(&drawctxt->base))
		return -ENOENT;

	trace_adreno_drawctxt_switch(rb,
		drawctxt, flags);