From patchwork Tue Mar 14 15:19:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 13174547 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 53C6EC6FD1D for ; Tue, 14 Mar 2023 15:19:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF79910E81B; Tue, 14 Mar 2023 15:19:49 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C99510E81B for ; Tue, 14 Mar 2023 15:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678807188; x=1710343188; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2LlE4dlm11KElEWoJK04recZyFUdgyEqKwhf+1JWIzc=; b=fluceEDlJo0XWowhmAgd05UuHvh34HyOD1ipMfHUowXcmLBGTzcW8HBj nNUBrDsdqCX3eYmWK1hripA+w6+8VKLK4n7VikBbV7jHBe0Qq9XkLbu+W Jhiiivbrj/VpVvOIccuOpkm4JkcBRGuRyUxi9uZrRNM5itxT2mR4ENt6z 0M7rYrhcXMUjx4Xuv5z+PclRqjlM98Eo/IlPcKzefikeCvo0cC+VFzlZU IuMYiuobPJH51D651UMVoKuWBh7GAws+TFo6a2nonthGT7ce6Jiz1FVmz KHv0FBkaPYyLCcHl0BSfqwsLFnYAI+OoqFU/obAwpb3P/YoLE1iJACU32 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="321303867" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="321303867" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 08:19:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="672382099" X-IronPort-AV: E=Sophos;i="5.98,260,1673942400"; d="scan'208";a="672382099" Received: from lab-ah.igk.intel.com ([10.102.42.211]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2023 08:19:36 -0700 From: Andrzej Hajda To: intel-gfx@lists.freedesktop.org Date: Tue, 14 Mar 2023 16:19:20 +0100 Message-Id: <20230314151920.1065847-1-andrzej.hajda@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 Subject: [Intel-gfx] [PATCH] drm/i915/gt: perform uc late init after probe error injection X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrzej Hajda , Matthew Auld , Rodrigo Vivi , chris.p.wilson@linux.intel.com, Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Probe pseudo errors should be injected only in places where real errors can be encountered, otherwise unwinding code can be broken. Placing intel_uc_init_late before i915_inject_probe_error violated this rule, resulting in following bug: __intel_gt_disable:655 GEM_BUG_ON(intel_gt_pm_is_awake(gt)) Fixes: 481d458caede ("drm/i915/guc: Add golden context to GuC ADS") Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Acked-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_gt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index 6ca944d01eb677..38c62e4ad3eba2 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -736,12 +736,12 @@ int intel_gt_init(struct intel_gt *gt) if (err) goto err_gt; - intel_uc_init_late(>->uc); - err = i915_inject_probe_error(gt->i915, -EIO); if (err) goto err_gt; + intel_uc_init_late(>->uc); + intel_migrate_init(>->migrate, gt); goto out_fw;