summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-11-07 12:19:53 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-09 22:18:11 -0500
commitdc5f6bcee0281c5fa63c977519d732218f519ea0 (patch)
treebd465cb7e5c45999019a787547bdb79835d9dbf5 /drivers/gpu/nvgpu/gp10b
parent1dad4adbd2aecfd484a84d47b29b81bb665bc60b (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: Ife7a5cb38df3d33ce98a1caa43d3873fb1431234 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1593683 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c2
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c27
2 files changed, 20 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index 0a127ad7..accbe0a6 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -158,7 +158,7 @@ int channel_gp10b_setup_ramfc(struct channel_gk20a *c,
158 158
159u32 gp10b_fifo_get_pbdma_signature(struct gk20a *g) 159u32 gp10b_fifo_get_pbdma_signature(struct gk20a *g)
160{ 160{
161 return g->gpu_characteristics.gpfifo_class 161 return g->ops.get_litter_value(g, GPU_LIT_GPFIFO_CLASS)
162 | pbdma_signature_sw_zero_f(); 162 | pbdma_signature_sw_zero_f();
163} 163}
164 164
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 757eae04..7ed91e02 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -162,6 +162,25 @@ int gp10b_get_litter_value(struct gk20a *g, int value)
162 case GPU_LIT_FBPA_SHARED_BASE: 162 case GPU_LIT_FBPA_SHARED_BASE:
163 ret = 0; 163 ret = 0;
164 break; 164 break;
165 case GPU_LIT_TWOD_CLASS:
166 ret = FERMI_TWOD_A;
167 break;
168 case GPU_LIT_THREED_CLASS:
169 ret = PASCAL_A;
170 break;
171 case GPU_LIT_COMPUTE_CLASS:
172 ret = PASCAL_COMPUTE_A;
173 break;
174 case GPU_LIT_GPFIFO_CLASS:
175 ret = PASCAL_CHANNEL_GPFIFO_A;
176 break;
177 case GPU_LIT_I2M_CLASS:
178 ret = KEPLER_INLINE_TO_MEMORY_B;
179 break;
180 case GPU_LIT_DMA_COPY_CLASS:
181 ret = PASCAL_DMA_COPY_A;
182 break;
183
165 default: 184 default:
166 nvgpu_err(g, "Missing definition %d", value); 185 nvgpu_err(g, "Missing definition %d", value);
167 BUG(); 186 BUG();
@@ -608,7 +627,6 @@ static const struct gpu_ops gp10b_ops = {
608int gp10b_init_hal(struct gk20a *g) 627int gp10b_init_hal(struct gk20a *g)
609{ 628{
610 struct gpu_ops *gops = &g->ops; 629 struct gpu_ops *gops = &g->ops;
611 struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
612 u32 val; 630 u32 val;
613 631
614 gops->ltc = gp10b_ops.ltc; 632 gops->ltc = gp10b_ops.ltc;
@@ -730,12 +748,5 @@ int gp10b_init_hal(struct gk20a *g)
730 748
731 g->name = "gp10b"; 749 g->name = "gp10b";
732 750
733 c->twod_class = FERMI_TWOD_A;
734 c->threed_class = PASCAL_A;
735 c->compute_class = PASCAL_COMPUTE_A;
736 c->gpfifo_class = PASCAL_CHANNEL_GPFIFO_A;
737 c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B;
738 c->dma_copy_class = PASCAL_DMA_COPY_A;
739
740 return 0; 751 return 0;
741} 752}