Commit 2a2e1107 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Matthew Brost

drm/xe: Fix NULL check in xe_ggtt_init()

The null check for GT is after calling gt_to_xe, fix it.

Fixes: 3121fed0 ("drm/xe: Cleanup some layering in GGTT")
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240306052002.311196-2-matthew.brost@intel.com
parent 51e9ddc6
......@@ -251,7 +251,6 @@ int xe_ggtt_init(struct xe_ggtt *ggtt)
static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
int err;
if (!gt)
......@@ -259,7 +258,7 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt)
err = xe_gt_tlb_invalidation_ggtt(gt);
if (err)
drm_warn(&xe->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err);
drm_warn(&gt_to_xe(gt)->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err);
}
void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment