xref: /linux/drivers/gpu/drm/i915/i915_mm.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef __I915_MM_H__
7 #define __I915_MM_H__
8 
9 #include <linux/bug.h>
10 #include <linux/types.h>
11 
12 struct vm_area_struct;
13 struct io_mapping;
14 struct scatterlist;
15 
16 #if IS_ENABLED(CONFIG_X86)
17 int remap_io_mapping(struct vm_area_struct *vma,
18 		     unsigned long addr, unsigned long pfn, unsigned long size,
19 		     struct io_mapping *iomap);
20 #else
21 static inline
22 int remap_io_mapping(struct vm_area_struct *vma,
23 		     unsigned long addr, unsigned long pfn, unsigned long size,
24 		     struct io_mapping *iomap)
25 {
26 	WARN_ONCE(1, "Architecture has no drm_cache.c support\n");
27 	return 0;
28 }
29 #endif
30 
31 int remap_io_sg(struct vm_area_struct *vma,
32 		unsigned long addr, unsigned long size,
33 		struct scatterlist *sgl, unsigned long offset,
34 		resource_size_t iobase);
35 
36 #endif /* __I915_MM_H__ */
37