Module Name:    src
Committed By:   riastradh
Date:           Thu Feb 26 00:42:10 UTC 2015

Modified Files:
        src/sys/dev/pci: agp_i810.c

Log Message:
Issue a write barrier after updating the GTT.

Linux never used to do this...until a month:

https://bugs.freedesktop.org/show_bug.cgi?id=88191

   commit 983d308cb8f602d1920a8c40196eb2ab6cc07bd2
   Author: Chris Wilson <ch...@chris-wilson.co.uk>
   Date:   Mon Jan 26 10:47:10 2015 +0000

       agp/intel: Serialise after GTT updates


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/dev/pci/agp_i810.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.114 src/sys/dev/pci/agp_i810.c:1.115
--- src/sys/dev/pci/agp_i810.c:1.114	Sun Aug 24 22:56:18 2014
+++ src/sys/dev/pci/agp_i810.c	Thu Feb 26 00:42:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: agp_i810.c,v 1.114 2014/08/24 22:56:18 riastradh Exp $	*/
+/*	$NetBSD: agp_i810.c,v 1.115 2015/02/26 00:42:10 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.114 2014/08/24 22:56:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.115 2015/02/26 00:42:10 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -156,6 +156,13 @@ void
 agp_i810_post_gtt_entry(struct agp_i810_softc *isc, off_t off)
 {
 
+	/*
+	 * See <https://bugs.freedesktop.org/show_bug.cgi?id=88191>.
+	 * Out of paranoia, let's do the write barrier and posting
+	 * read, because I don't have enough time or hardware to
+	 * conduct conclusive tests.
+	 */
+	membar_producer();
 	(void)bus_space_read_4(isc->gtt_bst, isc->gtt_bsh,
 	    4*(off >> AGP_PAGE_SHIFT));
 }

Reply via email to