xref: /linux/drivers/gpu/drm/panfrost/panfrost_mmu.h (revision 906fd46a65383cd639e5eec72a047efc33045d86)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
3 
4 #ifndef __PANFROST_MMU_H__
5 #define __PANFROST_MMU_H__
6 
7 struct panfrost_gem_mapping;
8 struct panfrost_file_priv;
9 struct panfrost_mmu;
10 
11 int panfrost_mmu_map(struct panfrost_gem_mapping *mapping);
12 void panfrost_mmu_unmap(struct panfrost_gem_mapping *mapping);
13 
14 int panfrost_mmu_init(struct panfrost_device *pfdev);
15 void panfrost_mmu_fini(struct panfrost_device *pfdev);
16 void panfrost_mmu_reset(struct panfrost_device *pfdev);
17 void panfrost_mmu_suspend_irq(struct panfrost_device *pfdev);
18 
19 u32 panfrost_mmu_as_get(struct panfrost_device *pfdev, struct panfrost_mmu *mmu);
20 void panfrost_mmu_as_put(struct panfrost_device *pfdev, struct panfrost_mmu *mmu);
21 
22 struct panfrost_mmu *panfrost_mmu_ctx_get(struct panfrost_mmu *mmu);
23 void panfrost_mmu_ctx_put(struct panfrost_mmu *mmu);
24 struct panfrost_mmu *panfrost_mmu_ctx_create(struct panfrost_device *pfdev);
25 
26 #endif
27