diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-07-18 11:50:05 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:18 -0500 |
commit | a536a99385ebf5bc9002597618526bf085fee324 (patch) | |
tree | 807eb97427e2b13e90bb82b209e7038de05ed63d /drivers | |
parent | f48a806cf02fdb43542203ed27009ac05d8831e4 (diff) |
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 <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1182874
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/acr_gp106.c | 10 |
1 files changed, 10 insertions, 0 deletions
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, | |||
93 | size_t size, struct mem_desc *mem) | 93 | size_t size, struct mem_desc *mem) |
94 | { | 94 | { |
95 | struct wpr_carveout_info wpr_inf; | 95 | struct wpr_carveout_info wpr_inf; |
96 | int err; | ||
96 | 97 | ||
97 | g->ops.pmu.get_wpr(g, &wpr_inf); | 98 | g->ops.pmu.get_wpr(g, &wpr_inf); |
98 | 99 | ||
100 | /* | ||
101 | * Even though this mem_desc wouldn't be used, the wpr region needs to | ||
102 | * be reserved in the allocator. | ||
103 | */ | ||
104 | err = gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, | ||
105 | &g->acr.wpr_dummy, wpr_inf.wpr_base); | ||
106 | if (err) | ||
107 | return err; | ||
108 | |||
99 | return gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, mem, | 109 | return gk20a_gmmu_alloc_attr_vid_at(g, 0, wpr_inf.size, mem, |
100 | wpr_inf.nonwpr_base); | 110 | wpr_inf.nonwpr_base); |
101 | } | 111 | } |