Received: by 10.213.65.68 with SMTP id h4csp1786233imn; Mon, 19 Mar 2018 13:13:43 -0700 (PDT) X-Google-Smtp-Source: AG47ELtsyfYr1AwJUR+YHs8SfYch4JeTg/2xAM52rSXZi/a+0WaQg/h1ynMLIcu7JIH9Yn0szroM X-Received: by 10.101.83.194 with SMTP id z2mr9999890pgr.133.1521490423132; Mon, 19 Mar 2018 13:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521490423; cv=none; d=google.com; s=arc-20160816; b=vddOLvCxAhtHdPaCUcMVornjHlnSw2vek7e7IXRENz5DbzM4d4jhMsTo8XY8/+c+LJ qE+BMzR7068t6SI/SeE5w2gQALxWYE+wikYj/N/W2P5WbdV6bvsAGVherOS7aA79LbgI asRevbfKGYHYCdxOdYDeejQLwK1iIaijDKqe5btB9pFSpSg8vPeU1Wl2YXJmVql8Qoot vN7wVe+CyMzYUy/SJzseUWI2YUDYU+eypj8291UQJDiux78aV3b99qfH1v+BSGQQ6stv kk9E8M8x9hXg2tyN13PtsNpd8W+Lx/JsfsuyfNxOd4P+mcR3sdbgQH+sN5rncc4V+N+B Sf8g== 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=PN2qLTQ639dq0qjZ/XvLsSeCCdNSHcWt5EnFH2toUcA=; b=LjdEoEgLZSYVHBQAwy5uZQ83jF3Z4gqC0jZLrZd8vwgjZv6vKFtyLvxI3fKFTCOrAu tMrp7VdT4gqJtRiMMjpGnE7ekQwhhPL3y6qYCudy835XxXGO8+8Ez1bBumGbi7rZeLzv 8cOO3l9KnLTUtTpQNN02nGBbEneb+tmLZ+2tlep4ZNXscPi695TvQeKJmpi2BPnepCRw d/Q8xW0ScQjyrl3onJjrd1SauUQsdlIhNpfONyXD/UwXk2UvfQUn4mG7zMqwpg1sIdcL C1XDLOSBrEv8weSGSwPqjPCrnHaLNfX/pTWEv/3jCbgqOU1shbCVgPcHb01JgbojOQrU ctAw== 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 b8-v6si15445plz.31.2018.03.19.13.13.28; Mon, 19 Mar 2018 13:13:43 -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 S1030838AbeCSSQj (ORCPT + 99 others); Mon, 19 Mar 2018 14:16:39 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45126 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030782AbeCSSQZ (ORCPT ); Mon, 19 Mar 2018 14:16:25 -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 87257FA8; Mon, 19 Mar 2018 18:16:24 +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.4 103/134] agp/intel: Flush all chipset writes after updating the GGTT Date: Mon, 19 Mar 2018 19:06:26 +0100 Message-Id: <20180319171904.132930407@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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 @@ -859,6 +859,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);