Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1AB5C54798 for ; Tue, 5 Mar 2024 13:12:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA7F6112ABE; Tue, 5 Mar 2024 13:12:52 +0000 (UTC) Received: from mblankhorst.nl (lankhorst.se [141.105.120.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4AFCE112ABE for ; Tue, 5 Mar 2024 13:12:50 +0000 (UTC) From: Maarten Lankhorst To: intel-xe@lists.freedesktop.org Cc: Maarten Lankhorst , Matthew Brost Subject: [PATCH 1/4] fix "drm/xe: Cleanup some layering in GGTT" Date: Tue, 5 Mar 2024 14:12:47 +0100 Message-ID: <20240305131250.5330-2-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240305131250.5330-1-maarten.lankhorst@linux.intel.com> References: <20240305131250.5330-1-maarten.lankhorst@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" 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 Signed-off-by: Maarten Lankhorst --- 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 717d0e76277a..0435e1202c46 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) @@ -265,7 +264,7 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt) xe_force_wake_get(gt_to_fw(gt), XE_FW_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); xe_force_wake_put(gt_to_fw(gt), XE_FW_GT); } -- 2.43.0