[Freedreno] [PATCH 2/2] drm/msm: Use DRM_DEV_INFO_RATELIMITED for shrinker messages

Kristian H. Kristensen hoegsberg at gmail.com
Fri Jan 18 18:07:00 UTC 2019


Otherwise we get hard to track down "Purging: 123123 bytes" messages in
the log.

Signed-off-by: Kristian H. Kristensen <hoegsberg at chromium.org>
---
 drivers/gpu/drm/msm/msm_gem_shrinker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index b72d8e6cd51d7..8161923892f55 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -98,7 +98,7 @@ msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc)
 		mutex_unlock(&dev->struct_mutex);
 
 	if (freed > 0)
-		pr_info_ratelimited("Purging %lu bytes\n", freed << PAGE_SHIFT);
+		DRM_DEV_INFO_RATELIMITED(dev->dev, "Purging %lu bytes\n", freed << PAGE_SHIFT);
 
 	return freed;
 }
@@ -134,7 +134,7 @@ msm_gem_shrinker_vmap(struct notifier_block *nb, unsigned long event, void *ptr)
 	*(unsigned long *)ptr += unmapped;
 
 	if (unmapped > 0)
-		pr_info_ratelimited("Purging %u vmaps\n", unmapped);
+		DRM_DEV_INFO_RATELIMITED(dev->dev, "Purging %u vmaps\n", unmapped);
 
 	return NOTIFY_DONE;
 }
-- 
2.20.1.321.g9e740568ce-goog



More information about the Freedreno mailing list