From: Greg Kroah-Hartman Date: Tue, 16 Jun 2020 12:04:52 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v5.4.47~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b79a9eaa0f116abd37fec87c57ab8fa555f867a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: agp-intel-reinforce-the-barrier-after-gtt-updates.patch --- diff --git a/queue-4.9/agp-intel-reinforce-the-barrier-after-gtt-updates.patch b/queue-4.9/agp-intel-reinforce-the-barrier-after-gtt-updates.patch new file mode 100644 index 00000000000..6623609cc72 --- /dev/null +++ b/queue-4.9/agp-intel-reinforce-the-barrier-after-gtt-updates.patch @@ -0,0 +1,55 @@ +From f30d3ced9fafa03e4855508929b5b6334907f45e Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 10 Apr 2020 09:35:35 +0100 +Subject: agp/intel: Reinforce the barrier after GTT updates + +From: Chris Wilson + +commit f30d3ced9fafa03e4855508929b5b6334907f45e upstream. + +After changing the timing between GTT updates and execution on the GPU, +we started seeing sporadic failures on Ironlake. These were narrowed +down to being an insufficiently strong enough barrier/delay after +updating the GTT and scheduling execution on the GPU. By forcing the +uncached read, and adding the missing barrier for the singular +insert_page (relocation paths), the sporadic failures go away. + +Fixes: 983d308cb8f6 ("agp/intel: Serialise after GTT updates") +Fixes: 3497971a71d8 ("agp/intel: Flush chipset writes after updating a single PTE") +Signed-off-by: Chris Wilson +Acked-by: Andi Shyti +Cc: stable@vger.kernel.org # v4.0+ +Link: https://patchwork.freedesktop.org/patch/msgid/20200410083535.25464-1-chris@chris-wilson.co.uk +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/agp/intel-gtt.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/char/agp/intel-gtt.c ++++ b/drivers/char/agp/intel-gtt.c +@@ -845,6 +845,7 @@ void intel_gtt_insert_page(dma_addr_t ad + unsigned int flags) + { + intel_private.driver->write_entry(addr, pg, flags); ++ readl(intel_private.gtt + pg); + if (intel_private.driver->chipset_flush) + intel_private.driver->chipset_flush(); + } +@@ -870,7 +871,7 @@ void intel_gtt_insert_sg_entries(struct + j++; + } + } +- wmb(); ++ readl(intel_private.gtt + j - 1); + if (intel_private.driver->chipset_flush) + intel_private.driver->chipset_flush(); + } +@@ -1104,6 +1105,7 @@ static void i9xx_cleanup(void) + + static void i9xx_chipset_flush(void) + { ++ wmb(); + if (intel_private.i9xx_flush_page) + writel(1, intel_private.i9xx_flush_page); + } diff --git a/queue-4.9/series b/queue-4.9/series index 32737ddf085..c889403973c 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -48,3 +48,4 @@ smack-slab-out-of-bounds-in-vsscanf.patch mm-slub-fix-a-memory-leak-in-sysfs_slab_add.patch fat-don-t-allow-to-mount-if-the-fat-length-0.patch perf-add-cond_resched-to-task_function_call.patch +agp-intel-reinforce-the-barrier-after-gtt-updates.patch