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

Commit b97c4cf7 authored by Venkateswara Rao Tadikonda's avatar Venkateswara Rao Tadikonda Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Limit the kgsl log frequency in kgsl_get_unmapped_area()



Reduce the frequency of kgsl logging when kgsl driver failed to get
memory mapping for requested memory.

Change-Id: If1a8832a9aa0396e3c990916deec7949697be12d
Signed-off-by: default avatarVenkateswara Rao Tadikonda <vtadik@codeaurora.org>
parent ebccd33e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3615,13 +3615,13 @@ kgsl_get_unmapped_area(struct file *file, unsigned long addr,
	if (!kgsl_memdesc_use_cpu_map(&entry->memdesc)) {
		val = get_unmapped_area(NULL, addr, len, 0, flags);
		if (IS_ERR_VALUE(val))
			KGSL_MEM_ERR(device,
			KGSL_DRV_ERR_RATELIMIT(device,
				"get_unmapped_area: pid %d addr %lx pgoff %lx len %ld failed error %d\n",
				private->pid, addr, pgoff, len, (int) val);
	} else {
		 val = _get_svm_area(private, entry, addr, len, flags);
		 if (IS_ERR_VALUE(val))
			KGSL_MEM_ERR(device,
			KGSL_DRV_ERR_RATELIMIT(device,
				"_get_svm_area: pid %d addr %lx pgoff %lx len %ld failed error %d\n",
				private->pid, addr, pgoff, len, (int) val);
	}
+10 −1
Original line number Diff line number Diff line
/* Copyright (c) 2002,2008-2011,2013-2014,2016 The Linux Foundation.
/* Copyright (c) 2002,2008-2011,2013-2014,2016-2017 The Linux Foundation.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
@@ -67,6 +67,13 @@
					__func__, ##args);\
	} while (0)

#define KGSL_LOG_ERR_RATELIMITED(dev, lvl, fmt, args...) \
	do { \
		if ((lvl) >= 3) \
			dev_err_ratelimited(dev, "|%s| " fmt, \
					__func__, ##args);\
	} while (0)

#define KGSL_DRV_INFO(_dev, fmt, args...) \
KGSL_LOG_INFO(_dev->dev, _dev->drv_log, fmt, ##args)
#define KGSL_DRV_WARN(_dev, fmt, args...) \
@@ -77,6 +84,8 @@ KGSL_LOG_ERR(_dev->dev, _dev->drv_log, fmt, ##args)
KGSL_LOG_CRIT(_dev->dev, _dev->drv_log, fmt, ##args)
#define KGSL_DRV_CRIT_RATELIMIT(_dev, fmt, args...) \
KGSL_LOG_CRIT_RATELIMITED(_dev->dev, _dev->drv_log, fmt, ##args)
#define KGSL_DRV_ERR_RATELIMIT(_dev, fmt, args...) \
KGSL_LOG_ERR_RATELIMITED(_dev->dev, _dev->drv_log, fmt, ##args)
#define KGSL_DRV_FATAL(_dev, fmt, args...) \
KGSL_LOG_FATAL((_dev)->dev, (_dev)->drv_log, fmt, ##args)