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 06361C021A4 for ; Thu, 13 Feb 2025 19:29:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAB9310EB96; Thu, 13 Feb 2025 19:29:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dpLqBAAV"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A4B110EB8A for ; Thu, 13 Feb 2025 19:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739474975; x=1771010975; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=IqLUj9Eis52xqlqoyKb4cDacOD0JmufrwvhmoKf6LTg=; b=dpLqBAAVMOsgeAki7StawGjPAvF5x3VuxybiWaDHnM6MwiDEmC87DR5r svMIlao46qqZlyTIr4lhA3VCRkk7RPC6UX52bGuvnTVoya5iwzYusJ+ku yRLVRnWQLgjvZVLTwIJaySxjZJ2cDpqgCC+cVCguJFwl0RdlIF7UEJ5qc ydMsjXNECxVo2sM6X+tGtlMLDwLX3rzN+fbiuzz7CyIqR8q1fyKrrA5Qb HAMozMzuAfs0ZvKMa8UY6QI9y1hfevuZtHwna4NdpAcBuhU0o0h5tx4o7 9kv+DZE9kAcaWA58sV72QxVQHpWFvX2qgERb1FkvojJGiBnbCROe5Yus5 Q==; X-CSE-ConnectionGUID: KsyRe8cfT0OA2rf2LFpN0w== X-CSE-MsgGUID: ayC4cykrSxKcLZoDVCDGfg== X-IronPort-AV: E=McAfee;i="6700,10204,11344"; a="40127929" X-IronPort-AV: E=Sophos;i="6.13,282,1732608000"; d="scan'208";a="40127929" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2025 11:29:35 -0800 X-CSE-ConnectionGUID: N78/bqlFQS+EUZlrupusDw== X-CSE-MsgGUID: 5Ksv6VEFSL+mtW9RMDcbig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="150416878" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2025 11:29:35 -0800 From: Lucas De Marchi To: Subject: [CI 08/13] drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish() Date: Thu, 13 Feb 2025 11:29:04 -0800 Message-ID: <20250213192909.996148-8-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213192909.996148-1-lucas.demarchi@intel.com> References: <20250213192909.996148-1-lucas.demarchi@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" Now that xe_gt_remove is handled entirely by xe_gt, it's clear there are some extra calls to xe_hw_fence_irq_finish() that aren't necessary. Neither all_fw_domain_init() or gt_fw_domain_init() need to do that since it's handled by the caller on any error. Reviewed-by: Rodrigo Vivi Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/xe/xe_gt.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index c33040278e1aa..bd16ca070dd20 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -389,13 +389,11 @@ static void dump_pat_on_error(struct xe_gt *gt) static int gt_fw_domain_init(struct xe_gt *gt) { unsigned int fw_ref; - int err, i; + int err; fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT); - if (!fw_ref) { - err = -ETIMEDOUT; - goto err_hw_fence_irq; - } + if (!fw_ref) + return -ETIMEDOUT; if (!xe_gt_is_media_type(gt)) { err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt); @@ -436,9 +434,6 @@ static int gt_fw_domain_init(struct xe_gt *gt) err_force_wake: dump_pat_on_error(gt); xe_force_wake_put(gt_to_fw(gt), fw_ref); -err_hw_fence_irq: - for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i) - xe_hw_fence_irq_finish(>->fence_irq[i]); return err; } @@ -446,7 +441,7 @@ static int gt_fw_domain_init(struct xe_gt *gt) static int all_fw_domain_init(struct xe_gt *gt) { unsigned int fw_ref; - int err, i; + int err; fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL); if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) { @@ -524,8 +519,6 @@ static int all_fw_domain_init(struct xe_gt *gt) err_force_wake: xe_force_wake_put(gt_to_fw(gt), fw_ref); - for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i) - xe_hw_fence_irq_finish(>->fence_irq[i]); return err; } -- 2.48.1