summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2015-03-19 15:28:34 -0400
committerIshan Mittal <imittal@nvidia.com>2015-05-18 02:03:19 -0400
commit520ff00e870eadc98a50f58ecd514ced53a8612f (patch)
tree6822d8ad2a51f98c2df421ba9cc7727e06757fcb /drivers/gpu/nvgpu/gk20a/gk20a.c
parent069accc8571716dc616c9f96776d54bf657afaee (diff)
gpu: nvgpu: Implement compbits mapping
Implement NVGPU_AS_IOCTL_GET_BUFFER_COMPBITS_INFO for requesting info on compbits-mappable buffers; and NVGPU_AS_IOCTL_MAP_BUFFER_COMPBITS, which enables mapping compbits to the GPU address space of said buffers. This, subsequently, enables moving comptag swizzling from GPU to CDEH/CDEV formats to userspace. Compbits mapping is conservative and it may map more than what is strictly needed. This is because two reasons: 1) mapping must be done on small page alignment (4kB), and 2) GPU comptags are swizzled all around the aggregate cache line, which means that the whole cache line must be visible even if only some comptag lines are required from it. Cache line size is not necessarily a multiple of the small page size. Bug 200077571 Change-Id: I5ae88fe6b616e5ea37d3bff0dff46c07e9c9267e Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: http://git-master/r/719710 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 470729b7..d3114ecd 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -2016,8 +2016,13 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
2016 gpu->max_ltc_per_fbp = g->ops.gr.get_max_ltc_per_fbp(g); 2016 gpu->max_ltc_per_fbp = g->ops.gr.get_max_ltc_per_fbp(g);
2017 gpu->max_lts_per_ltc = g->ops.gr.get_max_lts_per_ltc(g); 2017 gpu->max_lts_per_ltc = g->ops.gr.get_max_lts_per_ltc(g);
2018 g->ops.gr.get_rop_l2_en_mask(g); 2018 g->ops.gr.get_rop_l2_en_mask(g);
2019 2019 gpu->gr_compbit_store_base_hw = g->gr.compbit_store.base_hw;
2020 gpu->reserved = 0; 2020 gpu->gr_gobs_per_comptagline_per_slice =
2021 g->gr.gobs_per_comptagline_per_slice;
2022 gpu->num_ltc = g->ltc_count;
2023 gpu->lts_per_ltc = g->gr.slices_per_ltc;
2024 gpu->cbc_cache_line_size = g->gr.cacheline_size;
2025 gpu->cbc_comptags_per_line = g->gr.comptags_per_cacheline;
2021 2026
2022 return 0; 2027 return 0;
2023} 2028}