From patchwork Fri Jan 27 16:03:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 13118919 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 07C4EC38142 for ; Fri, 27 Jan 2023 16:03:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C55010E181; Fri, 27 Jan 2023 16:03:31 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 242D610E181 for ; Fri, 27 Jan 2023 16:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674835409; x=1706371409; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=7RyTvkTwaI5Sx9cGLRz7NvNEqf4XVSlOgwGcKeRUc64=; b=GxN7/dWrPLUtMFPcsGXVia2gyep+UC6IwsBj3b/ri8/TspuowHQeaAKz TRk4AIxrX3sP4MEGKnX8XsJbrdVvhhVQgSJea285s3xwfSDozczKluU/F 6C5UqkpkUfNn2HJWJ8VT/XRBq3lqI1TsEFr5qXNNe6gBjoiWIYBycGWdE DQtDZs6KlXYKSAMg872WEQZcfqz5hgo32IVYvAzZ5uaKKHb9zaiJC0Gr5 +VmPrwvXKG1I+KSwhWFQwDk6tgGtZDclxhOc5QQtVKwwlHV3wAqSU4hD+ umGpTMI6yWuY97Z1DHoSMC67WzW0Blat4xxs6mAz5jzgP/jAfTh/FWsnT g==; X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="329243608" X-IronPort-AV: E=Sophos;i="5.97,251,1669104000"; d="scan'208";a="329243608" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 08:03:28 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10603"; a="695574775" X-IronPort-AV: E=Sophos;i="5.97,251,1669104000"; d="scan'208";a="695574775" Received: from pahousto-mobl1.ger.corp.intel.com (HELO mwauld-desk1.intel.com) ([10.252.29.163]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2023 08:03:27 -0800 From: Matthew Auld To: intel-gfx@lists.freedesktop.org Date: Fri, 27 Jan 2023 16:03:21 +0000 Message-Id: <20230127160321.374350-1-matthew.auld@intel.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: probe lmem before the stolen portion 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 , Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" At the very least, we have some tests that force the BAR size for testing purposes, which would result in different BAR size with stolen-lmem vs normal lmem, since the BAR is only resized as part of the normal lmem probing. Signed-off-by: Matthew Auld Cc: Andrzej Hajda Cc: Nirmoy Das Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/i915_driver.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index cf1c0970ecb4..320a4f861659 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -489,13 +489,17 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv) if (ret) goto err_ggtt; - ret = intel_memory_regions_hw_probe(dev_priv); + /* + * Make sure we probe lmem before we probe stolen-lmem. The BAR size + * might be different due to bar resizing. + */ + ret = intel_gt_tiles_init(dev_priv); if (ret) goto err_ggtt; - ret = intel_gt_tiles_init(dev_priv); + ret = intel_memory_regions_hw_probe(dev_priv); if (ret) - goto err_mem_regions; + goto err_ggtt; ret = i915_ggtt_enable_hw(dev_priv); if (ret) {