From a536a99385ebf5bc9002597618526bf085fee324 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 18 Jul 2016 18:50:05 +0300 Subject: gpu: nvgpu: gp106: reserve wpr from allocator In addition to nonwpr_base address, allocate also the wpr_base that is configured as wpr, in order to not overlap user allocations on that area. Jira DNVGPU-18 Change-Id: Ie2976a091e8084fcdc8ffd9fb4b6c75411450acb Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1182874 Reviewed-by: Deepak Nibade Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Mahantesh Kumbar Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gp106/acr_gp106.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/gpu/nvgpu/gp106/acr_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/acr_gp106.c b/drivers/gpu/nvgpu/gp106/acr_gp106.c index 9364afec..c43b0165 100644 --- a/drivers/gpu/nvgpu/gp106/acr_gp106.c +++ b/drivers/gpu/nvgpu/gp106/acr_gp106.c @@ -93,9 +93,19 @@ static int gp106_alloc_blob_space(struct gk20a *g, size_t size, struct mem_desc *mem) { struct wpr_carveout_info wpr_inf; + int err; g->ops.pmu.get_wpr(g, &wpr_inf); + /* + * Even though this mem_desc wouldn't be used, the wpr region needs to + * be reserved in the allocator. + */ + err = gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, + &g->acr.wpr_dummy, wpr_inf.wpr_base); + if (err) + return err; + return gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, mem, wpr_inf.nonwpr_base); } -- cgit v1.2.2