summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAparna Das <aparnad@nvidia.com>2018-01-11 18:12:01 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-08 17:11:56 -0500
commitdc110896cd6dbda8296720da816c1e81e64aca04 (patch)
treeedf7a8d9fd8b371663d97cd875b4c8983389e7d3 /drivers
parentf0cbe19b12524f5df6466eaf86acbfb349def6b1 (diff)
gpu: nvgpu: add vpr flag in gpu characteristics
VPR is currently not supported in virtualized configuration. Allow reporting VPR capability in gpu characteristics Jira EVLR-2236 Change-Id: Id61a0045577e4add0d9cdfddcefcedd5b20eb1dd Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1639798 (cherry picked from commit 4136b74fd4435966ee2e69ec88fb66424382a7c0) Reviewed-on: https://git-master.nvidia.com/r/1640712 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c1
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/enabled.h2
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
index f5f467b3..0b449692 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
@@ -176,6 +176,8 @@ static struct nvgpu_flags_mapping flags_mapping[] = {
176 NVGPU_SUPPORT_TSG_SUBCONTEXTS}, 176 NVGPU_SUPPORT_TSG_SUBCONTEXTS},
177 {NVGPU_GPU_FLAGS_SUPPORT_SCG, 177 {NVGPU_GPU_FLAGS_SUPPORT_SCG,
178 NVGPU_SUPPORT_SCG}, 178 NVGPU_SUPPORT_SCG},
179 {NVGPU_GPU_FLAGS_SUPPORT_VPR,
180 NVGPU_SUPPORT_VPR},
179}; 181};
180 182
181static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) 183static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g)
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
index db30fff2..127a8ce9 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
@@ -667,6 +667,7 @@ void gk20a_tegra_idle(struct device *dev)
667void gk20a_tegra_init_secure_alloc(struct gk20a *g) 667void gk20a_tegra_init_secure_alloc(struct gk20a *g)
668{ 668{
669 g->ops.secure_alloc = gk20a_tegra_secure_alloc; 669 g->ops.secure_alloc = gk20a_tegra_secure_alloc;
670 __nvgpu_set_enabled(g, NVGPU_SUPPORT_VPR, true);
670} 671}
671 672
672#ifdef CONFIG_COMMON_CLK 673#ifdef CONFIG_COMMON_CLK
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
index cdfd0c55..e6f9525d 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
@@ -113,6 +113,8 @@ struct gk20a;
113 113
114#define NVGPU_SEC_SECUREGPCCS 41 114#define NVGPU_SEC_SECUREGPCCS 41
115#define NVGPU_SEC_PRIVSECURITY 42 115#define NVGPU_SEC_PRIVSECURITY 42
116/* VPR is supported */
117#define NVGPU_SUPPORT_VPR 43
116 118
117/* 119/*
118 * Nvlink flags 120 * Nvlink flags