From 4c5e29436d0adc4e222ae5d11af507f749e7cd52 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 26 Apr 2016 17:25:30 -0700 Subject: gpu: nvgpu: Flush FB before checking semaphores Before checking semaphore values to determine if jobs have been completed flush the FB. If this is not done, despite the sempahore memory being mapped as volatile in the GMMU, outstanding writes can still be pending. Bug 1732449 JIRA DNVGPU-12 Change-Id: I67b596cd23a5465af05d6d173641a579cb7f168c Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1133787 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 5b259672..a7f8005b 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -2826,6 +2826,12 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events) gk20a_dbg_fn(""); + /* + * Ensure that all pending writes are actually done before trying to + * read semaphore values from DRAM. + */ + g->ops.mm.fb_flush(g); + for (chid = 0; chid < f->num_channels; chid++) { struct channel_gk20a *c = g->fifo.channel+chid; if (gk20a_channel_get(c)) { -- cgit v1.2.2