summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-05-12 15:14:05 +0300
committerMandar Padmawar <mpadmawar@nvidia.com>2014-06-18 04:42:58 -0700
commit3b75a6402747a7bc214366f87cf185949f33cc65 (patch)
tree54688d6b3c9faffc02af0ea66d9dd91316780ee4 /drivers/gpu
parenta41d47338494e28e1e310b932e43e89fdd714e75 (diff)
gpu: nvgpu: Remove extraneous FB flush calls
gk20a_mm_fb_flush() invoked G_ELPG_FLUSH and FB_FLUSH. Remove the invokation of G_ELPG_FLUSH. Replace calls to gk20a_mm_fb_flush() with gk20a_mm_l2_flush() when appropriate. Bug 1421824 Change-Id: I02af4bdc3b7bd26d0f6a8d610f70349269775a36 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/408210 (cherry picked from commit f02f34a8d214d883c949ab55fe872d4176a21bc5) Reviewed-on: http://git-master/r/423230 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c12
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c2
2 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 31cf17e60bd9..491f55bff50a 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -652,8 +652,6 @@ static int gr_gk20a_commit_inst(struct channel_gk20a *c, u64 gpu_va)
gk20a_dbg_fn("");
- gk20a_mm_fb_flush(c->g);
-
inst_ptr = c->inst_block.cpuva;
if (!inst_ptr)
return -ENOMEM;
@@ -1570,7 +1568,7 @@ static int gr_gk20a_init_golden_ctx_image(struct gk20a *g,
ctx_header_words = roundup(ctx_header_bytes, sizeof(u32));
ctx_header_words >>= 2;
- gk20a_mm_fb_flush(g);
+ gk20a_mm_l2_flush(g, true);
for (i = 0; i < ctx_header_words; i++) {
data = gk20a_mem_rd32(ctx_ptr, i);
@@ -1631,11 +1629,9 @@ int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g,
void *ctx_ptr = NULL;
u32 data;
- /*XXX caller responsible for making sure the channel is quiesced? */
-
/* Channel gr_ctx buffer is gpu cacheable.
Flush and invalidate before cpu update. */
- gk20a_mm_fb_flush(g);
+ gk20a_mm_l2_flush(g, true);
ctx_ptr = vmap(ch_ctx->gr_ctx.pages,
PAGE_ALIGN(ch_ctx->gr_ctx.size) >> PAGE_SHIFT,
@@ -1675,7 +1671,7 @@ static int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
/* Channel gr_ctx buffer is gpu cacheable.
Flush and invalidate before cpu update. */
- gk20a_mm_fb_flush(g);
+ gk20a_mm_l2_flush(g, true);
ctx_ptr = vmap(ch_ctx->gr_ctx.pages,
PAGE_ALIGN(ch_ctx->gr_ctx.size) >> PAGE_SHIFT,
@@ -6659,7 +6655,7 @@ int gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
goto cleanup;
}
- gk20a_mm_fb_flush(g);
+ gk20a_mm_l2_flush(g, true);
/* write to appropriate place in context image,
* first have to figure out where that really is */
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index a930aa52e1a2..b171915163e0 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -2778,8 +2778,6 @@ int gk20a_mm_fb_flush(struct gk20a *g)
mutex_lock(&mm->l2_op_lock);
- g->ops.ltc.elpg_flush(g);
-
/* Make sure all previous writes are committed to the L2. There's no
guarantee that writes are to DRAM. This will be a sysmembar internal
to the L2. */