drm/xe: Drop ggtt invalidate from display code
authorMatthew Brost <matthew.brost@intel.com>
Wed, 6 Mar 2024 05:20:00 +0000 (21:20 -0800)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 20 Mar 2024 09:49:13 +0000 (10:49 +0100)
Only buffers mapped in the GGTT used by the GuC require an invalidation.
Display buffers do not require an invalidation. Delete the invalidatio
from display code and make invalidation a static function in xe_ggtt.c.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240306052002.311196-3-matthew.brost@intel.com
drivers/gpu/drm/xe/display/xe_fb_pin.c
drivers/gpu/drm/xe/xe_ggtt.c
drivers/gpu/drm/xe/xe_ggtt.h

index 2eb6225101864d5a49fe82e037ba8e2463c39b58..311ffad6e2c063eebc7a3c725a8f7192b89452fc 100644 (file)
@@ -241,7 +241,6 @@ static int __xe_pin_fb_vma_ggtt(struct intel_framebuffer *fb,
                                           rot_info->plane[i].dst_stride);
        }
 
-       xe_ggtt_invalidate(ggtt);
 out_unlock:
        mutex_unlock(&ggtt->lock);
 out:
@@ -384,4 +383,4 @@ struct i915_address_space *intel_dpt_create(struct intel_framebuffer *fb)
 void intel_dpt_destroy(struct i915_address_space *vm)
 {
        return;
-}
\ No newline at end of file
+}
index 325337c38961f721a272b7d6290ae2615e21601a..cc60ea08fc8495bda4f14734f36b53bf8e8f7811 100644 (file)
@@ -200,6 +200,8 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
        return drmm_add_action_or_reset(&xe->drm, ggtt_fini_early, ggtt);
 }
 
+static void xe_ggtt_invalidate(struct xe_ggtt *ggtt);
+
 static void xe_ggtt_initial_clear(struct xe_ggtt *ggtt)
 {
        struct drm_mm_node *hole;
@@ -261,7 +263,7 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
                drm_warn(&gt_to_xe(gt)->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err);
 }
 
-void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
+static void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
 {
        /* Each GT in a tile has its own TLB to cache GGTT lookups */
        ggtt_invalidate_gt_tlb(ggtt->tile->primary_gt);
index 42705e1338e12314aca18abb13b99f017eea2700..dc9631d20720bcccf85512f7481c765226007934 100644 (file)
@@ -11,7 +11,6 @@
 struct drm_printer;
 
 void xe_ggtt_set_pte(struct xe_ggtt *ggtt, u64 addr, u64 pte);
-void xe_ggtt_invalidate(struct xe_ggtt *ggtt);
 int xe_ggtt_init_early(struct xe_ggtt *ggtt);
 int xe_ggtt_init(struct xe_ggtt *ggtt);
 void xe_ggtt_printk(struct xe_ggtt *ggtt, const char *prefix);