gpu: nvgpu: gp10x: support in-kernel vidmem mappings

Propagate the buffer aperture flag in gk20a_locked_gmmu_map up so that
buffers represented as a mem_desc and present in vidmem can be mapped to
gpu.

JIRA DNVGPU-18
JIRA DNVGPU-76

Change-Id: Icd675e83e3c28836f0ed8880425748697713bb0a
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1169296
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Konsta Holtta
2016-06-17 15:45:38 +03:00
committed by Deepak Nibade
parent d6730d5214
commit bc45c8ef2b
2 changed files with 4 additions and 2 deletions

View File

@@ -836,7 +836,8 @@ int gr_gp10b_alloc_buffer(struct vm_gk20a *vm, size_t size,
size,
NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE,
gk20a_mem_flag_none,
false);
false,
mem->aperture);
if (!mem->gpu_va) {
err = -ENOMEM;

View File

@@ -51,7 +51,8 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
bool clear_ctags,
bool sparse,
bool priv,
struct vm_gk20a_mapping_batch *batch)
struct vm_gk20a_mapping_batch *batch,
enum gk20a_aperture aperture)
{
int err = 0;
struct device *d = dev_from_vm(vm);