diff options
author | CQ Tang <cq.tang@intel.com> | 2021-01-19 16:31:04 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2021-01-19 23:36:27 +0300 |
commit | c97498363fc3d9fcc7091a4ada29aed6f22ff8c2 (patch) | |
tree | cd1b8a287a50a40b4962299ff6bbf4d41c86f848 /drivers/gpu/drm/i915/i915_gpu_error.c | |
parent | 23b2afc6eef83bfcf05c04f386c34f6242766f52 (diff) | |
download | linux-c97498363fc3d9fcc7091a4ada29aed6f22ff8c2.tar.xz |
drm/i915/error: Fix object page offset within a region
io_mapping_map_wc() expects the offset to be relative to the iomapping
base address. Currently we just pass in the physical address for the
page which only works if the region.start starts at zero.
Signed-off-by: CQ Tang <cq.tang@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20210119133106.66294-2-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gpu_error.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 8b163ee1b86d..f962693404b7 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1051,7 +1051,9 @@ i915_vma_coredump_create(const struct intel_gt *gt, for_each_sgt_daddr(dma, iter, vma->pages) { void __iomem *s; - s = io_mapping_map_wc(&mem->iomap, dma, PAGE_SIZE); + s = io_mapping_map_wc(&mem->iomap, + dma - mem->region.start, + PAGE_SIZE); ret = compress_page(compress, (void __force *)s, dst, true); |