forked from torvalds/linux
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
drm/i915: Skip remap_io() calls for non-x86 platforms
Only hw that supports mappable aperture would hit this path vm_fault_gtt/vm_fault_tmm, So we never hit these functions remap_io_mapping() and remap_io_sg in discrete, So skip this code for non-x86 architectures. Signed-off-by: Siva Mullati <siva.mullati@intel.com>
- Loading branch information
1 parent
a59308a
commit 3cc867f614222b682fb1f739ff6db5133d9352ad
Showing
5 changed files
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -27,6 +27,7 @@ | ||
|
|
||
|
|
||
| #include "i915_drv.h" | ||
| #include "i915_mm.h" | ||
|
|
||
| struct remap_pfn { | ||
| struct mm_struct *mm; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* SPDX-License-Identifier: MIT */ | ||
| /* | ||
| * Copyright © 2021 Intel Corporation | ||
| */ | ||
|
|
||
| #ifndef __I915_MM_H__ | ||
| #define __I915_MM_H__ | ||
|
|
||
| #if IS_ENABLED(CONFIG_X86) | ||
| int remap_io_mapping(struct vm_area_struct *vma, | ||
| unsigned long addr, unsigned long pfn, unsigned long size, | ||
| struct io_mapping *iomap); | ||
| int remap_io_sg(struct vm_area_struct *vma, | ||
| unsigned long addr, unsigned long size, | ||
| struct scatterlist *sgl, resource_size_t iobase); | ||
| #else | ||
| static inline int remap_io_mapping(struct vm_area_struct *vma, | ||
| unsigned long addr, unsigned long pfn, unsigned long size, | ||
| struct io_mapping *iomap) | ||
| { | ||
| return 0; | ||
| } | ||
| static inline int remap_io_sg(struct vm_area_struct *vma, | ||
| unsigned long addr, unsigned long size, | ||
| struct scatterlist *sgl, resource_size_t iobase) | ||
| { | ||
| return 0; | ||
| } | ||
| #endif | ||
|
|
||
| #endif /* __I915_MM_H__ */ |