From patchwork Thu Feb 16 01:11:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Harrison X-Patchwork-Id: 13142369 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 66A70C636CC for ; Thu, 16 Feb 2023 01:11:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE00410E1A7; Thu, 16 Feb 2023 01:11:47 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id C710610E185; Thu, 16 Feb 2023 01:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676509905; x=1708045905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hcqphykPgmz5B64oP0cvmOuWT6Hc5on6T8eg3FKcsro=; b=ZJutaXfoHw8kJvjrWOZD5+MZaz2p3pP74/w+MW1TH3CP8fUbrSQZnVYw lPoQe+D0WeIRC6IbKaKnYfbCn3Ru+gx/poFdvYbtXrS360yl2SZOyS2Ks 5fcHSthLTjB8+PbykyudHLE9EUrnZzLHh4QM658xgZRaXMnzYFDfAgA3o TGBSwVqDTK4kcMs4jX08iZ0fSE2H2Cd89qacZBvWW479dpRbxT58tNZgm H8j06QIp82Dn8LOdwh7NVQNoCgJlIraR/hqyvZFOcK4WzqBc0kcg8map9 qAsbbw0IMcK7qE/HnEYFR8/z1H398BnMs/TBMWxTWa79a4Gzdvtj9sngs g==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="311218990" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="311218990" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 17:11:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="733674530" X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="733674530" Received: from relo-linux-5.jf.intel.com ([10.165.21.152]) by fmsmga008.fm.intel.com with ESMTP; 15 Feb 2023 17:11:45 -0800 From: John.C.Harrison@Intel.com To: Intel-GFX@Lists.FreeDesktop.Org Date: Wed, 15 Feb 2023 17:11:00 -0800 Message-Id: <20230216011101.1909009-2-John.C.Harrison@Intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230216011101.1909009-1-John.C.Harrison@Intel.com> References: <20230216011101.1909009-1-John.C.Harrison@Intel.com> MIME-Version: 1.0 Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH v3 1/2] drm/i915: Don't use stolen memory for ring buffers with LLC 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: intel-gfx@lists.freedesktop.org, Chris Wilson , DRI-Devel@Lists.FreeDesktop.Org, Rodrigo Vivi , stable@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: John Harrison Direction from hardware is that stolen memory should never be used for ring buffer allocations on platforms with LLC. There are too many caching pitfalls due to the way stolen memory accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison Fixes: c58b735fc762 ("drm/i915: Allocate rings from stolen") Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: # v4.9+ Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/intel_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_ring.c b/drivers/gpu/drm/i915/gt/intel_ring.c index 15ec64d881c44..fb1d2595392ed 100644 --- a/drivers/gpu/drm/i915/gt/intel_ring.c +++ b/drivers/gpu/drm/i915/gt/intel_ring.c @@ -116,7 +116,7 @@ static struct i915_vma *create_ring_vma(struct i915_ggtt *ggtt, int size) obj = i915_gem_object_create_lmem(i915, size, I915_BO_ALLOC_VOLATILE | I915_BO_ALLOC_PM_VOLATILE); - if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt)) + if (IS_ERR(obj) && i915_ggtt_has_aperture(ggtt) && !HAS_LLC(i915)) obj = i915_gem_object_create_stolen(i915, size); if (IS_ERR(obj)) obj = i915_gem_object_create_internal(i915, size);