diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-01-31 18:01:05 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-02 15:12:02 -0500 |
commit | 5cb742d228c6816e7fdd1220f4b4ee3378abf3dc (patch) | |
tree | 9499a43ae57f3bfc0c916bd5793cf5b25557b058 | |
parent | 98da3f8eed914225e9ffe0f768d7647506e95cdc (diff) |
gpu: nvgpu: gv11b: add scg support info in gpu characteristics
Indicated support for Simultaneous Compute and Graphics(SCG)
in gpu characteristics for gv11b.
Bug 2053932
Change-Id: I788e22242083dff775dd4cc5b9aa73c938028536
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1649805
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 4 | ||||
-rw-r--r-- | include/uapi/linux/nvgpu.h | 2 |
5 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index b751a337..398823f3 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -172,6 +172,8 @@ static struct nvgpu_flags_mapping flags_mapping[] = { | |||
172 | NVGPU_ECC_ENABLED_LTC}, | 172 | NVGPU_ECC_ENABLED_LTC}, |
173 | {NVGPU_GPU_FLAGS_SUPPORT_TSG_SUBCONTEXTS, | 173 | {NVGPU_GPU_FLAGS_SUPPORT_TSG_SUBCONTEXTS, |
174 | NVGPU_SUPPORT_TSG_SUBCONTEXTS}, | 174 | NVGPU_SUPPORT_TSG_SUBCONTEXTS}, |
175 | {NVGPU_GPU_FLAGS_SUPPORT_SCG, | ||
176 | NVGPU_SUPPORT_SCG}, | ||
175 | }; | 177 | }; |
176 | 178 | ||
177 | static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) | 179 | static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c index 749e9e81..285268a6 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_gv11b.c | |||
@@ -35,6 +35,7 @@ int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g) | |||
35 | 35 | ||
36 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 36 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
37 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); | 37 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); |
38 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); | ||
38 | 39 | ||
39 | return 0; | 40 | return 0; |
40 | } | 41 | } |
diff --git a/drivers/gpu/nvgpu/gv11b/gv11b.c b/drivers/gpu/nvgpu/gv11b/gv11b.c index 709f18df..ab4b7fcd 100644 --- a/drivers/gpu/nvgpu/gv11b/gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gv11b.c | |||
@@ -153,5 +153,6 @@ int gv11b_init_gpu_characteristics(struct gk20a *g) | |||
153 | gk20a_init_gpu_characteristics(g); | 153 | gk20a_init_gpu_characteristics(g); |
154 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 154 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
155 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); | 155 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); |
156 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); | ||
156 | return 0; | 157 | return 0; |
157 | } | 158 | } |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 4d8dbb08..edf38a6a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -150,10 +150,12 @@ struct gk20a; | |||
150 | #define NVGPU_SUPPORT_ASPM 62 | 150 | #define NVGPU_SUPPORT_ASPM 62 |
151 | /* subcontexts are available */ | 151 | /* subcontexts are available */ |
152 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 | 152 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 |
153 | /* Simultaneous Compute and Graphics (SCG) is available */ | ||
154 | #define NVGPU_SUPPORT_SCG 64 | ||
153 | /* | 155 | /* |
154 | * Must be greater than the largest bit offset in the above list. | 156 | * Must be greater than the largest bit offset in the above list. |
155 | */ | 157 | */ |
156 | #define NVGPU_MAX_ENABLED_BITS 64 | 158 | #define NVGPU_MAX_ENABLED_BITS 65 |
157 | 159 | ||
158 | /** | 160 | /** |
159 | * nvgpu_is_enabled - Check if the passed flag is enabled. | 161 | * nvgpu_is_enabled - Check if the passed flag is enabled. |
diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 4ee6a459..95acc63c 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h | |||
@@ -152,6 +152,8 @@ struct nvgpu_gpu_zbc_query_table_args { | |||
152 | #define NVGPU_GPU_FLAGS_SUPPORT_MAP_DIRECT_KIND_CTRL (1ULL << 23) | 152 | #define NVGPU_GPU_FLAGS_SUPPORT_MAP_DIRECT_KIND_CTRL (1ULL << 23) |
153 | /* NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS is available */ | 153 | /* NVGPU_GPU_IOCTL_SET_DETERMINISTIC_OPTS is available */ |
154 | #define NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_OPTS (1ULL << 24) | 154 | #define NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_OPTS (1ULL << 24) |
155 | /* SCG support is available */ | ||
156 | #define NVGPU_GPU_FLAGS_SUPPORT_SCG (1ULL << 25) | ||
155 | /* SM LRF ECC is enabled */ | 157 | /* SM LRF ECC is enabled */ |
156 | #define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60) | 158 | #define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60) |
157 | /* SM SHM ECC is enabled */ | 159 | /* SM SHM ECC is enabled */ |