gpu: nvgpu: Make "phys" nvgpu_mem impl

Make a physical nvgpu_mem implementation in the common code. This
implementation assumes a single, contiguous, physical range. GMMU
mappability is provided by building a one entry SGT.

Since this is now "common" code the original Linux code has been
moved to commom/mm/nvgpu_mem.c.

Also fix the '__' prefix in the nvgpu_mem function. This is not
necessary as this function, although somewhat tricky, is expected
to be used by arbitrary users within the nvgpu driver.

JIRA NVGPU-1029
Bug 2441531

Change-Id: I42313e5c664df3cd94933cc63ff0528326628683
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1995866
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2019-01-15 13:35:53 -08:00
committed by mobile promotions
parent e2a29dbb96
commit f766c6af91
8 changed files with 150 additions and 114 deletions

View File

@@ -432,7 +432,7 @@ int gk20a_finalize_poweron(struct gk20a *g)
if (nvgpu_has_syncpoints(g) && g->syncpt_unit_size) {
if (!nvgpu_mem_is_valid(&g->syncpt_mem)) {
nr_pages = DIV_ROUND_UP(g->syncpt_unit_size, PAGE_SIZE);
__nvgpu_mem_create_from_phys(g, &g->syncpt_mem,
nvgpu_mem_create_from_phys(g, &g->syncpt_mem,
g->syncpt_unit_base, nr_pages);
}
}