diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index c37f790e..1cdb2f8a 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -2341,6 +2341,7 @@ int gk20a_vm_alloc_share(struct gk20a_as_share *as_share, u32 big_page_size) | |||
2341 | struct vm_gk20a *vm; | 2341 | struct vm_gk20a *vm; |
2342 | char name[32]; | 2342 | char name[32]; |
2343 | int err; | 2343 | int err; |
2344 | u32 default_big_page_size; | ||
2344 | 2345 | ||
2345 | gk20a_dbg_fn(""); | 2346 | gk20a_dbg_fn(""); |
2346 | 2347 | ||
@@ -2354,11 +2355,15 @@ int gk20a_vm_alloc_share(struct gk20a_as_share *as_share, u32 big_page_size) | |||
2354 | 2355 | ||
2355 | snprintf(name, sizeof(name), "gk20a_as_%d", as_share->id); | 2356 | snprintf(name, sizeof(name), "gk20a_as_%d", as_share->id); |
2356 | 2357 | ||
2357 | if (big_page_size && !g->ops.mm.set_big_page_size) | 2358 | default_big_page_size = |
2358 | return -EINVAL; | 2359 | gk20a_get_platform(g->dev)->default_big_page_size; |
2360 | |||
2359 | if (big_page_size == 0) | 2361 | if (big_page_size == 0) |
2360 | big_page_size = | 2362 | big_page_size = default_big_page_size; |
2361 | gk20a_get_platform(g->dev)->default_big_page_size; | 2363 | |
2364 | if (big_page_size != default_big_page_size && | ||
2365 | !g->ops.mm.set_big_page_size) | ||
2366 | return -EINVAL; | ||
2362 | 2367 | ||
2363 | err = gk20a_init_vm(mm, vm, big_page_size, big_page_size << 10, | 2368 | err = gk20a_init_vm(mm, vm, big_page_size, big_page_size << 10, |
2364 | mm->channel.size, true, name); | 2369 | mm->channel.size, true, name); |