Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /*
0003  * Copyright © 2021 Intel Corporation
0004  */
0005 
0006 #ifndef __I915_MM_H__
0007 #define __I915_MM_H__
0008 
0009 #include <linux/bug.h>
0010 #include <linux/types.h>
0011 
0012 struct vm_area_struct;
0013 struct io_mapping;
0014 struct scatterlist;
0015 
0016 #if IS_ENABLED(CONFIG_X86)
0017 int remap_io_mapping(struct vm_area_struct *vma,
0018              unsigned long addr, unsigned long pfn, unsigned long size,
0019              struct io_mapping *iomap);
0020 #else
0021 static inline
0022 int remap_io_mapping(struct vm_area_struct *vma,
0023              unsigned long addr, unsigned long pfn, unsigned long size,
0024              struct io_mapping *iomap)
0025 {
0026     WARN_ONCE(1, "Architecture has no drm_cache.c support\n");
0027     return 0;
0028 }
0029 #endif
0030 
0031 int remap_io_sg(struct vm_area_struct *vma,
0032         unsigned long addr, unsigned long size,
0033         struct scatterlist *sgl, resource_size_t iobase);
0034 
0035 #endif /* __I915_MM_H__ */