From f05c269c23d1da5ef041d3d0a07e0c91c1627930 Mon Sep 17 00:00:00 2001 From: Lauri Peltonen Date: Thu, 21 Aug 2014 17:54:56 -0700 Subject: gpu: nvgpu: cde: Map backing store as read-only The cde shader will only read data from the global compbit backing store. Map it as read-only to enforce this. Change-Id: If5be44b8daedd5e7fdee650a6e76befa7bdecfd6 Signed-off-by: Lauri Peltonen Reviewed-on: http://git-master/r/486679 --- drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/cde_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index 57707f54..24e2a778 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c @@ -795,7 +795,7 @@ int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) /* map backing store to gpu virtual space */ vaddr = gk20a_gmmu_map(ch->vm, &gr->compbit_store.sgt, g->gr.compbit_store.size, 0, - gk20a_mem_flag_none); + gk20a_mem_flag_read_only); if (!vaddr) { gk20a_warn(&cde_ctx->pdev->dev, "cde: cannot map compression bit backing store"); -- cgit v1.2.2