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

Commit 7ac20538 authored by Rajesh Kemisetti's avatar Rajesh Kemisetti
Browse files

msm: kgsl: Limit log frequency in case of context count maxed out



kgsl_context_init() prints error message continuously if a process
tries to create more number of contexts that KGSL supports.

This hogs CPU and might lead to watchdog timeout.

Reduce this log frequency by using KGSL_DRV_ERR_RATELIMIT().

Change-Id: I7e3a5d3db41ab0c60d1b6b620cbcdef96d5c21a9
Signed-off-by: default avatarRajesh Kemisetti <rajeshk@codeaurora.org>
parent 2b10bef6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -541,7 +541,7 @@ int kgsl_context_init(struct kgsl_device_private *dev_priv,
	 */
	spin_lock(&proc_priv->ctxt_count_lock);
	if (atomic_read(&proc_priv->ctxt_count) > KGSL_MAX_CONTEXTS_PER_PROC) {
		KGSL_DRV_ERR(device,
		KGSL_DRV_ERR_RATELIMIT(device,
			"Per process context limit reached for pid %u",
			dev_priv->process_priv->pid);
		spin_unlock(&proc_priv->ctxt_count_lock);