[Intel-xe] [PATCH v2 2/2] Revert "drm/xe: Coalesce GGTT invalidations"
Niranjana Vishwanathapura
niranjana.vishwanathapura at intel.com
Fri Apr 7 03:27:51 UTC 2023
This reverts commit 9a54f70a3a33047d1c67abf790b7cfbbce2cc65b.
Coalescing GGTT invalidations is causing a bunch of hangs during
driver load and in user space. Benefit is rather small too, so
revert it to stabilize the stack.
Tested-by: Matt Roper <matthew.d.roper at intel.com> # ADL-P
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
---
drivers/gpu/drm/xe/xe_ggtt.c | 11 ++---------
drivers/gpu/drm/xe/xe_ggtt_types.h | 2 --
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 2e31b1ce3e4c..0ae373b604f6 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -263,22 +263,15 @@ int xe_ggtt_insert_special_node(struct xe_ggtt *ggtt, struct drm_mm_node *node,
void xe_ggtt_map_bo(struct xe_ggtt *ggtt, struct xe_bo *bo)
{
- struct xe_device *xe = gt_to_xe(ggtt->gt);
u64 start = bo->ggtt_node.start;
u64 offset, pte;
- lockdep_assert_held(&ggtt->lock);
-
for (offset = 0; offset < bo->size; offset += GEN8_PAGE_SIZE) {
pte = xe_ggtt_pte_encode(bo, offset);
xe_ggtt_set_pte(ggtt, start + offset, pte);
}
- /* XXX: Without doing this everytime on integrated driver load fails */
- if (ggtt->invalidate || !IS_DGFX(xe)) {
- xe_ggtt_invalidate(ggtt->gt);
- ggtt->invalidate = false;
- }
+ xe_ggtt_invalidate(ggtt->gt);
}
static int __xe_ggtt_insert_bo_at(struct xe_ggtt *ggtt, struct xe_bo *bo,
@@ -329,7 +322,7 @@ void xe_ggtt_remove_node(struct xe_ggtt *ggtt, struct drm_mm_node *node)
drm_mm_remove_node(node);
node->size = 0;
- ggtt->invalidate = true;
+ xe_ggtt_invalidate(ggtt->gt);
mutex_unlock(&ggtt->lock);
}
diff --git a/drivers/gpu/drm/xe/xe_ggtt_types.h b/drivers/gpu/drm/xe/xe_ggtt_types.h
index 8198aa784654..ea70aaef4b31 100644
--- a/drivers/gpu/drm/xe/xe_ggtt_types.h
+++ b/drivers/gpu/drm/xe/xe_ggtt_types.h
@@ -26,8 +26,6 @@ struct xe_ggtt {
u64 __iomem *gsm;
struct drm_mm mm;
-
- bool invalidate;
};
#endif
--
2.21.0.rc0.32.g243a4c7e27
More information about the Intel-xe
mailing list