[PATCH 1/4] drm/xe: Fix NULL check in xe_ggtt_init()
Matthew Brost
matthew.brost at intel.com
Wed Mar 6 05:19:59 UTC 2024
From: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
The null check for GT is after calling gt_to_xe, fix it.
Fixes: 3121fed0c51b ("drm/xe: Cleanup some layering in GGTT")
Cc: Matthew Brost <matthew.brost at intel.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
drivers/gpu/drm/xe/xe_ggtt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 5e739513ab0a..325337c38961 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -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(>_to_xe(gt)->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err);
}
void xe_ggtt_invalidate(struct xe_ggtt *ggtt)
--
2.34.1
More information about the Intel-xe
mailing list