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

Commit b3fed5ea 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: Don't wait for room in context queue when context is invalidated"

parents cfb5ba03 b29aa137
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1216,7 +1216,16 @@ static inline int _wait_for_room_in_context_queue(
		spin_lock(&drawctxt->lock);
		trace_adreno_drawctxt_wake(drawctxt);

		if (ret <= 0)
		/*
		 * Account for the possibility that the context got invalidated
		 * while we were sleeping
		 */

		if (ret > 0) {
			ret = _check_context_state(&drawctxt->base);
			if (ret)
				return ret;
		} else
			return (ret == 0) ? -ETIMEDOUT : (int) ret;
	}

@@ -1231,15 +1240,7 @@ static unsigned int _check_context_state_to_queue_cmds(
	if (ret)
		return ret;

	ret = _wait_for_room_in_context_queue(drawctxt);
	if (ret)
		return ret;

	/*
	 * Account for the possiblity that the context got invalidated
	 * while we were sleeping
	 */
	return _check_context_state(&drawctxt->base);
	return _wait_for_room_in_context_queue(drawctxt);
}

static void _queue_drawobj(struct adreno_context *drawctxt,