Skip to content

Commit

Permalink
agp/intel: Reinforce the barrier after GTT updates
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Andi Shyti <[email protected]>
Cc: [email protected] # v4.0+
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
ickle committed Apr 10, 2020
1 parent c1b5ea9 commit f30d3ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr,
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();
}
Expand All @@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st,
j++;
}
}
wmb();
readl(intel_private.gtt + j - 1);
if (intel_private.driver->chipset_flush)
intel_private.driver->chipset_flush();
}
Expand Down Expand Up @@ -1105,6 +1106,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);
}
Expand Down

0 comments on commit f30d3ce

Please sign in to comment.