Received: by 10.213.65.68 with SMTP id h4csp473122imn; Fri, 16 Mar 2018 08:49:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELvnkrNX7adTVWVVfIZMneoC7ya5482DjfRuHEzTFEVZegdeUjaEjzS8Js9ERndnEoDz2Bid X-Received: by 2002:a17:902:bf03:: with SMTP id bi3-v6mr2630101plb.343.1521215381779; Fri, 16 Mar 2018 08:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521215381; cv=none; d=google.com; s=arc-20160816; b=DbSZv3mA3BbsG0jZAyexU9fC+Mg2Vct1WGvz9sPKgcHEmUwVk7ITY+RaUExEs4K2F7 v49ROvAqdKz6ToE/nml/GCmMhM4e4D+CjVrbmzwwwdCHv6evzBLB//F2QAdd7mj7m6lb SfasD/X0GH/Cuzrg/2EO5A8NE0MAl7iV4i6Wp2ASTlIWNjqPw9D2wIvg8Enu/juYMiY8 EUspOsbJ/F5FGWXm33zDzCP/uQofQps2DspLHgBqRDSqi8Gwqs7ANFk450+s/+vu3nyw PQjqVGtSl+FJdyf43nHddGF0tvZ7okeXCdlkiSvrRuq+7sBZ7T9hQqiscX0RQWm359aV pqgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=syFgWdKGeStMahP8DTHF2hNMTy4rvb5Pl9GxH3GDYRk=; b=jKouws/INMlKjOKyYCChAOUJ4OxnsfpVIw2B4Xx+JTnSIoGnTfuu61z7IV2w3pkb9c CeHvIURv2qA4r9Q/YEtSv5gmlDKZmlkwpit31fXqCjtq3n8qbM92gpn7Xlqsm8Mpw2t7 n74PPkZ2MkLSpF7ZrX5gZDqstQp5fQhxSWkhW9i0HWvxyG6/xA297CrHDCO4WMUBdCDP 4RUtAO9H1/8uCeavl7+l361urcqJWV+822b/2L/9KLOsZfLS/H/rKuyS+0Esq2Da7TTw ZDpAZpVoF8rZrJIcULBrejY3B1aJYldyLigc8giJJUNaxr/Km4I9jyY2IXbEEsONLmIC RCeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o26si5227856pge.538.2018.03.16.08.49.27; Fri, 16 Mar 2018 08:49:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965459AbeCPPos (ORCPT + 99 others); Fri, 16 Mar 2018 11:44:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46114 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965269AbeCPPop (ORCPT ); Fri, 16 Mar 2018 11:44:45 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BA15CE40; Fri, 16 Mar 2018 15:44:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Wilson , Tvrtko Ursulin , Mika Kuoppala , drm-intel-fixes@lists.freedesktop.org, Joonas Lahtinen , Sasha Levin Subject: [PATCH 4.15 115/128] agp/intel: Flush all chipset writes after updating the GGTT Date: Fri, 16 Mar 2018 16:24:16 +0100 Message-Id: <20180316152342.225086171@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chris Wilson [ Upstream commit 8516673a996870ea0ceb337ee4f83c33c5ec3111 ] Before accessing the GGTT we must flush the PTE writes and make them visible to the chipset, or else the indirect access may end up in the wrong page. In commit 3497971a71d8 ("agp/intel: Flush chipset writes after updating a single PTE"), we noticed corruption of the uploads for pwrite and for capturing GPU error states, but it was presumed that the explicit calls to intel_gtt_chipset_flush() were sufficient for the execbuffer path. However, we have not been flushing the chipset between the PTE writes and access via the GTT itself. For simplicity, do the flush after any PTE update rather than try and batch the flushes on a just-in-time basis. References: 3497971a71d8 ("agp/intel: Flush chipset writes after updating a single PTE") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: drm-intel-fixes@lists.freedesktop.org Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171208214616.30147-1-chris@chris-wilson.co.uk Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/char/agp/intel-gtt.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -872,6 +872,8 @@ void intel_gtt_insert_sg_entries(struct } } wmb(); + if (intel_private.driver->chipset_flush) + intel_private.driver->chipset_flush(); } EXPORT_SYMBOL(intel_gtt_insert_sg_entries);