From patchwork Thu Sep 22 22:11:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Ceraolo Spurio X-Patchwork-Id: 12985865 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 A5B40C54EE9 for ; Thu, 22 Sep 2022 22:10:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3109610E481; Thu, 22 Sep 2022 22:10:32 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6946210E476; Thu, 22 Sep 2022 22:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663884628; x=1695420628; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U4xOZzqFiQhpk/cURvQ5wuqSR9QFPec6WpxlWKIJlnE=; b=BrPdMBKltH+rn52Erj+andUgGcqnAWQnmiFTVu0UGsfq31/p3SAVGIcM HWFAKSnFczP/4bQGZwRTteoTLbsTbRNRmFBrTcmvghdODlDmzXTIMKBjB UfkprDTwU4Ug62zyecZpmxKyvFJ75dWSC0ZTG/4wwrqa1+c2sOznmsivw DbCdcIRSNquWa2v9T1y95NfyUrNjT0AWL5kQGvZDk+VhJLqkTQGLZvPdt bopV3f6Aq3E+Kuzn0oOXHSeWnLKW9TXnce8PjrWrxnq6jnFv/ftyHvXqb Q3vZWge8w52pZkRZoS5G/PLI9b5UXHy9O3hLdQkeGwqGvnl6n3MoAHYZn Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="280815500" X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="280815500" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 15:10:28 -0700 X-IronPort-AV: E=Sophos;i="5.93,337,1654585200"; d="scan'208";a="682416236" Received: from valcore-skull-1.fm.intel.com ([10.1.27.19]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 15:10:28 -0700 From: Daniele Ceraolo Spurio To: intel-gfx@lists.freedesktop.org Date: Thu, 22 Sep 2022 15:11:12 -0700 Message-Id: <20220922221117.458087-3-daniele.ceraolospurio@intel.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922221117.458087-1-daniele.ceraolospurio@intel.com> References: <20220922221117.458087-1-daniele.ceraolospurio@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/7] drm/i915/uc: fetch uc firmwares for each GT 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: Alan Previn , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The FW binaries are independently loaded on each GT. On MTL, the memory is shared so we could potentially re-use a single allocation, but on discrete multi-gt platforms we are going to need independent copies, so it is easier to do the same on MTL as well, given that the amount of duplicated memory is relatively small (~500K). Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Alan Previn Reviewed-by: John Harrison --- drivers/gpu/drm/i915/i915_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 88df9a35e0fe..a5b192ac885c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1140,7 +1140,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv) if (ret) return ret; - intel_uc_fetch_firmwares(&to_gt(dev_priv)->uc); + for_each_gt(gt, dev_priv, i) + intel_uc_fetch_firmwares(>->uc); intel_wopcm_init(&dev_priv->wopcm); ret = i915_init_ggtt(dev_priv);