hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/arm/bifrost/mali_kbase_native_mgm.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2019-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -140,6 +140,30 @@
140140 return pte;
141141 }
142142
143
+/**
144
+ * kbase_native_mgm_pte_to_original_pte - Native method to undo changes done in
145
+ * kbase_native_mgm_update_gpu_pte()
146
+ *
147
+ * @mgm_dev: The memory group manager the request is being made through.
148
+ * @group_id: A physical memory group ID, which must be valid but is not used.
149
+ * Its valid range is 0 .. MEMORY_GROUP_MANAGER_NR_GROUPS-1.
150
+ * @mmu_level: The level of the MMU page table where the page is getting mapped.
151
+ * @pte: The prepared page table entry.
152
+ *
153
+ * This function simply returns the @pte without modification.
154
+ *
155
+ * Return: A GPU page table entry to be stored in a page table.
156
+ */
157
+static u64 kbase_native_mgm_pte_to_original_pte(struct memory_group_manager_device *mgm_dev,
158
+ int group_id, int mmu_level, u64 pte)
159
+{
160
+ CSTD_UNUSED(mgm_dev);
161
+ CSTD_UNUSED(group_id);
162
+ CSTD_UNUSED(mmu_level);
163
+
164
+ return pte;
165
+}
166
+
143167 struct memory_group_manager_device kbase_native_mgm_dev = {
144168 .ops = {
145169 .mgm_alloc_page = kbase_native_mgm_alloc,
....@@ -147,6 +171,7 @@
147171 .mgm_get_import_memory_id = NULL,
148172 .mgm_vmf_insert_pfn_prot = kbase_native_mgm_vmf_insert_pfn_prot,
149173 .mgm_update_gpu_pte = kbase_native_mgm_update_gpu_pte,
174
+ .mgm_pte_to_original_pte = kbase_native_mgm_pte_to_original_pte,
150175 },
151176 .data = NULL
152177 };