Received: by 10.213.65.68 with SMTP id h4csp498934imn; Fri, 16 Mar 2018 09:35:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELvIN3J6ZoQmAJa0JHSqTr7xvWYplDde7/f2mnWTAUVLrlKINV3DvHGnMnxJ+C2qZnVsnZtH X-Received: by 10.99.103.69 with SMTP id b66mr1932152pgc.233.1521218116884; Fri, 16 Mar 2018 09:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521218116; cv=none; d=google.com; s=arc-20160816; b=vr84KilcYRxuL5ivmJGWnfA8cyEymQjbdR3W6OKGzUszKQh1yyNYK//4kSRsdb8s4p SFb2KqZlhkv9RU/OxFlx5LygSSaNxp+BXsNbjPUcUSksweVYMtwYnBdANjkBiZ1yF2Ox hI7/bGXbf5n8QcrAHaHnIBq8cTRPye8sdUADj9gTb1FaRGfZLZgwv1sBCAZ1irnG2Iix OZ8vkc8ypOdpEEuTh0GSyUSeyATso8JLQcIug/STYv+Hnsk4qjDlPA+w3E0UaFq51IF1 WBbHgczIDoK2SWT/ict8ealkndcWvT7qqO4ilZ+pLoZPJsxLETtzeppycvkCUq5ckT3b CAHQ== 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=bl6TeEnXMl0njGb6lDtmNHshmiJnjYJUoV9snwPYTbY=; b=VrYFu/mO09LGGLdg2H3wSvS6QvO/aP56n2rbfrg4hqBphPcRP8jIV+9OrQd3KYUcmV 8xOK84cnqYrz3rKK6TBK+r/jzRUdRNITIuhqn10ThrGWE6L1lL/wxf63D/SMGD0I2SyU iXyScrYC4gnQiDMQ9AOycsDv0NfGbO9pjTv6UcDJnUvqMKyUb7WH+1VHNNIG7rYHhX7/ JIGSxv6gu1X/h5ghv7hWHWCpUyyHvrJtoVKMtUFlJcZSZBtt+ZfRhvcsbFLUu/KR9h23 dyOj/CzmPy+tk71HPQrxWc4LhIGLEvtryEZd4dWXo72E/fbYwEn+MTeH2QerUbIwaq/f QHUw== 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 b13si5664529pfi.53.2018.03.16.09.35.02; Fri, 16 Mar 2018 09:35:16 -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 S1754515AbeCPPiU (ORCPT + 99 others); Fri, 16 Mar 2018 11:38:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42228 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754501AbeCPPiR (ORCPT ); Fri, 16 Mar 2018 11:38:17 -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 26246125B; Fri, 16 Mar 2018 15:38:16 +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.14 096/109] agp/intel: Flush all chipset writes after updating the GGTT Date: Fri, 16 Mar 2018 16:24:05 +0100 Message-Id: <20180316152335.108610830@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@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.14-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);