From patchwork Fri Sep 25 08:41:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11799357 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 386EB6CA for ; Fri, 25 Sep 2020 08:42:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6DE57208B6 for ; Fri, 25 Sep 2020 08:42:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DE57208B6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BB2B56E0D7; Fri, 25 Sep 2020 08:42:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (unknown [77.68.26.236]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CAFB6E0D7; Fri, 25 Sep 2020 08:42:01 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 22532098-1500050 for multiple; Fri, 25 Sep 2020 09:41:49 +0100 From: Chris Wilson To: igt-dev@lists.freedesktop.org Date: Fri, 25 Sep 2020 09:41:48 +0100 Message-Id: <20200925084148.351563-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib: Only avoid relocations with full-ppgtt 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We can only assigned random addresses with impunity if we know we have complete control over the ppGTT. If the ppGTT is shared, either aliased with the global GTT or simply the global GTT on ancient HW, then we have to be careful in case they are objects already fixed in place inside the GTT, e.g. active framebuffers. As the relocation code is still available, only enforce no-relocations by default when the context has its own ppGTT. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2491 Signed-off-by: Chris Wilson Cc: Zbigniew Kempczyński Reviewed-by: Zbigniew Kempczyński --- lib/intel_batchbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c index be764646e..42d7cd251 100644 --- a/lib/intel_batchbuffer.c +++ b/lib/intel_batchbuffer.c @@ -1306,7 +1306,7 @@ __intel_bb_create(int i915, uint32_t size, bool do_relocs) */ struct intel_bb *intel_bb_create(int i915, uint32_t size) { - return __intel_bb_create(i915, size, false); + return __intel_bb_create(i915, size, !gem_uses_full_ppgtt(i915)); } /**