diff options
| -rw-r--r-- | drivers/gpu/drm/i915/gvt/kvmgt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index d5fcc447d22f..a68addf95c23 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c | |||
| @@ -905,7 +905,7 @@ static inline bool intel_vgpu_in_aperture(struct intel_vgpu *vgpu, u64 off) | |||
| 905 | static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, | 905 | static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, |
| 906 | void *buf, unsigned long count, bool is_write) | 906 | void *buf, unsigned long count, bool is_write) |
| 907 | { | 907 | { |
| 908 | void *aperture_va; | 908 | void __iomem *aperture_va; |
| 909 | 909 | ||
| 910 | if (!intel_vgpu_in_aperture(vgpu, off) || | 910 | if (!intel_vgpu_in_aperture(vgpu, off) || |
| 911 | !intel_vgpu_in_aperture(vgpu, off + count)) { | 911 | !intel_vgpu_in_aperture(vgpu, off + count)) { |
| @@ -920,9 +920,9 @@ static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, | |||
| 920 | return -EIO; | 920 | return -EIO; |
| 921 | 921 | ||
| 922 | if (is_write) | 922 | if (is_write) |
| 923 | memcpy(aperture_va + offset_in_page(off), buf, count); | 923 | memcpy_toio(aperture_va + offset_in_page(off), buf, count); |
| 924 | else | 924 | else |
| 925 | memcpy(buf, aperture_va + offset_in_page(off), count); | 925 | memcpy_fromio(buf, aperture_va + offset_in_page(off), count); |
| 926 | 926 | ||
| 927 | io_mapping_unmap(aperture_va); | 927 | io_mapping_unmap(aperture_va); |
| 928 | 928 | ||
