[PATCH] drm/i915: skip stop_machine during erro_capture for bxt
Nirmoy Das
nirmoy.das at intel.com
Thu Jun 2 12:51:52 UTC 2022
For CI
---
drivers/gpu/drm/i915/gt/intel_gt_gmch.c | 3 ++-
drivers/gpu/drm/i915/gt/intel_gtt.h | 5 +++++
drivers/gpu/drm/i915/i915_gpu_error.c | 12 +++++++++---
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_gmch.c b/drivers/gpu/drm/i915/gt/intel_gt_gmch.c
index 18e488672d1b..a7524ce0de7d 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_gmch.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_gmch.c
@@ -301,7 +301,7 @@ static void bxt_vtd_ggtt_insert_entries__BKL(struct i915_address_space *vm,
{
struct insert_entries arg = { vm, vma_res, level, flags };
- stop_machine(bxt_vtd_ggtt_insert_entries__cb, &arg, NULL);
+ bxt_vtd_ggtt_insert_entries__cb(&arg);
}
void intel_gt_gmch_gen5_chipset_flush(struct intel_gt *gt)
@@ -621,6 +621,7 @@ int intel_gt_gmch_gen8_probe(struct i915_ggtt *ggtt)
ggtt->vm.clear_range = gen8_ggtt_clear_range;
ggtt->vm.insert_entries = gen8_ggtt_insert_entries;
+ ggtt->vm.raw_insert_page = gen8_ggtt_insert_page;
/*
* Serialize GTT updates with aperture access on BXT if VT-d is on,
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h
index a40d928b3888..8b1e52c034ed 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.h
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.h
@@ -306,6 +306,11 @@ struct i915_address_space {
struct i915_vma_resource *vma_res,
enum i915_cache_level cache_level,
u32 flags);
+ void (*raw_insert_page)(struct i915_address_space *vm,
+ dma_addr_t addr,
+ u64 offset,
+ enum i915_cache_level cache_level,
+ u32 flags);
void (*cleanup)(struct i915_address_space *vm);
void (*foreach)(struct i915_address_space *vm,
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 0512c66fa4f3..177141bfd29f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1092,11 +1092,17 @@ i915_vma_coredump_create(const struct intel_gt *gt,
if (drm_mm_node_allocated(&ggtt->error_capture)) {
void __iomem *s;
dma_addr_t dma;
-
+
+ pr_err("%s: using %ps\n", __func__, ggtt->vm.raw_insert_page);
for_each_sgt_daddr(dma, iter, vma_res->bi.pages) {
mutex_lock(&ggtt->error_mutex);
- ggtt->vm.insert_page(&ggtt->vm, dma, slot,
- I915_CACHE_NONE, 0);
+ if (ggtt->vm.raw_insert_page)
+ ggtt->vm.raw_insert_page(&ggtt->vm, dma, slot,
+ I915_CACHE_NONE, 0);
+ else
+
+ ggtt->vm.insert_page(&ggtt->vm, dma, slot,
+ I915_CACHE_NONE, 0);
mb();
s = io_mapping_map_wc(&ggtt->iomap, slot, PAGE_SIZE);
--
2.35.1
More information about the Intel-gfx-trybot
mailing list