summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-11-07 12:31:37 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-09 22:18:31 -0500
commitc87e85af0cd812c6e1c138d4d1e48c23e3aa6bd3 (patch)
tree51f415090fa9fc2be12cc496316ea543a90011bf /drivers/gpu/nvgpu/gv11b/hal_gv11b.c
parent5b368d3e46b946ed2a6b1b70ad2ac600740e582a (diff)
gpu: nvgpu: Return GPU classes in get_litter_value
Return GPU classes in HAL get_litter_value() instead of assigning them to GPU characteristics at HAL initialization time. JIRA NVGPU-259 Change-Id: I92cbadf3bd07292a8715d30843972def879795f5 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1593691 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hal_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index ced5006d..681ddf3a 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -196,6 +196,24 @@ int gv11b_get_litter_value(struct gk20a *g, int value)
196 case GPU_LIT_FBPA_SHARED_BASE: 196 case GPU_LIT_FBPA_SHARED_BASE:
197 ret = 0; 197 ret = 0;
198 break; 198 break;
199 case GPU_LIT_TWOD_CLASS:
200 ret = FERMI_TWOD_A;
201 break;
202 case GPU_LIT_THREED_CLASS:
203 ret = VOLTA_A;
204 break;
205 case GPU_LIT_COMPUTE_CLASS:
206 ret = VOLTA_COMPUTE_A;
207 break;
208 case GPU_LIT_GPFIFO_CLASS:
209 ret = VOLTA_CHANNEL_GPFIFO_A;
210 break;
211 case GPU_LIT_I2M_CLASS:
212 ret = KEPLER_INLINE_TO_MEMORY_B;
213 break;
214 case GPU_LIT_DMA_COPY_CLASS:
215 ret = VOLTA_DMA_COPY_A;
216 break;
199 217
200 default: 218 default:
201 nvgpu_err(g, "Missing definition %d", value); 219 nvgpu_err(g, "Missing definition %d", value);
@@ -674,7 +692,6 @@ static const struct gpu_ops gv11b_ops = {
674int gv11b_init_hal(struct gk20a *g) 692int gv11b_init_hal(struct gk20a *g)
675{ 693{
676 struct gpu_ops *gops = &g->ops; 694 struct gpu_ops *gops = &g->ops;
677 struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
678 u32 val; 695 u32 val;
679 bool priv_security; 696 bool priv_security;
680 697
@@ -760,12 +777,5 @@ int gv11b_init_hal(struct gk20a *g)
760 777
761 g->name = "gv11b"; 778 g->name = "gv11b";
762 779
763 c->twod_class = FERMI_TWOD_A;
764 c->threed_class = VOLTA_A;
765 c->compute_class = VOLTA_COMPUTE_A;
766 c->gpfifo_class = VOLTA_CHANNEL_GPFIFO_A;
767 c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B;
768 c->dma_copy_class = VOLTA_DMA_COPY_A;
769
770 return 0; 780 return 0;
771} 781}