forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/msm/msm_gem_shrinker.c
....@@ -1,22 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2016 Red Hat
34 * Author: Rob Clark <robdclark@gmail.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License version 2 as published by
7
- * the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along with
15
- * this program. If not, see <http://www.gnu.org/licenses/>.
165 */
176
187 #include "msm_drv.h"
198 #include "msm_gem.h"
9
+#include "msm_gpu_trace.h"
2010
2111 static bool msm_gem_shrinker_lock(struct drm_device *dev, bool *unlock)
2212 {
....@@ -98,7 +88,7 @@
9888 mutex_unlock(&dev->struct_mutex);
9989
10090 if (freed > 0)
101
- pr_info_ratelimited("Purging %lu bytes\n", freed << PAGE_SHIFT);
91
+ trace_msm_gem_purge(freed << PAGE_SHIFT);
10292
10393 return freed;
10494 }
....@@ -134,7 +124,7 @@
134124 *(unsigned long *)ptr += unmapped;
135125
136126 if (unmapped > 0)
137
- pr_info_ratelimited("Purging %u vmaps\n", unmapped);
127
+ trace_msm_gem_purge_vmaps(unmapped);
138128
139129 return NOTIFY_DONE;
140130 }