Skip to content

Commit f30d3ce

Browse files
committed
agp/intel: Reinforce the barrier after GTT updates
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: 983d308 ("agp/intel: Serialise after GTT updates") Fixes: 3497971 ("agp/intel: Flush chipset writes after updating a single PTE") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Andi Shyti <andi.shyti@intel.com> Cc: stable@vger.kernel.org # v4.0+ Link: https://patchwork.freedesktop.org/patch/msgid/20200410083535.25464-1-chris@chris-wilson.co.uk
1 parent c1b5ea9 commit f30d3ce

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/char/agp/intel-gtt.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr,
846846
unsigned int flags)
847847
{
848848
intel_private.driver->write_entry(addr, pg, flags);
849+
readl(intel_private.gtt + pg);
849850
if (intel_private.driver->chipset_flush)
850851
intel_private.driver->chipset_flush();
851852
}
@@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st,
871872
j++;
872873
}
873874
}
874-
wmb();
875+
readl(intel_private.gtt + j - 1);
875876
if (intel_private.driver->chipset_flush)
876877
intel_private.driver->chipset_flush();
877878
}
@@ -1105,6 +1106,7 @@ static void i9xx_cleanup(void)
11051106

11061107
static void i9xx_chipset_flush(void)
11071108
{
1109+
wmb();
11081110
if (intel_private.i9xx_flush_page)
11091111
writel(1, intel_private.i9xx_flush_page);
11101112
}

0 commit comments

Comments
 (0)