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

Commit 0cfeea12 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: Add ratelimit check to limit excessive kernel logging"

parents 7846f630 47297943
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -796,6 +796,8 @@ static void a3xx_err_callback(struct adreno_device *adreno_dev, int bit)
{
	struct kgsl_device *device = &adreno_dev->dev;
	const char *err = "";
	/* Limit to 10 messages every 5 seconds */
	static DEFINE_RATELIMIT_STATE(ratelimit_state, 5 * HZ, 10);

	switch (bit) {
	case A3XX_INT_RBBM_ATB_BUS_OVERFLOW:
@@ -813,6 +815,12 @@ static void a3xx_err_callback(struct adreno_device *adreno_dev, int bit)
	default:
		return;
	}

	/*
	* Limit error interrupt reporting to prevent
	* kernel logs causing watchdog timeout
	*/
	if (__ratelimit(&ratelimit_state))
		KGSL_DRV_CRIT(device, "%s\n", err);
}