mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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:
committed by
mobile promotions
parent
806ba3b870
commit
75d98f55d7
@@ -80,6 +80,8 @@ struct gk20a;
|
|||||||
"Direct PTE kind control is supported (map_buffer_ex)"),\
|
"Direct PTE kind control is supported (map_buffer_ex)"),\
|
||||||
DEFINE_FLAG(NVGPU_SUPPORT_MAP_BUFFER_BATCH, \
|
DEFINE_FLAG(NVGPU_SUPPORT_MAP_BUFFER_BATCH, \
|
||||||
"Support batch mapping"), \
|
"Support batch mapping"), \
|
||||||
|
DEFINE_FLAG(NVGPU_SUPPORT_MAPPING_MODIFY, \
|
||||||
|
"Support mapping modify"), \
|
||||||
DEFINE_FLAG(NVGPU_USE_COHERENT_SYSMEM, \
|
DEFINE_FLAG(NVGPU_USE_COHERENT_SYSMEM, \
|
||||||
"Use coherent aperture for sysmem"), \
|
"Use coherent aperture for sysmem"), \
|
||||||
DEFINE_FLAG(NVGPU_MM_USE_PHYSICAL_SG, \
|
DEFINE_FLAG(NVGPU_MM_USE_PHYSICAL_SG, \
|
||||||
|
|||||||
@@ -310,6 +310,10 @@ static int nvgpu_as_ioctl_mapping_modify(
|
|||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_log_fn(g, " ");
|
||||||
|
|
||||||
|
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MAPPING_MODIFY)) {
|
||||||
|
return -ENOTTY;
|
||||||
|
}
|
||||||
|
|
||||||
return nvgpu_vm_mapping_modify(as_share->vm,
|
return nvgpu_vm_mapping_modify(as_share->vm,
|
||||||
args->compr_kind,
|
args->compr_kind,
|
||||||
args->incompr_kind,
|
args->incompr_kind,
|
||||||
|
|||||||
@@ -265,6 +265,8 @@ static struct nvgpu_flags_mapping flags_mapping[] = {
|
|||||||
NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE},
|
NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE},
|
||||||
{NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY,
|
{NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY,
|
||||||
NVGPU_SUPPORT_FAULT_RECOVERY},
|
NVGPU_SUPPORT_FAULT_RECOVERY},
|
||||||
|
{NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY,
|
||||||
|
NVGPU_SUPPORT_MAPPING_MODIFY},
|
||||||
{NVGPU_GPU_FLAGS_SUPPORT_COMPRESSION,
|
{NVGPU_GPU_FLAGS_SUPPORT_COMPRESSION,
|
||||||
NVGPU_SUPPORT_COMPRESSION},
|
NVGPU_SUPPORT_COMPRESSION},
|
||||||
{NVGPU_GPU_FLAGS_SUPPORT_SM_TTU,
|
{NVGPU_GPU_FLAGS_SUPPORT_SM_TTU,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* GK20A Graphics
|
* 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
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* 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)
|
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_PARTIAL_MAPPINGS, true);
|
||||||
nvgpu_set_enabled(g, NVGPU_SUPPORT_DETERMINISTIC_OPTS, true);
|
nvgpu_set_enabled(g, NVGPU_SUPPORT_DETERMINISTIC_OPTS, true);
|
||||||
nvgpu_set_enabled(g, NVGPU_SUPPORT_USERSPACE_MANAGED_AS, 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)) {
|
if (!IS_ENABLED(CONFIG_NVGPU_SYNCFD_NONE)) {
|
||||||
nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNC_FENCE_FDS, true);
|
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
|
#ifdef CONFIG_NVGPU_DGPU
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ struct nvgpu_gpu_zbc_query_table_args {
|
|||||||
#define NVGPU_GPU_FLAGS_SUPPORT_SET_CTX_MMU_DEBUG_MODE (1ULL << 32)
|
#define NVGPU_GPU_FLAGS_SUPPORT_SET_CTX_MMU_DEBUG_MODE (1ULL << 32)
|
||||||
/* Fault recovery is enabled */
|
/* Fault recovery is enabled */
|
||||||
#define NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY (1ULL << 33)
|
#define NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY (1ULL << 33)
|
||||||
|
/* Mapping modify is enabled */
|
||||||
|
#define NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY (1ULL << 34)
|
||||||
/* Compression is enabled */
|
/* Compression is enabled */
|
||||||
#define NVGPU_GPU_FLAGS_SUPPORT_COMPRESSION (1ULL << 36)
|
#define NVGPU_GPU_FLAGS_SUPPORT_COMPRESSION (1ULL << 36)
|
||||||
/* SM TTU is enabled */
|
/* SM TTU is enabled */
|
||||||
|
|||||||
Reference in New Issue
Block a user