Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Issue a write barrier after updating the GTT.
details: https://anonhg.NetBSD.org/src/rev/fadef7c0b9df
branches: trunk
changeset: 336331:fadef7c0b9df
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Feb 26 00:42:10 2015 +0000
description:
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 <chris%chris-wilson.co.uk@localhost>
Date: Mon Jan 26 10:47:10 2015 +0000
agp/intel: Serialise after GTT updates
diffstat:
sys/dev/pci/agp_i810.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r ad49739513ea -r fadef7c0b9df sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c Wed Feb 25 23:14:59 2015 +0000
+++ b/sys/dev/pci/agp_i810.c Thu Feb 26 00:42:10 2015 +0000
@@ -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 @@
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));
}
Home |
Main Index |
Thread Index |
Old Index