diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-11-07 12:19:53 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-09 22:18:11 -0500 |
commit | dc5f6bcee0281c5fa63c977519d732218f519ea0 (patch) | |
tree | bd465cb7e5c45999019a787547bdb79835d9dbf5 /drivers/gpu/nvgpu/gp106/hal_gp106.c | |
parent | 1dad4adbd2aecfd484a84d47b29b81bb665bc60b (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/gp106/hal_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 5771e6e4..931780d5 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -179,6 +179,24 @@ static int gp106_get_litter_value(struct gk20a *g, int value) | |||
179 | case GPU_LIT_FBPA_STRIDE: | 179 | case GPU_LIT_FBPA_STRIDE: |
180 | ret = proj_fbpa_stride_v(); | 180 | ret = proj_fbpa_stride_v(); |
181 | break; | 181 | break; |
182 | case GPU_LIT_TWOD_CLASS: | ||
183 | ret = FERMI_TWOD_A; | ||
184 | break; | ||
185 | case GPU_LIT_THREED_CLASS: | ||
186 | ret = PASCAL_B; | ||
187 | break; | ||
188 | case GPU_LIT_COMPUTE_CLASS: | ||
189 | ret = PASCAL_COMPUTE_B; | ||
190 | break; | ||
191 | case GPU_LIT_GPFIFO_CLASS: | ||
192 | ret = PASCAL_CHANNEL_GPFIFO_A; | ||
193 | break; | ||
194 | case GPU_LIT_I2M_CLASS: | ||
195 | ret = KEPLER_INLINE_TO_MEMORY_B; | ||
196 | break; | ||
197 | case GPU_LIT_DMA_COPY_CLASS: | ||
198 | ret = PASCAL_DMA_COPY_A; | ||
199 | break; | ||
182 | default: | 200 | default: |
183 | BUG(); | 201 | BUG(); |
184 | break; | 202 | break; |
@@ -694,7 +712,6 @@ static const struct gpu_ops gp106_ops = { | |||
694 | int gp106_init_hal(struct gk20a *g) | 712 | int gp106_init_hal(struct gk20a *g) |
695 | { | 713 | { |
696 | struct gpu_ops *gops = &g->ops; | 714 | struct gpu_ops *gops = &g->ops; |
697 | struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; | ||
698 | 715 | ||
699 | gk20a_dbg_fn(""); | 716 | gk20a_dbg_fn(""); |
700 | 717 | ||
@@ -757,13 +774,6 @@ int gp106_init_hal(struct gk20a *g) | |||
757 | 774 | ||
758 | g->name = "gp10x"; | 775 | g->name = "gp10x"; |
759 | 776 | ||
760 | c->twod_class = FERMI_TWOD_A; | ||
761 | c->threed_class = PASCAL_B; | ||
762 | c->compute_class = PASCAL_COMPUTE_B; | ||
763 | c->gpfifo_class = PASCAL_CHANNEL_GPFIFO_A; | ||
764 | c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; | ||
765 | c->dma_copy_class = PASCAL_DMA_COPY_A; | ||
766 | |||
767 | gk20a_dbg_fn("done"); | 777 | gk20a_dbg_fn("done"); |
768 | 778 | ||
769 | return 0; | 779 | return 0; |