gpu: nvgpu: add SUPPORT_MAPPING_MODIFY flags

Add new NVGPU_SUPPORT_MAPPING_MODIFY enable flag that is used to
control the value of the exported NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY
flag.

These flags are currently only enabled on linux in non-virtualized
environments.

Jira NVGPU-6374

Change-Id: Ia85c353b767b4f7d0aebc04838f44996bc38c61f
Signed-off-by: scottl <scottl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2490986
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
scottl
2021-02-28 12:50:46 -08:00
committed by mobile promotions
parent 806ba3b870
commit 75d98f55d7
5 changed files with 17 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
/*
* GK20A Graphics
*
* Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -314,6 +314,8 @@ int nvgpu_finalize_poweron_linux(struct nvgpu_os_linux *l)
void gk20a_init_linux_characteristics(struct gk20a *g)
{
struct device *dev = dev_from_gk20a(g);
nvgpu_set_enabled(g, NVGPU_SUPPORT_PARTIAL_MAPPINGS, true);
nvgpu_set_enabled(g, NVGPU_SUPPORT_DETERMINISTIC_OPTS, true);
nvgpu_set_enabled(g, NVGPU_SUPPORT_USERSPACE_MANAGED_AS, true);
@@ -322,6 +324,10 @@ void gk20a_init_linux_characteristics(struct gk20a *g)
if (!IS_ENABLED(CONFIG_NVGPU_SYNCFD_NONE)) {
nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNC_FENCE_FDS, true);
}
if (!gk20a_gpu_is_virtual(dev)) {
nvgpu_set_enabled(g, NVGPU_SUPPORT_MAPPING_MODIFY, true);
}
}
#ifdef CONFIG_NVGPU_DGPU