gpu: nvgpu: Introduce queries for big page sizes

Introduce query functions for default big page size and available
big page sizes. Move initialization of GPU characteristics big
page sizes to the GPU characteristics query function.

JIRA NVGPU-259

Change-Id: Ie66cc2fbfcd88205593056f8d5010ac2539c8bc2
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1593685
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-11-07 09:56:40 -08:00
committed by mobile promotions
parent a51219e526
commit 58dd20f86b
5 changed files with 34 additions and 13 deletions

View File

@@ -211,6 +211,11 @@ gk20a_ctrl_ioctl_gpu_characteristics(
pgpu->vbios_version = g->bios.vbios_version;
pgpu->vbios_oem_version = g->bios.vbios_oem_version;
pgpu->big_page_size = nvgpu_mm_get_default_big_page_size(g);
pgpu->pde_coverage_bit_count =
g->ops.mm.get_mmu_levels(g, pgpu->big_page_size)[0].lo_bit[0];
pgpu->available_big_page_sizes = nvgpu_mm_get_available_big_page_sizes(g);
if (request->gpu_characteristics_buf_size > 0) {
size_t write_size = sizeof(*pgpu);